Intel

AIKIDO-2026-148326

apimock is vulnerable to Path Traversal

Path TraversalGHSA-72g6-wgrg-vhm7 Published 3 days ago

78

High Risk

This Affects:

RUSTapimock
2.0.3 - 4.8.0
Fixed in 4.8.1
Are you affected? Scan for Free

TL;DR

The file-serving fallback joins a request-derived path onto the configured response directory and checks only that the resolved path exists, never that it stays inside that directory. A request carrying a raw .. segment can therefore read any file the process can open, returned with HTTP 200. The fix canonicalizes each resolved path and rejects anything outside the base directory.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and the mock server is reachable by clients that can send raw .. path segments.

Background info

apimock is vulnerable to Path Traversal in versions 2.0.3 - 4.8.0.

How to fix this

Upgrade the apimock library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform