Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privileged local or LuCI access
-
DeliveryInvoke create_selfsigned() with 2040-bit RSA key
-
Exploitasn1_add_obj miscalculates BIT STRING allocation
-
Executionmemcpy writes 1 byte past heap buffer
-
ImpactHeap corruption causes crash or enables memory manipulation
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires local access with low privileges (CVSS PR:L, AV:L) - specifically, the ability to invoke the create_selfsigned() function via luci-lib-px5g's exported Lua interface, either directly through a local Lua runtime or indirectly through a LuCI web interface feature that triggers certificate generation. The overflow is only triggered when the RSA key size produces a 255-byte signature (specifically a 2040-bit RSA key), as this is the boundary condition where the DER length encoding requires an extra octet that the allocation does not account for. Remote exploitation is NOT confirmed as a baseline condition - whether this is reachable from the network depends entirely on whether the embedding application exposes the certificate-generation interface externally. Limiting factors: the attacker must control or predict the key size used, must have local access or access to an exposed LuCI feature, and the one-byte overflow is a constrained primitive that limits reliable arbitrary code execution without heap grooming. |
| Impact | The provided CVSS 4.0 score of 6.9 with vector AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N correctly captures the local-access, low-privilege attack surface. The high availability impact reflects that heap corruption from a one-byte overflow can reliably crash the certificate-signing process or, in adverse heap layouts, cause broader memory corruption. Confidentiality and integrity impacts are rated low, consistent with limited control over the written byte and typical heap overflow unpredictability. Critically, the CVSS local attack vector aligns with the description's explicit caveat that remote exploitability 'depends on the embedding application' - remote risk is conditional, not baseline. EPSS data is not available in the provided intelligence, and this CVE is absent from the CISA KEV catalog, indicating no confirmed mass or active exploitation. The absence of a patch (the package was removed rather than fixed) is a notable remediation signal: operators cannot simply upgrade to a patched luci-lib-px5g version on supported release branches. The one-byte overflow, while precise in its trigger, limits practical exploit reliability for arbitrary code execution without additional heap grooming, making this a real but bounded risk. |
| Exploit ScenarioDerived | A locally authenticated attacker with low-level access to an OpenWrt device - such as a non-root shell user with Lua runtime access or a web interface account permitted to generate certificates - invokes create_selfsigned() and supplies or triggers a 2040-bit RSA key, causing the ASN.1 encoder to overflow the heap buffer by one byte during signature encoding. In a worst-case heap layout, this overwrites a heap metadata field or adjacent allocation, potentially enabling a crash of the certificate service or, with targeted heap grooming, escalation to arbitrary code execution within the LuCI process context. No public proof-of-concept has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 22, 2026
Heap-based buffer overflow in luci-lib-px5g's native ASN.1 encoding routine allows a locally authenticated attacker to write one byte beyond a heap-allocated buffer during certificate signing, with a high availability impact and limited confidentiality and integrity exposure. The flaw is triggered specifically when signing with a 2040-bit RSA key via the exported Lua interface create_selfsigned(), where a DER length encoding miscalculation causes an allocation of 259 bytes for a payload requiring 260. Remote exploitability is not confirmed - it depends entirely on whether the embedding application exposes this interface externally. No public exploit code has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.
RemediationAI
No vendor-released patched version of luci-lib-px5g exists for the affected release branches - the upstream resolution was removal of the package from the master branch rather than a code fix. Operators on openwrt-18.06 through openwrt-25.12 should remove or disable the luci-lib-px5g package if it is not required for operation; note that removing it will disable any LuCI functionality that invokes create_selfsigned() for self-signed certificate generation, requiring an alternative certificate provisioning method (e.g., pre-generated certificates or an external CA). If the package cannot be removed, restrict access to the LuCI interface that exposes certificate generation to trusted administrative users only, reducing the attack surface to high-privilege local actors. Migrating to OpenWrt master (where the package is absent) is the definitive remediation. The security advisory is available at https://github.com/openwrt/luci/security/advisories/GHSA-jgc3-4q3p-g6xh and VulnCheck details at https://www.vulncheck.com/advisories/luci-lib-px5g-2040-bit-certificate-signing-heap-buffer-overflow.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerable component is luci-lib-px5g, a Lua-accessible PKI library embedded in LuCI (the web interface for OpenWrt), implementing RSA key generation and X.509 certificate signing via a minimal mbedTLS-derived codebase. The root cause (CWE-122: Heap-Based Buffer Overflow) is an off-by-one error in the asn1_add_obj function within x509write.c. When encoding a BIT STRING for a 255-byte RSA signature, the DER length field for values 128-255 bytes requires a two-byte encoding (0x81 0xFF), but the allocation routine computes heap size from the inner length only. Combined with the mandatory unused-bits prefix byte, the final write requires 260 bytes (tag=1 + length=2 + unused-bits=1 + payload=255 + rounding=1) while only 259 bytes are allocated, causing the final memcpy to write one byte past the heap buffer. The flaw is surfaced through the Lua binding create_selfsigned() and is present across all OpenWrt release branches from openwrt-18.06 through openwrt-25.12, per CPE cpe:2.3:a:openwrt:luci:*:*:*:*:*:*:*:*.
Know when Luci gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
Local vector with low privileges since create_selfsigned() requires authenticated Lua or LuCI access; high availability reflects heap corruption crash potential; low C/I since one-byte overflow offers limited controlled impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
luci-lib-px5g (LuCI) contains a heap-based buffer overflow in the native ASN.1 encoding routine asn1_add_obj (x509write.c) when signing a certificate with a 2040-bit RSA key. For a 255-byte signature, the BIT STRING allocation is computed from the DER length encoding of 255 bytes, but the payload written after prepending the unused-bits byte is 256 bytes, requiring one additional DER length octet. As a result the allocation is 259 bytes while the tag, length, unused-bits byte, and signature require 260 bytes, and the final memcpy writes one byte beyond the heap buffer. The overflow is reachable through the exported Lua interface via create_selfsigned(); whether it is remotely exploitable depends on the embedding application. The vulnerable code is present on the openwrt-18.06 through openwrt-25.12 release branches and is absent from master, where the luci-lib-px5g package has been removed rather than patched.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.
Stored cross-site scripting in OpenWrt's LuCI web interface lets an adjacent-network attacker inject executable HTML/Jav
In OpenWrt LuCI through 0.10, the endpoints admin/status/realtime/bandwidth_status and admin/status/realtime/wireless_st
LuCI openwrt-22.03 branch git-22.361.69894-438c598 was discovered to contain a reflected cross-site scripting (XSS) vuln
OpenWRT LuCI version git-22.140.66206-02913be was discovered to contain a stored cross-site scripting (XSS) vulnerabilit
In OpenWrt LuCI git-20.x, remote unauthenticated attackers can retrieve the list of installed packages and services. Rat
OS command injection in OpenWrt's luci-app-dockerman grants any authenticated user holding only the read ACL full root-l
Root command injection in OpenWrt's LuCI web interface (luci-proto-openvpn through 0.11.1) lets an authenticated user wi
Authenticated delegated LuCI sessions that hold the luci-app-advanced-reboot read ACL can execute arbitrary commands as
Privilege escalation to root in OpenWrt's luci-app-samba4 (LuCI web interface) lets authenticated delegated users invoke
Unauthenticated path traversal in OpenWrt's luci-app-bmx7 package exposes arbitrary files on affected routers via the bm
Ban-list poisoning in OpenWrt's luci-app-banip (banIP) before 1.8.10 lets an unauthenticated remote attacker steer the a
Stored cross-site scripting in OpenWrt's luci-app-upnp lets an unauthenticated LAN client persist a JavaScript payload t
EUVD-2026-64273
GHSA-g4fj-xr23-w9hm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB