CVE-2025-25199 BCryptGenerateSymmetricKey memory leak
A memory leak in the go-crypto-winnative library allows attackers to exhaust system memory via repeated TLS1PRF calls, potentially causing denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-25199?
CVE-2025-25199 is a high-severity denial of service vulnerability in microsoft go-crypto-winnative, published on 12 Feb 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
go-crypto-winnative Go crypto backend for Windows using Cryptography API: Next Generation (CNG). Prior to commit f49c8e1379ea4b147d5bff1b3be5b0ff45792e41, calls to `cng.TLS1PRF` don't release the key handle, producing a small memory leak every time. Commit f49c8e1379ea4b147d5bff1b3be5b0ff45792e41 contains a fix for the issue. The fix is included in versions 1.23.6-2 and 1.22.12-2 of the Microsoft build of go, as well as in the pseudoversion 0.0.0-20250211154640-f49c8e1379ea of the `github.com/microsoft/go-crypto-winnative` Go package.
Weakness: CWE-401
Which versions are affected by CVE-2025-25199?
3 open source packages ship an affected version, including github.com/microsoft/go-crypto-winnative.
| Package | Affected | Fixed in |
|---|---|---|
github.com/microsoft/go-crypto-winnative Go | All versions | 0.0.0-20250211154640-f49c8e1379ea |
github.com/microsoft/go-crypto-winnative Go | All versions | 0.0.0-20250211154640-f49c8e1379ea |
github.com/microsoft/go-crypto-winnative Go | All versions | 0.0.0-20250211154640-f49c8e1379ea |
How do I fix CVE-2025-25199?
Upgrade github.com/microsoft/go-crypto-winnative to 0.0.0-20250211154640-f49c8e1379ea or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-25199 being exploited?
There is no known exploitation of CVE-2025-25199 in the wild and no public exploit code.
Sources
Also known as AZL-79122, AZL-98937, GHSA-29c6-3hcj-89cf, GO-2025-3461.