CVE-2026-5187 Heap Out-of-Bounds Write in DecodeObjectId() in wolfSSL
Heap out-of-bounds write in wolfSSL's ASN.1 decoder allows attackers to corrupt memory, potentially leading to code execution or crashes.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-5187?
CVE-2026-5187 is a low-severity memory corruption vulnerability in Wolfssl Wolfssl, published on 9 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Two potential heap out-of-bounds write locations existed in DecodeObjectId() in wolfcrypt/src/asn.c. First, a bounds check only validates one available slot before writing two OID arc values (out[0] and out[1]), enabling a 2-byte out-of-bounds write when outSz equals 1. Second, multiple callers pass sizeof(decOid) (64 bytes on 64-bit platforms) instead of the element count MAX_OID_SZ (32), causing the function to accept crafted OIDs with 33 or more arcs that write past the end of the allocated buffer.
Which versions are affected by CVE-2026-5187?
It affects 1 product.
Products include Wolfssl Wolfssl.
How do I fix CVE-2026-5187?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-5187 being exploited?
There is no known exploitation of CVE-2026-5187 in the wild and no public exploit code.
Other vulnerabilities in Wolfssl Wolfssl
Sources
Also known as DEBIAN-CVE-2026-5187, GHSA-98ww-gw4p-68m3, JLSEC-2026-714, UBUNTU-CVE-2026-5187.