Path traversal in apimock-server's file-serving fallback
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (apimock-server 5.19.1), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
crates.io apimock-server
- Affected
- >= 0.0.0-0, < 5.19.1
- Fixed in
- 5.19.1
Sources
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record RUSTSEC-2026-0277 lists affected ranges: crates.io apimock-server >=0.0.0-0 <5.19.1 (fixed)
VerifiedObserved Structured OSV record; not marked as GitHub-reviewed.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record RUSTSEC-2026-0276 lists affected ranges: crates.io apimock >=0.0.0-0 =5.0.0 <5.0.0 (fixed)
VerifiedObserved Structured OSV record; not marked as GitHub-reviewed.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 8.2 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N · score source
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
The file-serving fallback joined a request-derived path onto the configured response directory and checked only that the result existed, never that it stayed inside that directory. A request containing a raw `..` segment could read any file readable by the process, returned with HTTP 200. Read-only: no write, no code execution. Exposure depends on the bind address. The default is `127.0.0.1`; deployments binding `0.0.0.0` or a LAN address are reachable from the network. Most HTTP clients normalise `..` away before sending, so reaching it requires a client that does not. All published versions before 5.19.1 are affected. Fixed in 5.19.1 by canonicalising each resolved path and rejecting anything outside its base directory. This advisory also covers `apimock` 5.x, which depends on `apimock-server`. `apimock` 4.x predates the crate split and carries its own advisory for the same issue, fixed in 4.8.1.
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 3 · amended ·
Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.
- Revision 2 · amended ·
Amended from osv record RUSTSEC-2026-0277
- Revision 1 · created ·
Published from osv record RUSTSEC-2026-0276
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-72g6-wgrg-vhm7 Advisory: Path traversal in apimock-server's file-serving fallback IDs: GHSA-72g6-wgrg-vhm7 Record: https://patchnext.com/advisories/rustsec-2026-0276 (revision 3, source checked 25 Oct 2026, 04:53 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: High (CVSS 8.2) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: apimock-server 5.19.1. A vendor fix does not mean a deployment is fixed. ## Affected components - crates.io apimock-server: affected >= 0.0.0-0, < 5.19.1; fixed in 5.19.1 ## Suggested inspection (read-only) - crates.io apimock-server: check the installed version with your package manager. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on apimock-server. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://osv.dev/vulnerability/RUSTSEC-2026-0277 (OSV record RUSTSEC-2026-0277 lists affected ranges: crates.io apimock-server >=0.0.0-0 <5.19.1 (fixed)) - Verified: https://osv.dev/vulnerability/RUSTSEC-2026-0276 (OSV record RUSTSEC-2026-0276 lists affected ranges: crates.io apimock >=0.0.0-0 =5.0.0 <5.0.0 (fixed)) Commands are suggestions: review each one before running it.
Loading voting…