The HL7800 stack overflow (CVE-2026-12522) is a bounds-checking failure in how the modem driver parses the +CGCONTRDP AT response — it extracts comma-delimited fields from network-supplied data, computes lengths from delimiter positions, and passes those lengths directly to strncpy() without any guard against overflow. The root cause is a systematic trust model error: cellular modem integration teams treat network responses as implicitly trusted, despite the modem sitting behind an exposed radio interface where rogue base stations, compromised carrier infrastructure, and IMSI catchers are established threat vectors. The fix is mechanically trivial — apply min(length, sizeof(buffer) - 1) before every strncpy() — but the vulnerability likely exists across other +CGCONTRDP fields and potentially across the entire AT response handler architecture. The deeper problem is that this pattern reflects a structural gap in how cellular modem drivers are developed: vendor reference code gets integrated as-is, the AT parsing layer lacks a safe field extraction API with built-in bounds checking, and no adversarial parser fuzzing discipline has been applied to AT command interfaces the way it was applied to HTTP parsers starting in 2003. This isn't an isolated flaw — it's a vulnerability class that persists because the modem driver ecosystem operates in an epistemic bubble separate from generalist security learnings. Check your HL7800 firmware for other +CGCONTRDP field handlers and audit any modem driver that parses comma-delimited AT responses using delimiter-computed lengths against fixed buffers. If you're integrating a cellular modem, abstract field extraction into a safe parsing API at the framework layer rather than patching individual command handlers — that eliminates the entire class going forward.
CVE-2026-12522
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedThe 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysisThe program writes past the bounds of a buffer, overwriting adjacent memory an attacker can turn to their advantage. Crafted input can overwrite control data and redirect execution. Remediation is validating every index and length before a write, plus modern memory-safety mitigations.
General guidance for the out-of-bounds write class — the official description and references above are authoritative for this specific CVE. Want a bespoke review and a reviewed fix? Ask our team →
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Adjacent
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedZephyr version containing commit a1cbced64181bc0bdf95e1fd7118f2bb70cf679b (check Zephyr release notes for the version this fix was merged into)
- Obtain the patched version of drivers/modem/vendor_standalone/hl7800.c from commit a1cbced64181bc0bdf95e1fd7118f2bb70cf679b in the zephyrproject-rtos/zephyr repository
- Review the diff to confirm the bounds checking has been added for temp_addr_str (64-byte buffer) and dns_v4_string (16-byte buffer) before each strncpy() call
- Apply the patch to your local copy of the Zephyr source tree
- Rebuild the firmware with the patched modem driver
- Flash the updated firmware to devices using the HL7800 cellular modem
Generated from the published advisory — verify against the referenced sources before acting.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-12522 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesThe HL7800 stack overflow (CVE-2026-12522) is a bounds-checking failure in how the modem driver parses the +CGCONTRDP AT response — it extracts comma-delimited fields from network-supplied data, computes lengths from delimiter positions, and passes those lengths directly to strncpy() without any guard against overflow. The root cause is a systematic trust model error: cellular modem integration teams treat network responses as implicitly trusted, despite the modem sitting behind an exposed radio interface where rogue base stations, compromised carrier infrastructure, and IMSI catchers are established threat vectors. The fix is mechanically trivial — apply min(length, sizeof(buffer) - 1) before every strncpy() — but the vulnerability likely exists across other +CGCONTRDP fields and potentially across the entire AT response handler architecture. The deeper problem is that this pattern reflects a structural gap in how cellular modem drivers are developed: vendor reference code gets integrated as-is, the AT parsing layer lacks a safe field extraction API with built-in bounds checking, and no adversarial parser fuzzing discipline has been applied to AT command interfaces the way it was applied to HTTP parsers starting in 2003. This isn't an isolated flaw — it's a vulnerability class that persists because the modem driver ecosystem operates in an epistemic bubble separate from generalist security learnings. Check your HL7800 firmware for other +CGCONTRDP field handlers and audit any modem driver that parses comma-delimited AT responses using delimiter-computed lengths against fixed buffers. If you're integrating a cellular modem, abstract field extraction into a safe parsing API at the framework layer rather than patching individual command handlers — that eliminates the entire class going forward.
Practitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-12522 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data