Rust advisories / apimock-server
VulnerabilityRUSTSEC-2026-0277 · apimock-server
RUSTSEC-2026-0277: Path traversal in apimock-server's file-serving fallback
Short answerA security vulnerability in the apimock-server crate: Path traversal in apimock-server's file-serving fallback. No severity score was published. Fixed in 5.19.1: update to a fixed version.
| Crate | apimock-server |
|---|---|
| Type | Vulnerability (file-disclosure) |
| Affected versions | Before 5.19.1. |
| Fixed in | 5.19.1 |
| Severity | not scored 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 |
| Published | 2026-08-26 |
| Last changed | 2026-09-02 |
| Also known as | GHSA-72g6-wgrg-vhm7, RUSTSEC-2026-0276 |
What to do
- See which version you have:
cargo tree -i apimock-server(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p apimock-server. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleapimock-server = "5.19.1") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
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.
References
- Package: crates.io/crates/apimock-server
- Advisory: rustsec.org/advisories/RUSTSEC-2026-0277.html
- Web: github.com/apimokka/apimock-rs/commit/ff0dd152ecfccb3bf00e15cc92bd4d57e485c854
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?