CVE-2026-62381
JSON

6.9medium

luci-lib-px5g 2040-bit Certificate Signing Heap Buffer Overflow

Severity
6.9medium CVSS:4.0 by VulnCheck
Exploit likelihood
0.10% (higher than 0% of CVEs)
Published
Last changed
Assigned by
VulnCheck

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.

Affected

Product or packageVersionsReported by
luci-lib-px5gup to 42d72f79cd8f057f241595abc761b39dab2d9f07CVE List

All scores

VulnCheck6.9medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
VulnCheck6.6medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H

Classification

CWE-122

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

luci-lib-px5g (LuCI) contiene un desbordamiento de búfer basado en montículo en la rutina de codificación ASN.1 nativa asn1_add_obj (x509write.c) al firmar un certificado con una clave RSA de 2040 bits. Para una firma de 255 bytes, la asignación de BIT STRING se calcula a partir de la codificación de longitud DER de 255 bytes, pero la carga útil escrita después de anteponer el byte de bits no utilizados es de 256 bytes, lo que requiere un octeto de longitud DER adicional. Como resultado, la asignación es de 259 bytes mientras que la etiqueta, la longitud, el byte de bits no utilizados y la firma requieren 260 bytes, y el memcpy final escribe un byte más allá del búfer del montículo. El desbordamiento es alcanzable a través de la interfaz Lua exportada mediante create_selfsigned(); si es explotable remotamente depende de la aplicación incrustada. El código vulnerable está presente en las ramas de lanzamiento openwrt-18.06 hasta openwrt-25.12 y está ausente de master, donde el paquete luci-lib-px5g ha sido eliminado en lugar de parcheado.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-62381 changed 2026-08-24CVE Terms of Use
NVDCVE-2026-62381 changed 2026-10-12Public domain