A flaw in Node.js HMAC verification uses a non-constant-time comparison when validating user-provided signatures, potentially leaking timing information proportional to the number of matching bytes. Under certain threat models where high-resolution timing measurements are possible, this behavior could be exploited as a timing oracle to infer HMAC values.
Node.js already provides timing-safe comparison primitives used elsewhere in the codebase, indicating this is an oversight rather than an intentional design decision.
This vulnerability affects 20.x, 22.x, 24.x, and 25.x.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"nodejs:node.js": [
"<= 20.20.1",
">= 22.0.0, <= 22.22.1",
">= 24.0.0, <= 24.14.0",
">= 25.0.0, <= 25.8.1"
]
},
"database_specific": {
"status": "Analyzed"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2026-21713",
"id": "CVE-2026-21713",
"imported": "2026-12-02T14:45:39.968Z",
"modified": "2026-08-19T13:36:43.997Z",
"published": "2026-03-30T20:16:19.397Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-21713"
},
{
"html_url": "https://github.com/advisories/GHSA-6r7g-3mm3-fhw7",
"id": "GHSA-6r7g-3mm3-fhw7",
"imported": "2026-12-02T14:48:56.278Z",
"modified": "2026-05-10T15:31:17Z",
"published": "2026-03-30T21:31:04Z",
"url": "https://api.github.com/advisories/GHSA-6r7g-3mm3-fhw7"
},
{
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-17174",
"id": "EUVD-2026-17174",
"imported": "2026-12-02T14:45:41.718Z",
"modified": "2026-05-10T13:17:50Z",
"published": "2026-03-30T19:07:28Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2026-17174"
}
]
}