Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
Medium

Node.js Web Cryptography HMAC timing oracle in signature verification

IdentifiersCVE-2026-21713CWE-208· Observable Timing Discrepancy

CVE-2026-21713 is a medium-severity timing side-channel vulnerability in Node.js HMAC verification affecting the 20.x, 22.x, 24.x, and 25.x release lines. The flaw is caused by use of a non-constant-time comparison, described in the supporting content as memcmp(), when validating user-provided HMAC signatures in Node.js Web Cryptography/HMAC verification code, including crypto_hmac.cc. Because the comparison exits based on the number of matching bytes, response timing can vary proportionally to the length of the correct prefix. Under threat models where an attacker can obtain sufficiently precise timing measurements, this creates a timing oracle that can be used to infer the correct HMAC value byte-by-byte. The issue is characterized in the content as an implementation oversight, since Node.js already includes timing-safe comparison primitives used elsewhere in the codebase.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation can disclose information about secret-dependent HMAC verification results through timing differences. In environments where high-resolution timing measurements are feasible and repeated verification attempts are possible, an attacker may be able to progressively infer valid HMAC values or otherwise weaken the integrity of HMAC-based authentication checks. This can undermine message authentication guarantees and may enable MAC forgery or unauthorized acceptance of attacker-controlled data protected only by the affected verification path.

Mitigation

If you can’t patch tonight, do this now.

If immediate upgrade is not possible, reduce exposure of any application paths that perform attacker-triggerable HMAC verification through the affected Node.js code. Limit remote access to such endpoints, reduce opportunities for repeated verification attempts, and minimize attackers' ability to obtain precise timing measurements, for example by avoiding shared low-latency environments where timing noise is low. Where feasible, use application-level timing-safe comparison primitives for HMAC validation and add rate limiting or request throttling to verification endpoints. These are compensating controls only; patching is the proper fix.

Remediation

Patch, then assume compromise.

Upgrade Node.js to a patched release. The supporting content identifies fixed versions as Node.js v20.20.2, v22.22.2, v24.14.1, and v25.8.2. The fix replaces the non-constant-time comparison with a timing-safe primitive for HMAC verification.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
NodejsNodejsapplication
Rocky LinuxNodejs24application
Rocky LinuxRocky Linuxoperating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity3

Community discussion across Reddit, Mastodon, and other social sources.