Skip to content
Memory corruption Advisory Advanced CVE-2026-6678

WolfSSL wolfSSL PKCS#7 OtherRecipientInfo integer underflow vulnerability

An integer underflow in wolfSSL's PKCS#7 OtherRecipientInfo parsing can make a size value wrap to a very large number, which is then used to advance a pointer and passed to a user callback. This can lead to a heap buffer overflow and potentially arbitrary code execution.

Ankur Tyagi Follow

Originally disclosed on Cisco Talos

High 7.5 View original

A integer underflow vulnerability exists in the PKCS#7 OtherRecipientInfo functionality of wolfSSL (version(s): 5.9.1). A specially crafted malformed ASN.1 record can lead to a heap buffer overflow.

Ankur Tyagi, on Cisco Talos

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The code subtracts an index difference from an attacker-controlled sequence length without checking that the length is large enough, so the unsigned result underflows to a huge value.

Impact

The exact consequence varies by implementation, causing anything from unexpected behaviour to a process crash, but the user callback will always operate on unexpected data; the CVSS vector indicates a high availability impact only.

What the attacker needed

Attacker supplies a malformed PKCS#7 blob; application parses OtherRecipientInfo; a user callback is registered

The fix

The vendor released wolfSSL v5.9.2 on 23 June 2026, which presumably fixes the issue.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a program reads a length from untrusted data, it must check that the length makes sense. Here, a subtraction can go below zero and wrap around to a huge number, so the program thinks a tiny field is enormous. That huge size is then used to move a pointer and call a callback, which can read or write far outside the intended buffer.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by Ankur Tyagi

View all

4 more disclosed reports, best first.

More from Cisco Talos

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.