CVE-2026-5187: Heap Out-of-Bounds Write in DecodeObjectId() in wolfSSL

Published Apr 9, 2026
·
Updated

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 MAXOIDSZ (32), causing the function to accept crafted OIDs with 33 or more arcs that write past the end of the allocated buffer.

Affected Software

2 affected components
wolfSSL wolfCrypt
wolfSSL wolfssl<=5.9.0

Remediation

Information

Fix Bug 1: Add a bounds check requiring at least 2 output slots before writing the first OID arc split (y == 0 case). Fix Bug 2: Change callers to pass the element count (MAX_OID_SZ) instead of sizeof(decOid) as the output buffer size parameter.

Event History

Apr 9, 2026
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
RemedyDescriptionWeakness
Data Sourced
via NVD·08:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-5187?

CVE-2026-5187 has been assigned a high severity rating due to the potential for heap out-of-bounds writes.

2

How do I fix CVE-2026-5187?

To fix CVE-2026-5187, update wolfSSL to version 5.10.0 or greater, which addresses the vulnerability.

3

Which versions of wolfSSL are affected by CVE-2026-5187?

CVE-2026-5187 affects all versions of wolfSSL up to 5.9.0 inclusive.

4

What components of wolfSSL are impacted by CVE-2026-5187?

The vulnerability is specifically found in the DecodeObjectId() function within the wolfCrypt library.

5

Can CVE-2026-5187 lead to exploitation?

Yes, CVE-2026-5187 can lead to potential arbitrary code execution or crashes if exploited.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203
CVE-2026-5187 - Heap Out-of-Bounds Write in DecodeObjectId() in wolfSSL - SecAlerts