CVE-2026-21713
Timing Attack in Node.js HMAC Verification Leaks Secrets
Publication date: 2026-03-30
Last updated on: 2026-03-30
Assigner: HackerOne
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| nodejs | node.js | From 20.x (inc) to 25.x (inc) |
| nodejs | node.js | From 20.0 (inc) to 26.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a flaw in Node.js's HMAC verification process where a non-constant-time comparison is used to validate user-provided signatures.
Because the comparison time varies depending on the number of matching bytes, it can leak timing information.
An attacker with the ability to make high-resolution timing measurements could exploit this behavior as a timing oracle to infer HMAC values.
This is considered an oversight since Node.js provides timing-safe comparison functions elsewhere in its codebase.
How can this vulnerability impact me? :
The vulnerability can allow an attacker to infer HMAC values by measuring the time it takes to verify signatures.
This could lead to unauthorized access or data tampering if HMACs are used to protect sensitive data or verify message integrity.
However, exploitation requires a threat model where high-resolution timing measurements are possible, which may limit the practical impact.