Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-84373

Опубликовано: 01 сент. 2026
Источник: redhat
CVSS3: 5.9
EPSS Низкий

Описание

Vitest is a testing framework powered by Vite. From 2.1.0 until 4.1.11 and 5.0.0-rc.2, the public mockerPlugin and standalone interceptorPlugin exports in packages/mocker/src/node/interceptorPlugin.ts register the vitest:interceptor:register handler on Vite's unauthenticated HMR WebSocket without validating redirect targets against the file-serving allowlist. The implementation processes event.redirect without enforcing server.fs.allow and server.fs.deny through isFileLoadingAllowed. A remote client that can reach an exposed development server can submit an opaque URL scheme preserving .. segments, causing join(server.config.root, redirectUrl.pathname) to resolve outside the project root. The plugin's load hook then returns readFile(mock.redirect, 'utf-8') as module source, disclosing local files readable by the dev-server process. Vitest browser mode uses a token-authenticated RPC and is not remotely unauthenticated by default, although the same boundary check was missing on that path. This issue is fixed in versions 4.1.11 and 5.0.0-rc.2.

A flaw was found in Vitest, a testing framework. A remote attacker, able to reach an exposed development server, could exploit an issue in the mockerPlugin and interceptorPlugin exports. These plugins register a handler on Vite's unauthenticated HMR WebSocket without properly validating redirect targets. By submitting a specially crafted URL with path traversal segments, an attacker could read arbitrary local files accessible by the development server process, leading to information disclosure.

Отчет

This vulnerability in Vitest allows an unauthenticated remote attacker to read arbitrary local files on an exposed development server. The flaw stems from a path traversal issue within the HMR WebSocket handler, which fails to properly validate redirect targets. Exploitation is limited to development environments where the Vitest server is accessible from untrusted networks.

Меры по смягчению последствий

Restrict network access to development servers running Vitest. Configure firewall rules to limit inbound connections to the Vitest HMR WebSocket port to only trusted internal networks or localhost. This may impact development workflows that rely on remote access to the development server.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat AMQ Broker 7amq-broker-bin.zipFix deferred
Red Hat AMQ Broker 7amq-broker-maven-repository.zipFix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-26/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2ansible-automation-platform-27/gateway-rhel9Fix deferred
Red Hat Ansible Automation Platform 2automation-gatewayOut of support scope
Red Hat Ansible Automation Platform 2automation-platform-uiFix deferred
Red Hat Build of Keycloakkeycloak-operator.redhat-00001.zipFix deferred
Red Hat Build of Keycloakrhbk-quarkus-dist.zipFix deferred
Red Hat Build of Podman Desktoprh-podman-desktop.gitFix deferred
Red Hat Enterprise Linux 10rh-podman-desktopFix deferred

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-22
https://bugzilla.redhat.com/show_bug.cgi?id=2527102vitest: Vitest: Arbitrary File Read via Path Traversal in HMR WebSocket

EPSS

Процентиль: 31%
0.00375
Низкий

5.9 Medium

CVSS3

Связанные уязвимости

CVSS3: 5.9
nvd
15 дней назад

Vitest is a testing framework powered by Vite. From 2.1.0 until 4.1.11 and 5.0.0-rc.2, the public mockerPlugin and standalone interceptorPlugin exports in packages/mocker/src/node/interceptorPlugin.ts register the vitest:interceptor:register handler on Vite's unauthenticated HMR WebSocket without validating redirect targets against the file-serving allowlist. The implementation processes event.redirect without enforcing server.fs.allow and server.fs.deny through isFileLoadingAllowed. A remote client that can reach an exposed development server can submit an opaque URL scheme preserving .. segments, causing join(server.config.root, redirectUrl.pathname) to resolve outside the project root. The plugin's load hook then returns readFile(mock.redirect, 'utf-8') as module source, disclosing local files readable by the dev-server process. Vitest browser mode uses a token-authenticated RPC and is not remotely unauthenticated by default, although the same boundary check was missing on that path

CVSS3: 5.9
github
8 дней назад

Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock

EPSS

Процентиль: 31%
0.00375
Низкий

5.9 Medium

CVSS3