{"id":"RUSTSEC-2026-0276","revision":"24781d68b1e848e4aae74c05c0ba6bcc","records":[{"revision":"24781d68b1e848e4aae74c05c0ba6bcc","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2026-0276","aliases":["GHSA-72g6-wgrg-vhm7","RUSTSEC-2026-0277"],"title":"Path traversal in apimock's file-serving fallback","description":"The file-serving fallback joined a request-derived path onto the\nconfigured response directory and checked only that the result existed,\nnever that it stayed inside that directory. A request containing a raw\n`..` segment could read any file readable by the process, returned with\nHTTP 200.\n\nRead-only: no write, no code execution.\n\nOn the 4.x line `apimock` is a single crate containing the serving code.\nFixed in 4.8.1 by canonicalising each resolved path and rejecting\nanything outside its base directory.\n\n**apimock 5.0.0 and later are not affected by this advisory.** From\n5.0.0 the serving code moved to the `apimock-server` crate, which\n`apimock` depends on; that crate carries its own advisory for the same\nissue, fixed in 5.19.1.","state":0,"publishedAt":"2026-08-26T12:00:00+00:00","modifiedAt":"2026-09-02T09:10:39.4500162+00:00","affected":[{"ecosystem":"crates.io","name":"apimock","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"4.8.1"},{"kind":"introduced","version":"5.0.0"},{"kind":"fixed","version":"5.0.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"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":null,"severity":null}],"references":["https://crates.io/crates/apimock","https://rustsec.org/advisories/RUSTSEC-2026-0276.html","https://github.com/apimokka/apimock-rs/commit/a9c05fec2d36a750c30e797291a0557f230c8faf"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2026-0276","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2026-0276","identifiers":["RUSTSEC-2026-0276","GHSA-72g6-wgrg-vhm7","RUSTSEC-2026-0277"]},"retained":false,"historicalAffected":[]}],"coverage":[]}