MEDIUM 5.3

CVE-2026-6678: Integer Underflow in wolfSSL PKCS#7 Decryption (CVSS 5.3)

A flaw in wolfSSL's PKCS#7 decryption function can cause incorrect handling of encrypted data when processing specially crafted messages. The vulnerability stems from an integer underflow—a mathematical error where a calculation produces a value smaller than intended—affecting how the library determines the length of decrypted content. While this does not expose encrypted data or allow an attacker to decrypt messages they shouldn't access, it can cause the decryption process to fail or behave unexpectedly, potentially leading to a denial of service.

Source data · NVD / CISA · public domain

CVSS
3.1 · 5.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weaknesses (CWE)
CWE-191
Affected products
1 configuration(s)
Published / Modified
2026-06-25 / 2026-07-01

NVD description (verbatim)

Integer underflow in wc_PKCS7_DecryptOri when handling crafted Other Recipient Info, leading to incorrect length handling during decryption.

3 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-6678 is an integer underflow vulnerability in wolfSSL's wc_PKCS7_DecryptOri function, which processes Other Recipient Info structures within PKCS#7 encrypted messages. The vulnerability occurs when the function miscalculates buffer or length parameters during decryption of crafted payloads, resulting in incorrect length handling. The flaw is classified under CWE-191 (Integer Underflow), meaning that insufficient validation of integer arithmetic allows an attacker-controlled input to drive a calculation below zero or another boundary, corrupting the decryption state machine. The CVSS 3.1 score of 5.3 (MEDIUM severity) reflects that exploitability is straightforward (network-accessible, no authentication required, no user interaction), but impact is limited to availability—the vulnerability does not compromise confidentiality or integrity of encrypted content.

Business impact

Organizations relying on wolfSSL for PKCS#7 decryption in production systems face potential service interruptions if an attacker sends maliciously crafted encrypted messages. Applications that depend on decryption success to process critical workflows—such as secure document handling, certificate-based communications, or encrypted file operations—could experience outages or error states. The risk is particularly acute in systems where wolfSSL is embedded in network appliances, IoT devices, or backend services that process untrusted encrypted input. However, because confidentiality and integrity are not compromised, the primary concern is operational resilience rather than data breach.

Affected systems

wolfSSL library versions are affected by this vulnerability. The scope is limited to deployments that use wolfSSL's PKCS#7 decryption functionality, specifically when processing messages containing Other Recipient Info structures. Embedded systems, TLS stacks, and cryptographic middleware relying on wolfSSL are at risk if they expose decryption endpoints to untrusted network input or if they process encrypted data from potentially adversarial sources. Verify the exact affected version range against the official wolfSSL security advisory.

Exploitability

Exploitation requires no authentication, no user interaction, and no special access—an attacker can craft a malicious PKCS#7 message and send it over the network to a vulnerable system. The attack surface is substantial for any service that decrypts PKCS#7-formatted data from the internet. However, successful exploitation does not yield command execution or data exfiltration; it triggers a decryption failure or resource exhaustion, making it a denial-of-service vector rather than a data compromise path. Public exploit code has not been identified as weaponized in the wild.

Remediation

Patch wolfSSL to the version that resolves this integer underflow. Contact wolfSSL or consult their security advisories for the specific patched version number. Organizations unable to patch immediately should evaluate whether they can restrict network access to PKCS#7 decryption endpoints or filter incoming encrypted messages to trusted sources. In environments where PKCS#7 decryption is not critical, consider disabling the feature until a patch is deployed.

Patch guidance

Apply the security update provided by wolfSSL that addresses CVE-2026-6678. Verify the patch version against the vendor's official security advisory before deployment. Test the patched version in a non-production environment to confirm compatibility with your application's cryptographic workflows and performance requirements. If wolfSSL is embedded in third-party software or hardware, check with your vendor for availability of patched firmware or software releases.

Detection guidance

Monitor systems for decryption errors or exceptions occurring when processing PKCS#7 messages, especially if error rates spike or correlate with external network activity. Log and alert on wc_PKCS7_DecryptOri failures or crashes. Use network-based detection to identify PKCS#7 messages with unusual Other Recipient Info structures being sent to internal systems. Endpoint detection and response (EDR) tools should flag unexpected crashes or resource exhaustion in processes linked to wolfSSL decryption operations.

Why prioritize this

This vulnerability warrants moderate-priority patching because it combines ease of exploitation with availability impact. CVSS 5.3 reflects a boundary between medium and high severity: while the attack requires no privileges and is network-accessible, the impact is limited to denial of service. Organizations should prioritize patching if they expose PKCS#7 decryption to untrusted networks or process encrypted data from potentially adversarial sources. Lower priority can be assigned to internal-only deployments or systems where decryption failure does not cascade to critical operations.

Risk score, explained

The CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L yields a score of 5.3 (MEDIUM). Attack Vector is Network (N), meaning an attacker can exploit this remotely. Attack Complexity is Low (L), indicating that exploitation does not require special conditions or timing. Privileges Required and User Interaction are None, so any unauthenticated attacker can trigger the flaw. The scope is unchanged, and confidentiality and integrity are unaffected. Availability impact is Low (L), reflecting that the vulnerability causes service disruption or resource exhaustion but not total loss of functionality. The score does not escalate to High because data is not exposed and the system maintains integrity; it stays above Low because network accessibility and ease of exploitation make it a practical denial-of-service avenue.

Frequently asked questions

Can an attacker decrypt data using this vulnerability?

No. The integer underflow corrupts the decryption process itself, causing it to fail or behave unexpectedly. It does not bypass encryption or allow the attacker to read encrypted content. The vulnerability is a denial-of-service vector, not a confidentiality breach.

Which versions of wolfSSL are affected?

Refer to the official wolfSSL security advisory for the exact version range. The vulnerability affects builds that include the vulnerable wc_PKCS7_DecryptOri function without the integer underflow fix. Verify your deployment version against vendor guidance.

Is there a workaround if I cannot patch immediately?

Restrict network access to systems that expose PKCS#7 decryption to trusted endpoints only. If feasible, disable PKCS#7 decryption functionality until a patch is deployed. Monitor for error spikes that may indicate exploitation attempts.

How do I know if my system is being attacked?

Look for repeated decryption failures, unexpected crashes in cryptographic processes, or abnormal error logs mentioning wc_PKCS7_DecryptOri or PKCS#7 parsing. Correlate these events with external network traffic to identify potential attack patterns.

This analysis is provided for informational purposes and represents a point-in-time assessment based on publicly available information as of the publication date. SEC.co does not guarantee the accuracy or completeness of patch availability, version numbers, or vendor timelines. Organizations should independently verify all patch details, affected version ranges, and compatibility with their specific deployments against official vendor advisories before taking remedial action. This vulnerability does not appear on CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating no confirmed active exploitation as of the last update, but this does not preclude future weaponization or targeted attacks. Always consult wolfSSL's official security documentation and conduct thorough testing in non-production environments before applying patches to critical systems. Source: NVD (public-domain), retrieved 2026-08-04. Analysis generated by SEC.co (claude-haiku-4-5).