GHSA-72g6-wgrg-vhm7
not scored yetPath traversal in apimock's file-serving fallback
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.
On the 4.x line apimock is a single crate containing the serving code.
Fixed in 4.8.1 by canonicalising each resolved path and rejecting
anything outside its base directory.
apimock 5.0.0 and later are not affected by this advisory. From
5.0.0 the serving code moved to the apimock-server crate, which
apimock depends on; that crate carries its own advisory for the same
issue, fixed in 5.19.1.
- Published
- 26 Aug 2026
- Last modified
- 2 Sep 2026
- Also known as
- RUSTSEC-2026-0276RUSTSEC-2026-0277
- Sources
- OSV RUSTSEC-2026-0276JSONOSV RUSTSEC-2026-0277JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | RustSec | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | apimock | >= 0.0.0-0, < 4.8.1; >= 5.0.0, < 5.0.0 | 4.8.1, 5.0.0 |
| OSV | crates.io | apimock-server | >= 0.0.0-0, < 5.19.1 | 5.19.1 |
References
- https://crates.io/crates/apimock · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0276.html · ADVISORY
- https://github.com/apimokka/apimock-rs/commit/a9c05fec2d36a750c30e797291a0557f230c8faf · WEB
- https://crates.io/crates/apimock-server · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0277.html · ADVISORY
- https://github.com/apimokka/apimock-rs/commit/ff0dd152ecfccb3bf00e15cc92bd4d57e485c854 · WEB
History
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Aug 2026)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 26 Aug 2026)