CVE-2025-67124: Miniserve Miniserve Affected By A TOCTOU Vulnerability

MODERATE
Advisory Identifier: GHSA-mxc8-4jqf-368q
CWE-367 CWE-59
Published
Advisory Summary

CVE-2025-67124 is a MODERATE miniserve affected by a toctou vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Miniserve libraries in the crates.io ecosystem. The issue involves miniserve affected by a toctou and symlink race vulnerability. Remediation is available by upgrading affected packages to version 0.32.0.

CVE-2025-67124 at a Glance

CVE Identifier CVE-2025-67124
GHSA Identifier GHSA-mxc8-4jqf-368q
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
Affected Product Miniserve
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-67124

To remediate this vulnerability, upgrade all affected Miniserve dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

miniserve fixed: 0.32.0
Upgrade miniserve to 0.32.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for miniserve

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-67124, inspect your project dependencies for Miniserve:

inspect dependencies for miniserve

Analyze the terminal output to locate any version of Miniserve in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.32.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Miniserve, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A TOCTOU and symlink race in svenstaro/miniserve 0.32.0 upload finalization (when uploads are enabled) can allow an attacker to overwrite arbitrary files outside the intended upload/document root in deployments where the attacker can create/replace filesystem entries in the upload destination directory (e.g., shared writable directory/volume).

CVE-2025-67124 Affected Miniserve Versions

1 component(s)
Fixed Versions:
0.32.0
Product / Package Ecosystem Affected Versions Fixed Version
miniserve
crates.io
< 0.32.0
0.32.0

References

Frequently Asked Questions

What is CVE-2025-67124?
CVE-2025-67124 is a security vulnerability in Miniserve involving miniserve affected by a TOCTOU and symlink race vulnerability under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition.
Which Miniserve versions are affected?
Affected versions include releases prior to 0.32.0 across affected packages: miniserve.
What version fixes CVE-2025-67124?
Upgrading to 0.32.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is miniserve affected?
Yes, miniserve is affected in releases prior to 0.32.0. Upgrade your dependency to 0.32.0 or later.
What CWE is associated with CVE-2025-67124?
CVE-2025-67124 is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition (The product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check.).
How can I check crates.io dependencies for CVE-2025-67124?
Run the dependency tree command: 'inspect dependencies for miniserve'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mxc8-4jqf-368q",
  "modified" : "2026-01-23T20:16:21Z",
  "published" : "2026-01-23T18:31:28Z",
  "aliases" : [ "CVE-2025-67124" ],
  "summary" : "miniserve affected by a TOCTOU and symlink race vulnerability",
  "details" : "A TOCTOU and symlink race in svenstaro/miniserve 0.32.0 upload finalization (when uploads are enabled) can allow an attacker to overwrite arbitrary files outside the intended upload/document root in deployments where the attacker can create/replace filesystem entries in the upload destination directory (e.g., shared writable directory/volume).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "miniserve"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.32.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-67124"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/thesmartshadow/55688f87f8b985eb530e07d00ef8c63f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/svenstaro/miniserve"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-367", "CWE-59" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-23T20:16:21Z",
    "nvd_published_at" : "2026-01-23T16:15:52Z"
  }
}