CVE-2026-112946
개요
A flaw was found in Vite. On network-accessible development servers, improper path resolution during import analysis can cause root-relative paths to be incorrectly marked as safe module paths. An unauthenticated remote attacker can exploit this issue by requesting specially crafted paths that match absolute host file locations, resulting in information disclosure of host files outside the project root.
내용
This vulnerability is rated with a Low severity because it solely affects the development server under non-default, highly specific conditions rather than production application deployments. In Red Hat products, Vite is primarily utilized as a build-time asset bundler where the development web server is not exposed over a network. Exploitation further requires that an imported project file path identically mirrors an existing host filesystem path, significantly restricting the scope and likelihood of unauthorized file access.
완화 방법
Avoid exposing the Vite development server to external networks and restrict access to sensitive host paths.
1. Bind the development server to localhost:
Ensure the Vite development server does not listen on public interfaces by omitting the `--host` CLI flag or setting the host explicitly in `vite.config.js`:
javascript
export default {
server: {
host: '127.0.0.1'
}
};
2. Deny sensitive filesystem paths:
Configure `server.fs.deny` in `vite.config.js` to block requests for sensitive system files and directories:
javascript
export default {
server: {
fs: {
deny: ['/etc/**', '/root/**', '/home/**']
}
}
};
3. Restrict network access via firewall:
If the server must run on a networked machine, restrict network access to the development port (default 5173):
bash
firewall-cmd --permanent --remove-port=5173/tcp
firewall-cmd --reload
Caveats: Binding strictly to localhost prevents remote access to development previews. Restricting filesystem paths via `server.fs.deny` can block legitimate project dependencies if located in denied paths. Reloading the firewall configuration will momentarily interrupt active connections.
CVSS (Common Vulnerability Scoring System) 점수 세부 사항
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
다음의 CVSS 지표 및 점수는 예비 정보로 검토 대상입니다.
CVSS v3 점수 분석
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| 기본 점수 | 3.7 | N/A | N/A |
| 공격 벡터 | Network | N/A | N/A |
| 공격 복잡성 | High | N/A | N/A |
| 필요한 권한 | None | N/A | N/A |
| 사용자 상호 작용 | None | N/A | N/A |
| 범위 | Unchanged | N/A | N/A |
| 기밀성 | Low | N/A | N/A |
| 무결성에 미치는 영향 | None | N/A | N/A |
| 가용성에 미치는 영향 | None | N/A | N/A |
벡터
Red Hat: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
취약점 이해 (CWE)
Confidentiality,Integrity
Technical Impact: Read Files or Directories; Modify Files or Directories