CVE-2026-21713
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA 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**.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceNode.js HMAC signature verification uses a non-constant-time comparison function, allowing attackers with high-resolution timing measurements to infer valid HMAC values by measuring response times proportional to the number of matching bytes. This timing oracle enables byte-by-byte HMAC reconstruction.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data<= 20.20.1>= 22.0.0, <= 22.22.1>= 24.0.0, <= 24.14.0>= 25.0.0, <= 25.8.1CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- High
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify Node.js versionRun `node --version` or `node -v` to get the installed Node.js versionAffected if Version is older than the patched release that addresses this timing attack vulnerability
-
Locate HMAC verification codeSearch codebase for crypto.createHmac, crypto.verify with 'hmac' algorithm, or manual HMAC comparison using `===` or `==` operators on buffersAffected if Code performs HMAC signature verification using non-timing-safe comparison
-
Inspect HMAC comparison methodReview code where HMAC output is compared (e.g., `if (computedHmac === providedHmac)` or similar buffer equality checks)Affected if Comparison uses regular equality operators (===, ==) or Buffer.compare instead of crypto.timingSafeEqual or crypto.timingSafeEqualAsync
-
Check for timing-safe primitivesSearch for usage of crypto.timingSafeEqual or crypto.timingSafeEqualAsync in files performing HMAC verificationAffected if Code does NOT use timing-safe comparison primitives for HMAC validation
-
Audit custom comparison functionsReview any custom compare or equals functions used to validate HMAC signaturesAffected if Custom comparison functions perform byte-by-byte comparison without constant-time guarantees
You are affected if your Node.js version lacks the security fix AND your code performs HMAC verification using non-constant-time comparison (===, ==, or Buffer.compare) instead of crypto.timingSafeEqual.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedReplace non-constant-time comparison with Node.js's built-in timing-safe comparison primitives (crypto.timingSafeEqual or crypto.timingSafeEqualAsync). Update to patched Node.js versions when released.
Node.js 20.19.0+ (for 20.x), Node.js 22.14.0+ (for 22.x), or latest in 24.x/25.x branches
- 1. Identify the current Node.js version in use by running `node --version`
- 2. For Node.js 20.x users: Upgrade to Node.js 20.19.0 or later which contains the fix for this vulnerability
- 3. For Node.js 22.x users: Upgrade to Node.js 22.14.0 or later which contains the fix for this vulnerability
- 4. For Node.js 24.x/25.x users: Upgrade to the latest available version in those branches
- 5. After upgrading, verify the fix is applied by testing HMAC operations - the timing should now be constant regardless of how many bytes match
- 6. Alternatively, if upgrading is not immediately feasible, implement a constant-time comparison manually using `crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))` for HMAC verification in application code
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing6.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,096.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-21713 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-21713 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data