Skip to content

@vitest/mocker (npm)

Next generation testing framework powered by Vite.

Advisories
12
Latest version
5.0.5
Released Oct 15, 2026
License
MIT
OpenSSF Scorecard
—

How to fix

Upgrading to 5.0.3 or later clears every advisory below that has a fix.

Upgrade commands
npm
npm install @vitest/mocker@5.0.5
yarn
yarn add @vitest/mocker@5.0.5
pnpm
pnpm add @vitest/mocker@5.0.5

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-xp26-3454-mjgp
Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
Medium
EPSS 0.54%
>= 4.1.11, < 4.1.12
4.1.12
GHSA-xp26-3454-mjgp
Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
Medium
EPSS 0.54%
>= 5.0.0-rc.2, < 5.0.3
5.0.3
GHSA-xp26-3454-mjgp
Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
Medium
EPSS 0.54%
>= 4.1.11, < 4.1.12
4.1.12
GHSA-xp26-3454-mjgp
Vitest: Windows backslash traversal bypasses the @vitest/mocker redirect allowlist fix
Medium
EPSS 0.54%
>= 5.0.0-rc.2, < 5.0.3
5.0.3
GHSA-qxg6-89mg-rqv8
Vitest: Code injection via unauthenticated manual mock registration
Medium
EPSS 0.34%
>= 2.1.0-beta.7, < 4.1.12
4.1.12
GHSA-qxg6-89mg-rqv8
Vitest: Code injection via unauthenticated manual mock registration
Medium
EPSS 0.34%
>= 5.0.0-beta.1, < 5.0.3
5.0.3
GHSA-qxg6-89mg-rqv8
Vitest: Code injection via unauthenticated manual mock registration
Medium
EPSS 0.34%
>= 2.1.0-beta.7, < 4.1.12
4.1.12
GHSA-qxg6-89mg-rqv8
Vitest: Code injection via unauthenticated manual mock registration
Medium
EPSS 0.34%
>= 5.0.0-beta.1, < 5.0.3
5.0.3
GHSA-82fw-gwwq-j7x9
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Medium
EPSS 0.53%
>= 2.1.0, < 4.1.11
4.1.11
GHSA-82fw-gwwq-j7x9
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Medium
EPSS 0.53%
>= 5.0.0-beta.1, < 5.0.0-rc.2
5.0.0-rc.2
GHSA-82fw-gwwq-j7x9
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Medium
EPSS 0.53%
>= 2.1.0, < 4.1.11
4.1.11
GHSA-82fw-gwwq-j7x9
Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Medium
EPSS 0.53%
>= 5.0.0-beta.1, < 5.0.0-rc.2
5.0.0-rc.2

Source: git+https://github.com/vitest-dev/vitest.git

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor