CVE-2026-12522 — The HL7800 cellular modem driver's +CGCONTRDP: response handler on_cmd_atcmdinfo_ipaddr()…¶
Key facts
CVE-2026-12522 is a High (8.8) vulnerability: The HL7800 cellular modem driver's +CGCONTRDP: response handler on_cmd_atcmdinfo_ipaddr()…. This entry ships a detection-only PoC and a Docker test lab.
| CVE | CVE-2026-12522 |
| Severity | High (8.8) |
| Detection / prevention | — |
| PoC | poc.py |
| Source | 2026/CVE-2026-12522/ |
Details¶
English | 한국어
Description¶
The HL7800 cellular modem driver's +CGCONTRDP: response handler on_cmd_atcmdinfo_ipaddr() in drivers/modem/vendor_standalone/hl7800.c parses the PDP-context dynamic parameters (local address, subnet mask, gateway, and DNS servers) that the cellular network assigns to the device. The response is linearized into a 256-byte stack buffer, after which each address field length is computed from comma/. delimiter positions in the network-supplied data and used directly as the length argument to strncpy() into the fixed 64-byte stack buffer temp_addr_str (and the 16-byte iface_ctx.dns_v4_string).
Because the field length is derived from attacker-controlled delimiter positions and was not bounded against the destination buffer, a single field can be far larger than 64 bytes. A malicious or impersonated cellular network (for example a rogue base station) can return a crafted +CGCONTRDP response with an overlong address field, causing strncpy() to write past temp_addr_str on the modem worker thread's stack, plus an out-of-bounds NUL write at temp_addr_str[addr_len].
No device-side privileges or user interaction are required: the device itself issues the AT+CGCONTRDP=1 query during normal network attach and parses whatever the network returns. The overflow corrupts adjacent stack memory in supervisor context, yielding at minimum a remotely triggerable crash and potentially control-flow hijacking on targets without stack protection.
The fix bounds every field length against its destination buffer (temp_addr_str and dns_v4_string) before each copy, rejecting overlong fields.
Vulnerability Details¶
| Property | Value |
|---|---|
| CVE ID | CVE-2026-12522 |
| Type | RCE |
| CVSS Score | 8.8 |
Proof of Concept¶
Download¶
# Download PoC script
curl -O https://raw.githubusercontent.com/fankh/vulnerability-poc/main/2026/CVE-2026-12522/poc.py
Usage¶
# Run PoC against target
python3 poc.py --target <TARGET_URL>
# With authentication
python3 poc.py --target <TARGET_URL> --username <USER> --password <PASS>
⚠️ Warning: This PoC is for authorized security testing only. It uses detection-only techniques and does not exploit or damage target systems.
Test Lab¶
This repository includes a Docker-based test environment with both vulnerable and patched applications.
Quick Start¶
# Clone and navigate to CVE directory
cd CVE-2026-12522
# Start both applications
docker-compose up -d
# Run tests
./run-tests.sh # Linux/Mac
./run-tests.ps1 # Windows PowerShell
Application Endpoints¶
| Application | URL | Status |
|---|---|---|
| Vulnerable App | http://localhost:8080 | Shows vulnerability |
| Patched App | http://localhost:8081 | Demonstrates fix |
Directory Structure¶
├── README.md # English documentation
├── README_KO.md # Korean documentation
├── poc.py # PoC detection script
├── docker-compose.yml # Container orchestration
├── run-tests.sh # Linux/Mac test runner
├── run-tests.ps1 # Windows test runner
├── vulnerable-app/ # Vulnerable version
│ ├── app.py
│ ├── Dockerfile
│ └── requirements.txt
└── patched-app/ # Fixed version
├── app.py
├── Dockerfile
└── requirements.txt
References¶
- https://github.com/zephyrproject-rtos/zephyr/commit/a1cbced64181bc0bdf95e1fd7118f2bb70cf679b
- https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-hchc-6489-w66v
Generated by PoC Generator on 2026-08-23T19:29:45.015356496
Frequently asked questions¶
What is CVE-2026-12522?¶
CVE-2026-12522 is a High (8.8) vulnerability: The HL7800 cellular modem driver's +CGCONTRDP: response handler on_cmd_atcmdinfo_ipaddr()…. This entry ships a detection-only PoC and a Docker test lab.
How do I detect CVE-2026-12522?¶
Run the detection-only PoC included with this entry against your Docker test lab to confirm whether a target is affected; pair it with your own IDS logging.
How do I block or mitigate CVE-2026-12522?¶
Upgrade to a fixed version per the vendor advisory; the NVD record lists the affected versions. Use the included PoC to verify your remediation.
For authorized security testing and research only. See the full source and NVD record.