CVE-2026-21713
Description
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**.
CWE
- (none)
Affected
- nodejs / node — v=20.20.1 ≤20.20.1 [affected]; v=22.22.1 ≤22.22.1 [affected]; v=24.14.0 ≤24.14.0 [affected]; v=25.8.1 ≤25.8.1 [affected]; v=4.0 <4.* [affected]; v=5.0 <5.* [affected]; v=6.0 <6.* [affected]; v=7.0 <7.* [affected]; v=8.0 <8.* [affected]; v=9.0 <9.* [affected]; v=10.0 <10.* [affected]; v=11.0 <11.* [affected]; v=12.0 <12.* [affected]; v=13.0 <13.* [affected]; v=14.0 <14.* [affected]; v=15.0 <15.* [affected]; v=16.0 <16.* [affected]; v=17.0 <17.* [affected]; v=18.0 <18.* [affected]; v=19.0 <19.* [affected]
CVSS
- 3.0 score=5.9 severity=MEDIUM
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
References
Source
cvelistV5-main/cves/2026/21xxx/CVE-2026-21713.json