GHSA-72g6-wgrg-vhm7
Path 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
What each source reports
OSV Score usedRUSTSEC-2026-0276 8.2
Path 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.
- Record
RUSTSEC-2026-0276- CVSS 4.0
- 8.2 High
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 - Updated
- 2026-11-02
OSV Score usedRUSTSEC-2026-0277 8.2
Path traversal in apimock-server'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.
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.
- Record
RUSTSEC-2026-0277- CVSS 4.0
- 8.2 High
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 - Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
apimockcrates.io | 0.0.0-0 up to 4.8.1, 5.0.0 up to 5.0.0 | 4.8.15.0.0 |
apimock-servercrates.io | 0.0.0-0 up to 5.19.1 | 5.19.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
GHSA-72g6-wgrg-vhm7 is a high vulnerability (CVSS 8.2) in apimock, published August 26, 2026. No source lists public exploit code. Fixed in apimock 4.8.1.
References
crates.io/crates/apimock
rustsec.org/advisories/RUSTSEC-2026-0276.html
github.com/apimokka/apimock-rs/commit/a9c05fec2d36a750c30e797291a0557f230c8faf
crates.io/crates/apimock-server
rustsec.org/advisories/RUSTSEC-2026-0277.html
github.com/apimokka/apimock-rs/commit/ff0dd152ecfccb3bf00e15cc92bd4d57e485c854