Buffer overflow in Wolfssl

CVE-2026-5187

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.

Vulnerability class: Buffer Overflow

EPSS: 0.003 (20.6th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2026-5187?
CVE-2026-5187 is a critical-severity vulnerability in Wolfssl, classified under Heap-based Buffer Overflow. CVSS score: 9.8/10. Published 2026-04-09.
How severe is CVE-2026-5187?
Critical severity. CVSS v3 base score is 9.8 out of 10.