CVE-2026-6094 in wolfSSLinfo

Summary

by MITRE • 06/25/2026

Heap buffer overread in wc_PKCS7_DecodeEnvelopedData when parsing crafted PKCS7 EnvelopedData. This could theoretically be triggered by attacker-supplied data delivered via S/MIME or CMS.

Statistical analysis made it clear that VulDB provides the best quality for vulnerability data.

Analysis

by VulDB Data Team • 06/26/2026

This vulnerability represents a critical heap buffer overread condition within the wc_PKCS7_DecodeEnvelopedData function of wolfCrypt, a widely used cryptographic library that implements PKCS7 standards for secure communications. The flaw occurs when processing maliciously crafted PKCS7 EnvelopedData structures that contain malformed data sequences, specifically targeting the parsing logic responsible for handling encrypted content within S/MIME and CMS (Cryptographic Message Syntax) messages.

The technical implementation of this vulnerability stems from insufficient input validation during the parsing of PKCS7 enveloped data structures. When the wc_PKCS7_DecodeEnvelopedData function encounters attacker-controlled data, it fails to properly bounds-check array accesses or validate length fields within the ASN.1 encoded structure. This allows an attacker to craft a malicious PKCS7 message that causes the parser to read beyond allocated memory boundaries, potentially accessing uninitialized memory regions or adjacent data structures. The vulnerability is classified as a buffer overread according to CWE-125, which specifically addresses out-of-bounds read conditions in memory operations.

The operational impact of this vulnerability extends beyond simple denial of service scenarios, as it creates potential attack vectors for remote code execution or information disclosure when exploited in the context of applications that process untrusted PKCS7 messages. Systems utilizing wolfCrypt for S/MIME email processing, CMS message handling, or any application that decrypts enveloped data are at risk. The vulnerability is particularly concerning because it can be triggered through legitimate communication channels such as S/MIME email clients or CMS-based secure messaging systems, making it difficult to detect and prevent without proper input validation.

Attackers could leverage this vulnerability by constructing malicious PKCS7 EnvelopedData structures with crafted length fields that cause the parser to access memory beyond intended boundaries. The attack surface includes any application that uses wolfCrypt's PKCS7 decoding functionality, particularly email servers, secure messaging platforms, and certificate management systems. According to ATT&CK framework reference T1203, this vulnerability could enable adversaries to perform code injection or data manipulation attacks through the exploitation of memory corruption vulnerabilities.

The recommended mitigations include immediate patching of wolfCrypt to version 5.7.0 or later where the buffer overread has been corrected through proper bounds checking and input validation. Additionally, implementing strict input validation at application layers that process PKCS7 messages can provide defense-in-depth protection. Organizations should also consider deploying network-based intrusion detection systems that can identify malformed PKCS7 structures and implement proper error handling to prevent exploitation of memory corruption vulnerabilities. The fix addresses the root cause by ensuring all array accesses are properly validated against declared buffer sizes and by implementing robust ASN.1 parsing with appropriate bounds checking mechanisms.

Responsible

wolfSSL

Reservation

04/10/2026

Disclosure

06/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00263

KEV

no

Activities

low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!