Sceawere
Vulnerability Detail
CVE-2026-62381UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
LuCI px5g Heap Buffer Overflow
Vulnerability Metadata
- Severity
- Medium
- Score / CVSS
- 6.6
- Creation Date
- 4h ago
- Vendor
- openwrt
- Product
- luci
- Attack Type
- Heap-based Buffer Overflow
- Vector String
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
- Attack Complexity
- LOW
Narrative and Response
Description
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.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "6.6",
"pubDate": "2026-08-22T13:16:39.957Z",
"pubdate": "2026-08-22T13:16:39.957Z",
"executiveSummary": "This vulnerability is a heap-based buffer overflow affecting the native ASN.1 encoding routine within the luci-lib-px5g library of LuCI. The flaw occurs during the certificate signing process when utilizing a 2040-bit RSA key, specifically resulting in an off-by-one memory corruption due to an inaccurate DER length calculation and subsequent payload write. The impact of this vulnerability includes potential heap memory corruption, which can lead to application crashes or arbitrary code execution depending on the specific memory layout and embedding application. Affected systems include installations running the openwrt-18.06 through openwrt-25.12 release branches containing the vulnerable luci-lib-px5g package. The risk implications are significant for embedded devices utilizing LuCI for certificate generation, as an attacker with access to the vulnerable interface could trigger the fault. Attack capabilities include interacting with the exported Lua interface via the create_selfsigned() function. Exploitation requirements depend heavily on the embedding application's exposure and whether unauthenticated or authenticated users can invoke the self-signed certificate creation routine.",
"technicalDetails": "The vulnerability resides in the native ASN.1 encoding routine asn1_add_obj located in x509write.c within the luci-lib-px5g library of LuCI. The root cause of the heap-based buffer overflow stems from a discrepancy in memory allocation sizing versus the actual data written during the encoding of a certificate signed with a 2040-bit RSA key. Specifically, for a 255-byte signature, the BIT STRING allocation size is computed based on a DER length encoding that assumes a smaller footprint. However, the actual payload written includes an additional prepended unused-bits byte, totaling 256 bytes of payload data. This transition requires one additional DER length octet. Consequently, the heap allocation yields 259 bytes, whereas the resulting structure comprising the tag, length, unused-bits byte, and signature consumes 260 bytes. During the final memcpy operation, exactly one byte is written beyond the bounds of the allocated heap buffer, resulting in a heap-based buffer overflow. The vulnerable component is the luci-lib-px5g package, specifically present across the openwrt-18.06 through openwrt-25.12 release branches. The flaw is absent in the master branch because the luci-lib-px5g package has been entirely removed rather than patched. The attack flow begins when a caller invokes the exported Lua interface function create_selfsigned(). This function triggers the vulnerable ASN.1 encoding routine with parameters that invoke the incorrect DER length calculation for a 2040-bit RSA key signature. The execution flow proceeds through the allocation of the miscalculated buffer size in memory. As the routine executes the final memcpy operation to append the tag, length, unused-bits byte, and the 255-byte signature payload, the boundary check fails to account for the extra byte required by the DER length expansion. The payload behavior writes one out-of-bounds byte onto the heap, corrupting adjacent heap metadata or adjacent heap objects. Depending on heap layout and allocator state, this primitive can be leveraged for denial of service via application crashes or potentially escalated to arbitrary code execution if weaponized against the embedding application. Authentication and privilege requirements vary by deployment context, as remote or local exposure depends strictly on how the embedding application exposes the create_selfsigned() Lua interface to end users or external inputs."
}