BCryptGenerateSymmetricKey memory leak
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2025-25199
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 5 Nov 2026, 05:52 UTC · Revision 1
Source evidence
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.
osv:CVE-2025-25199
Complete source record
{
"id": "2b787794a8c01f330c67869b8512f579ca2ef309db1f6bcdaf61cdaec5346eef",
"url": "https://osv.dev/vulnerability/CVE-2025-25199",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "BCryptGenerateSymmetricKey memory leak",
"summary": "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.",
"evidence": "osv:CVE-2025-25199",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2025-25199",
"aliases": [
"CVE-2025-25199",
"GHSA-29c6-3hcj-89cf",
"GO-2025-3461"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/microsoft/go-crypto-winnative",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "f49c8e1379ea4b147d5bff1b3be5b0ff45792e41"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "f49c8e1379ea4b147d5bff1b3be5b0ff45792e41"
}
],
"source": "DESCRIPTION"
},
{
"range": [
{
"fixed": "f49c8e1379ea4b147d5bff1b3be5b0ff45792e41"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-25199.json"
}
}
],
"modified": "2026-10-28T02:30:43.304956372Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25199.json",
"https://github.com/microsoft/go-crypto-winnative/security/advisories/GHSA-29c6-3hcj-89cf",
"https://nvd.nist.gov/vuln/detail/CVE-2025-25199",
"https://github.com/microsoft/go-crypto-winnative/commit/f49c8e1379ea4b147d5bff1b3be5b0ff45792e41"
],
"provider_metadata": {
"cwe_ids": [
"CWE-401"
],
"cna_assigner": "GitHub_M",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"fixed": "1.23.6-2"
},
{
"fixed": "1.22.12-2"
},
{
"fixed": "0.0.0-20250211154640-f49c8e1379ea"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/25xxx/CVE-2025-25199.json"
}
},
"related_cves": [
{
"value": "CVE-2025-25199",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 510853,
"published_at": "2025-02-12T17:49:58.397+00:00"
}