SecurityContext

CVE-2026-5295: wolfSSL - Buffer Overflow

  • Cve: CVE-2026-5295
  • Name: wolfSSL - Buffer Overflow
  • Description: A stack buffer overflow exists in wolfSSL's PKCS7 implementation in the wc_PKCS7_DecryptOri() function in wolfcrypt/src/pkcs7.c. When processing a CMS EnvelopedData message containing an OtherRecipientInfo (ORI) recipient, the function copies an ASN.1-parsed OID into a fixed 32-byte stack buffer (oriOID[MAX_OID_SZ]) via XMEMCPY without first validating that the parsed OID length does not exceed MAX_OID_SZ. A crafted CMS EnvelopedData message with an ORI recipient containing an OID longer than 32 bytes triggers a stack buffer overflow. Exploitation requires the library to be built with --enable-pkcs7 (disabled by default) and the application to have registered an ORI decrypt callback via wc_PKCS7_SetOriDecryptCb().
  • Impact: Attackers can trigger a stack buffer overflow, potentially leading to remote code execution or application crash.
  • Remediation: Update to the latest version with the fix or apply patches addressing the buffer overflow in wc_PKCS7_DecryptOri.
  • Vulnerability type: buffer_overflow
  • Vulnerability impact: remote_code_execution, denial_of_service
  • Requirements: Library must be built with --enable-pkcs7 and application must register ORI decrypt callback
  • Labels source: projectdiscovery
  • Severity: high
  • Cvss score: 8
  • Cvss vector: CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Epss score: 0.00184
  • Epss percentile: 0.07987
  • Assignee: [email protected]
  • Published at: 2026-04-09T23:17:01Z
  • Age in days: 229
  • Modified at: 2026-06-17T10:58:46Z
  • Patch available: yes
  • References total: 1
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2026-5295
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirement type, hackerone

Cwe

IdName
CWE-121Stack-based Buffer Overflow

References

UrlSourceTags
https://github.com/wolfSSL/wolfssl/pull/10116nvdIssue Tracking, Patch

Products

ProductAffectedPlatform boundSourcesUrl
wolfssl:wolfssl< 5.9.1nonvd/v1/products/wolfssl/wolfssl

Projects

RepositoryLink kindsIndexedUrl
wolfSSL/wolfsslpullyes/v1/repositories/wolfSSL/wolfssl

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, remote, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts