CVE-2025-7844: wolfTPM library wrapper function `wolfTPM2_RsaKey_TpmToWolf` copies external data to a fixed-size stack buffer without length validation potentially causing stack-based buffer overflow
Vulnerability summary
CVE-2025-7844 is a low (CVSS 1.0) Stack-based Buffer Overflow vulnerability in wolfssl inc. wolftpm. EPSS estimates a 0.16% chance of exploitation in the next 30 days, higher than 4.8% of scored vulnerabilities.
Not severe (CVSS 1, physical access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Timeline
- 04-08-2025PublishedVulnerability first disclosed.
- 05-08-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
2 scores · 2 sources · 1 version- NVDNIST1.0LowCVSS:4.0/AV:P/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Green
EPSS trend
Probability
0.16%
Chance of exploitation in the next 30 days
Percentile
5%
Versus all other CVEs
30-day change
Increase +0.01 pp
From 0.14% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: physical access, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Wolfssl inc.1 product
- wolftpm≤ 3.9.2
1 vendor · 1 product