CVE-2026-6291: wolfSSL PKCS#7 Bleichenbacher Padding Oracle Key Recovery
wolfSSL's PKCS#7 encryption decryption contains a timing-based information leak that allows attackers to recover encryption keys. When decrypting encrypted messages using RSA, the library returned different error messages depending on whether the encryption padding was valid or the message contents were corrupt. An attacker with network access could exploit this distinction by sending specially crafted encrypted messages and analyzing the responses to gradually reconstruct the underlying encryption key, similar to historical Bleichenbacher attacks. The vulnerability requires authenticated access (login credentials) and affects confidentiality of encrypted data but not integrity or system availability.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Weaknesses (CWE)
- CWE-208
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-25 / 2026-06-26
NVD description (verbatim)
Bleichenbacher padding oracle in PKCS#7 KTRI decryption. When decrypting PKCS#7 EnvelopedData using RSA PKCS#1 v1.5 key transport, wolfSSL returned distinguishable error codes depending on whether RSA padding validation failed versus whether the decrypted content was malformed. An attacker able to submit crafted EnvelopedData messages and observe error responses could use this as a padding oracle to incrementally recover the encrypted Content Encryption Key (CEK). The fix generates a deterministic pseudo-random fake CEK on padding failure (via HMAC-SHA256) and proceeds with decryption identically, using constant-time operations throughout, so that all failure paths produce the same error regardless of padding validity.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-6291 is a Bleichenbacher padding oracle vulnerability in wolfSSL's PKCS#7 EnvelopedData decryption using RSA PKCS#1 v1.5 key transport. The vulnerability stems from distinct error code returns when RSA padding validation fails versus when decrypted content is malformed. This distinguishability allows an attacker to mount an oracle attack: by submitting crafted EnvelopedData messages and observing error responses, the attacker can iteratively recover the Content Encryption Key (CEK). The attack exploits the cryptographic weakness inherent to PKCS#1 v1.5 padding combined with side-channel information leakage through error differentiation. The fix implements deterministic pseudo-random fake CEK generation (via HMAC-SHA256) on padding failure and uses constant-time operations throughout the decryption path, ensuring all failure modes return identical errors and eliminating the oracle.
Business impact
Organizations deploying wolfSSL to protect sensitive data encrypted via PKCS#7/CMS with RSA encryption face potential key recovery attacks. If an attacker gains authenticated access to a system that decrypts messages, they can systematically extract encryption keys through repeated oracle queries. This could lead to unauthorized decryption of historical and future encrypted communications. The impact scope is confined to confidentiality—decrypted data becomes readable—but does not permit tampering or system compromise. Organizations relying on PKCS#7 encryption for compliance requirements (healthcare, finance) should prioritize patching to maintain cryptographic guarantees. The requirement for authentication significantly reduces the threat surface compared to unauthenticated attacks.
Affected systems
wolfSSL is affected across all versions prior to the fix release. wolfSSL is used in embedded systems, IoT devices, servers, and applications requiring lightweight cryptographic libraries. Any deployment using PKCS#7 EnvelopedData decryption with RSA PKCS#1 v1.5 key transport is vulnerable. This includes usage in VPNs, secure messaging, container orchestration platforms, and firmware. Organizations should identify all systems integrating wolfSSL and verify their current version against the patched release. Note that systems using only DSA, ECDSA, or non-RSA key transport are unaffected.
Exploitability
Exploitation requires authenticated access to a system that decrypts PKCS#7 EnvelopedData messages, representing a meaningful hurdle. However, once authenticated, the oracle attack is straightforward to execute: the attacker sends specialized crafted messages and analyzes response codes across potentially hundreds or thousands of iterations. Each successful oracle query recovers a small amount of key material; full key recovery is computationally feasible. The attack is network-accessible (remote) but not unauthenticated, reducing real-world likelihood in well-secured environments. Insider threats or compromised application accounts represent the primary risk vector.
Remediation
Patch wolfSSL to the version addressing CVE-2026-6291—verify the exact version number from the official wolfSSL advisory. After patching, re-deploy affected applications. For high-value systems, consider rotating encryption keys that may have been protected by vulnerable wolfSSL instances, especially if audit logs suggest potential oracle queries. Verify the patch was applied to all instances (embedded firmware, containers, compiled binaries). Organizations unable to patch immediately should implement network segmentation to limit authenticated access to systems performing PKCS#7 decryption and monitor for suspicious patterns of encryption error responses.
Patch guidance
Apply the wolfSSL security patch immediately to all systems performing PKCS#7 EnvelopedData decryption. Consult the official wolfSSL security advisory for the exact patched version number and installation instructions. Test patches in a staging environment first to ensure compatibility with dependent applications. Prioritize production systems decrypting sensitive data. For embedded or firmware deployments, coordinate with device manufacturers to obtain patched builds. After deployment, verify the fix is active by confirming the library version matches the advisory and conducting functional testing of PKCS#7 decryption workflows.
Detection guidance
Monitor application logs for clusters of PKCS#7 decryption error responses from the same authenticated user or source IP, particularly if error codes vary unpredictably or occur at high frequency. Such patterns may indicate oracle attack probing. Implement alerts on authentication failures immediately preceding decryption errors. Use SIEM rules to detect repeated failed decryption attempts with the same encrypted message payload, a signature of oracle queries. Review wolfSSL library versions in runtime environments using software inventory tools. Inspect network traffic for repeated POST/API requests containing EnvelopedData structures if decryption happens server-side. Correlation of error response timing and content may also reveal the attack, though constant-time implementations complicate this vector.
Why prioritize this
Although the CVSS 3.1 score is 6.5 (Medium), the vulnerability poses a direct confidentiality threat to encrypted data in compliance-sensitive environments. The attack targets cryptographic material itself—encryption keys—rather than peripheral systems. Any organization processing regulated data (PII, healthcare records, financial information) encrypted via PKCS#7 should treat this as high priority despite the Medium rating, because key compromise violates data protection guarantees. The authentication requirement reduces urgency versus network-worm scenarios, but the attack's technical feasibility and the foundational nature of the flaw warrant prompt remediation. Organizations with extensive wolfSSL deployments or high-value encrypted data should prioritize within weeks, not months.
Risk score, explained
CVSS 3.1 assigns 6.5 (Medium) reflecting high confidentiality impact (C:H), low attack complexity (AC:L), network accessibility (AV:N), no integrity or availability impact, and requirement for authentication (PR:L). The Medium rating appropriately captures that the attack demands authenticated access and affects only data confidentiality. However, the *nature* of the compromised confidentiality—encryption keys themselves—warrants organizational assessment independent of the base score. Organizations handling sensitive data should consider context-specific risk elevation. The constant-time fix in patched versions completely eliminates the oracle path, making patching highly effective.
Frequently asked questions
Does this vulnerability affect applications using PKCS#7 signatures?
No. CVE-2026-6291 is specific to PKCS#7 EnvelopedData *decryption* (encrypted data). Signed data or non-RSA key transport mechanisms are unaffected.
Can an unauthenticated attacker exploit this remotely?
No. The vulnerability requires authentication to submit crafted EnvelopedData messages. An attacker must possess valid credentials or compromise an authenticated account.
Does patching require key rotation?
For most organizations, no—applying the patch eliminates the oracle entirely. However, if audit logs suggest an attempted attack on sensitive data, consider rotating the affected encryption keys as a defense-in-depth measure.
Is this exploitable in encrypted-at-rest scenarios?
Only if the encryption keys are stored server-side and decryption happens on the server in response to user requests. Client-side decryption (where the user holds the key) is not exploitable remotely via this vector.
This analysis is provided for informational purposes to support vulnerability management and risk assessment. It does not constitute professional security advice tailored to your specific infrastructure. Verify all technical claims (patch versions, affected versions, CWE mappings) against the official wolfSSL security advisory and NIST CVE database before making deployment decisions. Organizations should conduct their own vulnerability assessment based on their use of wolfSSL and the sensitivity of encrypted data. This document does not endorse any specific remediation tool or vendor. Always test patches in a non-production environment before deployment. Source: NVD (public-domain), retrieved 2026-08-03. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2017-20240MEDIUMTiming Attack in Crypt::PBKDF2 Perl Module
- CVE-2026-45410MEDIUMTREK User Enumeration via Login Timing Analysis
- CVE-2026-48166MEDIUMFilament Login Timing Attack Enables Email Enumeration
- CVE-2026-48859MEDIUMErlang/OTP SSH Timing Side-Channel Username Enumeration
- CVE-2026-54411MEDIUMLinux-PAM pam_userdb Timing Attack Password Recovery
- CVE-2026-48011LOWShopware Admin Username Enumeration via Timing Attack
- CVE-2026-5419LOWGnuTLS PKCS#7 Padding Timing Side-Channel Information Disclosure
- CVE-2026-6091MEDIUMwolfSSL Partial-Chain Certificate Verification Bypass