DrayTek Vigor2960 mainfunction.cgi json_load_lock Stack Buffer Overflow (CVE-2026-132141)
Detects exploitation attempts against a stack-based buffer overflow (CWE-121/CWE-119) in the json_load_lock function reachable via the jsonstatus/useFile handling of /cgi-bin/mainfunction.cgi on DrayTek Vigor2960 routers running firmware up to 1.5.1.6. The overflow is triggered by an oversized useFile parameter supplied to mainfunction.cgi. The write-up states an authenticated administrator session is required. Stack corruption can crash the request CGI and may allow further code execution. This detection looks for HTTP requests to mainfunction.cgi with abnormally long parameter values and jsonstatus/useFile markers in firewall, proxy, WAF and network logs. CVSS 8.6. Exploit status: public (a proof-of-concept is published in the referenced write-up). Patched in firmware v1.5.1.7.
Vulnerability Intelligence
TheoreticalAffected Software
- Vendor
- DrayTek
- Product
- Vigor2960
- Versions
- up to 1.5.1.6
Timeline
- Disclosed
- November 18, 2026
References & Proof of Concept
- PoChttps://github.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0023-authenticated-jsonstatus-usefile-stack-overflow
- https://fw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.7/Vigor2960_v1.5.1.7.zip
- https://vuldb.com/cve/CVE-2026-132141
- https://vuldb.com/submit/1044968
- https://vuldb.com/vuln/439441
- https://vuldb.com/vuln/439441/cti
CVSS
What is CVE-2026-132141 DrayTek Vigor2960 mainfunction.cgi json_load_lock Stack Buffer Overflow (CVE-2026-132141)?
DrayTek Vigor2960 mainfunction.cgi json_load_lock Stack Buffer Overflow (CVE-2026-132141) (CVE-2026-132141) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for DrayTek Vigor2960 mainfunction.cgi json_load_lock Stack Buffer Overflow (CVE-2026-132141), covering the data sources and telemetry it touches: Firewall, Web Proxy, WAF, Network IDS. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-a0eb31161d · https://df00tech.com/detections/CVE-2026-132141 · licence: https://df00tech.com/detections/licence
// DrayTek Vigor2960 mainfunction.cgi json_load_lock overflow (CVE-2026-132141)
let overflowThreshold = 2000;
CommonSecurityLog
| where DeviceVendor in~ ("DrayTek", "Zscaler", "Fortinet", "Palo Alto Networks") or isnotempty(RequestURL)
| where RequestURL has "/cgi-bin/mainfunction.cgi"
| extend ReqBody = coalesce(column_ifexists("RequestContext", ""), AdditionalExtensions)
| where RequestURL has_any ("jsonstatus", "useFile", "json_load", "useFile=") or ReqBody has_any ("jsonstatus", "useFile", "json_load")
| extend ParamLen = strlen(RequestURL) + strlen(tostring(ReqBody))
| where ParamLen > overflowThreshold or RequestURL matches regex @"(?i)useFile=[^&\s]{512,}" or ReqBody matches regex @"(?i)useFile=[^&\s]{512,}"
| project TimeGenerated, SourceIP, DestinationIP, DestinationPort, RequestMethod, RequestURL, ParamLen, DeviceVendor, DeviceProduct
| sort by TimeGenerated desc Flags HTTP requests to /cgi-bin/mainfunction.cgi referencing the jsonstatus/useFile handlers with oversized parameter content consistent with the json_load_lock stack overflow, as seen in firewall/proxy/WAF logs forwarded to Sentinel via CommonSecurityLog.
Data Sources
Required Tables
False Positives
- Legitimate administrative polling of the Vigor2960 status JSON endpoints with large but benign payloads
- Vulnerability scanners and authorized penetration testing tools probing mainfunction.cgi
- Security appliances that normalize or pad URLs, inflating measured parameter length
Query fingerprint DF00-a0eb31161d · licence
Sigma logsource & community rules
The detection logic for DrayTek Vigor2960 mainfunction.cgi json_load_lock Stack Buffer Overflow (CVE-2026-132141) (CVE-2026-132141) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: network_connection
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-132141
References (5)
- https://fw.draytek.com.tw/Vigor2960/Firmware/v1.5.1.7/Vigor2960_v1.5.1.7.zip
- https://github.com/yikesoftware/DrayTek_Vigor2960_Security_Analysis/tree/main/cases/DRV2960-0023-authenticated-jsonstatus-usefile-stack-overflow
- https://vuldb.com/cve/CVE-2026-132141
- https://vuldb.com/vuln/439441
- https://vuldb.com/vuln/439441/cti
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Oversized useFile parameter to mainfunction.cgi
Expected signal: Firewall/proxy log entry for a request to /cgi-bin/mainfunction.cgi with a multi-kilobyte URL and useFile parameter.
- Test 2 jsonstatus json_load_lock fuzz pattern
Expected signal: Proxy/WAF log showing a POST to mainfunction.cgi with an oversized useFile body parameter.
- Test 3 Non-printable overflow payload
Expected signal: Network log with a long, high-entropy useFile parameter directed at mainfunction.cgi.
Response Playbook
Triage
- Confirm the target IP is a DrayTek Vigor2960 and identify its firmware version; versions up to 1.5.1.6 are vulnerable while v1.5.1.7 is patched.
- Extract the full request to /cgi-bin/mainfunction.cgi and measure the length and content of the jsonstatus/useFile parameters; genuine overflow attempts contain hundreds-to-thousands of bytes or non-printable data.
- Determine whether the request was authenticated (valid session cookie/token) since the write-up states the vulnerability requires authentication, and identify which admin account or credential was used.
- Check whether the router responded with an error, reset the connection, or rebooted shortly after the request, indicating a successful crash.
Containment
- Block the source IP at the perimeter and restrict management-plane access to mainfunction.cgi to trusted admin networks/VPN only.
- Upgrade affected Vigor2960 devices to firmware v1.5.1.7 or later and disable remote (WAN-side) administration until patched.
- Rotate all DrayTek administrator credentials, as the write-up describes the exploit path as authenticated and the credential may be compromised.
Evidence Collection
- Capture and preserve the full HTTP request/response pair, including headers, cookies and body, from firewall/proxy/WAF logs.
- Collect the router's syslog, crash logs and any core dumps around the event timestamp to establish whether json_load_lock faulted.
- Preserve authentication logs correlating the session token used in the request to a specific admin account and source.
Escalation Criteria
- ! Escalate to incident response if the router rebooted, became unreachable, or shows signs of configuration tampering or new accounts after the request.
- ! Escalate if the same source successfully authenticated and then issued oversized mainfunction.cgi requests, indicating an active compromise rather than scanning.
- ! Escalate if outbound connections, DNS changes, or firmware modification are observed on the device following the suspected exploitation.
Investigation Guide
Forensic Artifacts
- >
Router syslog/crash logs showing a fault in the json_load_lock/CGI handler - >
Firewall/proxy access logs containing oversized jsonstatus/useFile requests to mainfunction.cgi - >
Device NVRAM/config diffs showing unexpected changes after the event
Tuning Guidance
Baseline the normal length and content of legitimate jsonstatus/useFile requests from your management stations and raise the overflow length threshold above that baseline to cut noise. Whitelist authorized scanner and admin source IPs. If management traffic is only internal, restrict the detection to WAN-sourced requests to focus on untrusted exploitation attempts.
Hunting Queries
Surfaces source IPs sending unusually long requests to mainfunction.cgi over time, highlighting probing or fuzzing against the json_load_lock handler.
// df00tech DF00-a0eb31161d · https://df00tech.com/detections/CVE-2026-132141 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "/cgi-bin/mainfunction.cgi" | extend L = strlen(RequestURL) | summarize max(L), count() by SourceIP, bin(TimeGenerated, 1h) | where max_L > 1500 ``` df00tech DF00-a0eb31161d · https://df00tech.com/detections/CVE-2026-132141 · licence: https://df00tech.com/detections/licence ```
index=proxy OR index=firewall url="*/cgi-bin/mainfunction.cgi*" | eval L=len(url) | stats max(L) as maxlen count by src_ip | where maxlen>1500 Atomic Red Team Tests
Sends an authenticated-style request with an extremely long useFile parameter to simulate the json_load_lock stack overflow trigger against a lab Vigor2960.
Command
curl -sk "https://192.0.2.10/cgi-bin/mainfunction.cgi?action=jsonstatus&useFile=$(python3 -c 'print("A"*4096)')" -b "session=LABTOKEN" -o /dev/null -w '%{http_code}\n' Cleanup
echo 'No persistent artifacts; power-cycle the lab router if it crashed.' Expected Telemetry
Firewall/proxy log entry for a request to /cgi-bin/mainfunction.cgi with a multi-kilobyte URL and useFile parameter.
Expected Detection
KQL/SPL rules fire on ParamLen exceeding the overflow threshold with jsonstatus/useFile markers.
Issues a POST with a json_load-style body containing a long payload to exercise the vulnerable code path.
Command
curl -sk -X POST "https://192.0.2.10/cgi-bin/mainfunction.cgi" -b "session=LABTOKEN" --data "action=jsonstatus&json_load=1&useFile=$(python3 -c 'print("B"*2048)')" Cleanup
echo 'No cleanup required beyond verifying the device recovered.' Expected Telemetry
Proxy/WAF log showing a POST to mainfunction.cgi with an oversized useFile body parameter.
Expected Detection
SPL/Elastic/Chronicle rules match on the long useFile value in the request body or query.
Sends a useFile value containing non-ASCII bytes to mimic a shellcode-bearing overflow attempt.
Command
python3 -c "import urllib.request,urllib.parse; p=urllib.parse.quote(b'\x90'*1024+b'\xcc'*512); urllib.request.urlopen('https://192.0.2.10/cgi-bin/mainfunction.cgi?action=jsonstatus&useFile='+p)" Cleanup
echo 'Reboot lab router if unresponsive.' Expected Telemetry
Network log with a long, high-entropy useFile parameter directed at mainfunction.cgi.
Expected Detection
Length- and regex-based rules flag the oversized high-entropy useFile parameter.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040