Security Vulnerability Report
中文
CVE-2025-31133 CVSS 7.8 HIGH

CVE-2025-31133

Published: 2025-11-06 19:15:41
Last Modified: 2025-12-03 18:30:15

Description

runc is a CLI tool for spawning and running containers according to the OCI specification. In versions 1.2.7 and below, 1.3.0-rc.1 through 1.3.1, 1.4.0-rc.1 and 1.4.0-rc.2 files, runc would not perform sufficient verification that the source of the bind-mount (i.e., the container's /dev/null) was actually a real /dev/null inode when using the container's /dev/null to mask. This exposes two methods of attack: an arbitrary mount gadget, leading to host information disclosure, host denial of service, container escape, or a bypassing of maskedPaths. This issue is fixed in versions 1.2.8, 1.3.3 and 1.4.0-rc.3.

CVSS Details

CVSS Score
7.8
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:linuxfoundation:runc:1.4.0:rc1:*:*:*:*:*:* - VULNERABLE
cpe:2.3:a:linuxfoundation:runc:1.4.0:rc2:*:*:*:*:*:* - VULNERABLE
runc <= 1.2.7
runc 1.3.0-rc.1 - 1.3.1
runc 1.4.0-rc.1
runc 1.4.0-rc.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-31133 PoC - runc bind mount verification bypass # This PoC demonstrates creating a fake /dev/null to exploit the bind mount vulnerability # Create a fake /dev/null device (a regular file instead of a real device) # In a vulnerable runc version, this can be used to bypass maskedPaths FAKE_DEV_NULL="/tmp/fake_dev_null" TARGET_PATH="/etc/passwd" # Create a regular file to act as fake /dev/null echo "malicious content" > "$FAKE_DEV_NULL" # Attempt to bind mount the fake /dev/null over protected paths # This exploits the insufficient verification in runc's mount handling # Note: Actual exploitation requires specific container configuration and runc version # Example attack scenario: # 1. Attacker creates fake /dev/null in container # 2. Uses runc's mount functionality to bind mount it over sensitive paths # 3. Due to insufficient verification, the mount succeeds # 4. Attacker can now read/write to normally masked paths # Cleanup rm -f "$FAKE_DEV_NULL" echo "PoC demonstrates the concept of creating fake /dev/null for bind mount attack"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-31133", "sourceIdentifier": "[email protected]", "published": "2025-11-06T19:15:41.343", "lastModified": "2025-12-03T18:30:15.430", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "runc is a CLI tool for spawning and running containers according to the OCI specification. In versions 1.2.7 and below, 1.3.0-rc.1 through 1.3.1, 1.4.0-rc.1 and 1.4.0-rc.2 files, runc would not perform sufficient verification that the source of the bind-mount (i.e., the container's /dev/null) was actually a real /dev/null inode when using the container's /dev/null to mask. This exposes two methods of attack: an arbitrary mount gadget, leading to host information disclosure, host denial of service, container escape, or a bypassing of maskedPaths. This issue is fixed in versions 1.2.8, 1.3.3 and 1.4.0-rc.3."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X", "baseScore": 7.3, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "LOW", "userInteraction": "ACTIVE", "vulnConfidentialityImpact": "HIGH", "vulnIntegrityImpact": "HIGH", "vulnAvailabilityImpact": "HIGH", "subConfidentialityImpact": "HIGH", "subIntegrityImpact": "HIGH", "subAvailabilityImpact": "HIGH", "exploitMaturity": "NOT_DEFINED", "confidentialityRequirement": "NOT_DEFINED", "integrityRequirement": "NOT_DEFINED", "availabilityRequirement": "NOT_DEFINED", "modifiedAttackVector": "NOT_DEFINED", "modifiedAttackComplexity": "NOT_DEFINED", "modifiedAttackRequirements": "NOT_DEFINED", "modifiedPrivilegesRequired": "NOT_DEFINED", "modifiedUserInteraction": "NOT_DEFINED", "modifiedVulnConfidentialityImpact": "NOT_DEFINED", "modifiedVulnIntegrityImpact": "NOT_DEFINED", "modifiedVulnAvailabilityImpact": "NOT_DEFINED", "modifiedSubConfidentialityImpact": "NOT_DEFINED", "modifiedSubIntegrityImpact": "NOT_DEFINED", "modifiedSubAvailabilityImpact": "NOT_DEFINED", "Safety": "NOT_DEFINED", "Automatable": "NOT_DEFINED", "Recovery": "NOT_DEFINED", "valueDensity": "NOT_DEFINED", "vulnerabilityResponseEffort": "NOT_DEFINED", "providerUrgency": "NOT_DEFINED"}}], "cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H", "baseScore": 7.8, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.1, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-61"}, {"lang": "en", "value": "CWE-363"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:*", "versionEndExcluding": "1.2.8", "matchCriteriaId": "889E52A1-D7B0-4DC8-BD63-9413A1DD9EEB"}, {"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:runc:*:*:*:*:*:*:*:*", "versionStartIncluding": "1.3.0", "versionEndExcluding": "1.3.3", "matchCriteriaId": "F3193A96-E882-439B-984E-782315C62F69"}, {"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:runc:1.4.0:rc1:*:*:*:*:*:*", "matchCriteriaId": "082E3496-822B-481B-AC2F-DA8DCAFC28FF"}, {"vulnerable": true, "criteria": "cpe:2.3:a:linuxfoundation:runc:1.4.0:rc2:*:*:*:*:*:*", "matchCriteriaId": "71C62E90-6357-44A4-B582-28B1F1D9B16D"}]}]}], "references": [{"url": "https://github.com/opencontainers/runc/commit/1a30a8f3d921acbbb6a4bb7e99da2c05f8d48522", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opencontainers/runc/commit/5d7b2424072449872d1cd0c937f2ca25f418eb66", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opencontainers/runc/commit/8476df83b534a2522b878c0507b3491def48db9f", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opencontainers/runc/commit/db19bbed5348847da433faa9d69e9f90192bfa64", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/opencontainers/runc/security/advisories/GHSA-9493-h29p-rfm2", "source": "[email protected]", "tags": ["Mitigation", "Patch", "Third Party Advisory"]}]}}