# 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

- Severity: Low 1.0 (CVSS:4.0, scored by wolfSSL) `CVSS:4.0/AV:P/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L/U:Green`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-01)
- Published: 2025-08-04T21:35:04.013Z
- Modified: 2026-06-17T10:05:46.590Z
- Weaknesses: CWE-121
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: wolfSSL

## 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.

(As written by CVE List.)

## Affected

- wolfSSL Inc. wolfTPM: up to 3.9.2

## References

- <https://github.com/wolfSSL/wolfTPM/pull/427>

## Sources

- CVE List: [CVE-2025-7844](https://www.cve.org/CVERecord?id=CVE-2025-7844), CVE Terms of Use, modified 2025-08-05
- NVD: [CVE-2025-7844](https://nvd.nist.gov/vuln/detail/CVE-2025-7844), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-7844 · Whole record: https://cve.day/CVE-2025-7844.json · Rebuilt by cve.day 2026-11-25T22:59:02.035Z
