Heap Buffer Overflow in Luci-lib-px5g Affecting OpenWRT
CVE-2026-62381
6.9MEDIUM
What is CVE-2026-62381?
A vulnerability in luci-lib-px5g exposes systems to a heap-based buffer overflow when signing certificates with 2040-bit RSA keys. The flaw is triggered during the ASN.1 encoding routine, specifically in asn1_add_obj (x509write.c), where a miscalculation in buffer allocation leads to writing beyond the heap. It arises when a payload of 256 bytes is prepared while only allocating for 259 bytes, resulting in an overflow. Exploitation potential varies based on the embedding application, but the vulnerable code persists from openwrt-18.06 to openwrt-25.12, with removal occurring in the master branch.
Affected Version(s)
luci 0 <= 42d72f79cd8f057f241595abc761b39dab2d9f07
