CVE-2025-7844 Memory corruption in wolfTPM

Low 1.0 Published Updated

Attacker can trigger stack buffer overflow in wolfTPM by exporting large RSA keys if MAX_RSA_KEY_BITS is misconfigured, risking code execution.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-7844?

CVE-2025-7844 is a low-severity memory corruption vulnerability in wolfSSL Inc. wolfTPM, published on 4 Aug 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

Exporting a TPM based RSA key larger than 2048 bits from the TPM could overrun a stack buffer if the default `MAX_RSA_KEY_BITS=2048` is used. If your TPM 2.0 module supports RSA key sizes larger than 2048 bit and your applications supports creating or importing an RSA private or public key larger than 2048 bits and your application calls `wolfTPM2_RsaKey_TpmToWolf` on that key, then a stack buffer could be overrun. If the `MAX_RSA_KEY_BITS` build-time macro is set correctly (RSA bits match what TPM hardware is capable of) for the hardware target, then a stack overrun is not possible.

Weakness: CWE-121

Which versions are affected by CVE-2025-7844?

How do I fix CVE-2025-7844?

No fix has been published for CVE-2025-7844 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-7844 being exploited?

There is no known exploitation of CVE-2025-7844 in the wild and no public exploit code.

Sources

Also known as GHSA-c7fc-3c5j-j956.

Is CVE-2025-7844 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free