GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration
rustsec-2026-0276
Vulnerability from osv_rustsec
Published
2026-08-26 12:00
Modified
2026-09-02 08:56
Summary
Path traversal in apimock's file-serving fallback
Details

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.


{
  "affected": [
    {
      "database_specific": {
        "categories": [
          "file-disclosure"
        ],
        "cvss": "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",
        "informational": null
      },
      "ecosystem_specific": {
        "affected_functions": null,
        "affects": {
          "arch": [],
          "functions": [],
          "os": []
        }
      },
      "package": {
        "ecosystem": "crates.io",
        "name": "apimock",
        "purl": "pkg:cargo/apimock"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.0.0-0"
            },
            {
              "fixed": "4.8.1"
            },
            {
              "introduced": "5.0.0"
            },
            {
              "fixed": "5.0.0"
            }
          ],
          "type": "SEMVER"
        }
      ],
      "versions": []
    }
  ],
  "aliases": [
    "GHSA-72g6-wgrg-vhm7"
  ],
  "database_specific": {
    "license": "CC0-1.0"
  },
  "details": "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.",
  "id": "RUSTSEC-2026-0276",
  "modified": "2026-09-02T08:56:54Z",
  "published": "2026-08-26T12:00:00Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://crates.io/crates/apimock"
    },
    {
      "type": "ADVISORY",
      "url": "https://rustsec.org/advisories/RUSTSEC-2026-0276.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com/apimokka/apimock-rs/commit/a9c05fec2d36a750c30e797291a0557f230c8faf"
    }
  ],
  "related": [],
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Path traversal in apimock\u0027s file-serving fallback"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…