# 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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 1.0
- **CVSS:** 1.0 (v4.0, CNA) `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`
- **CVSS metrics:** Attack vector: Physical; Attack complexity: High; Attack requirements: Present; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: None; Availability impact: Low; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: Low; U: Green
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-121
- **Published:** 2025-08-04T21:35:04.013Z
- **Modified:** 2026-06-17T10:05:46.590Z

## Who should check

- Anyone running wolfSSL Inc. wolfTPM \<= 3.9.2

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

## Affected and fixed versions

- wolfSSL Inc. wolfTPM: \<= 3.9.2 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-7844. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-7844.md
Affected: wolfSSL Inc. wolfTPM <= 3.9.2
Fixed in: no fixed version listed yet

Steps:
1. Search this machine and project for wolfSSL Inc. wolfTPM: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-7844 being exploited?

There is no confirmed exploitation: CVE-2025-7844 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-7844?

Low: CVSS 1.0 (v4.0, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2025-7844?

wolfSSL Inc. wolfTPM \<= 3.9.2.

### Is there a fix for CVE-2025-7844?

No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-7844?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-7844>

HTML: <https://flawdb.com/CVE-2025-7844> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-7844>
