jq Hash Collision Vulnerability: CPU Exhaustion via Crafted JSON

jq Hash Collision Vulnerability: CPU Exhaustion via Crafted JSON

The National Vulnerability Database (NVD) recently detailed CVE-2026-40164, a high-severity vulnerability (CVSS 7.5) affecting jq, the popular command-line JSON processor. This isn’t your typical run-of-the-mill bug; it’s a denial-of-service (DoS) waiting to happen. Prior to a critical commit (0c7d133c3c7e37c00b6d46b658a02244fdd3c784), jq utilized MurmurHash3 with a hardcoded, publicly visible seed (0x432A9843). This seemingly innocuous detail opened the door for a classic hash collision attack.

Attackers could precompute key collisions offline, crafting a relatively small JSON object—around 100 KB—where all keys hash to the same bucket. When jq processes such a payload, hash table lookups degrade catastrophically from an efficient O(1) to a sluggish O(n). This effectively turns any jq expression into an O(n²) operation, leading to significant CPU exhaustion. NVD points out that this is a far more practical exploit than previous heap overflow issues, requiring only a modest payload. Given jq’s prevalence in CI/CD pipelines, web services, and data processing scripts, the potential for disruption is substantial. The fix is in, so get patching if you’re running an older version.

Related ATT&CK Techniques

🛡️ Detection Rules

4 rules · 5 SIEM formats

4 auto-generated detection rules for this incident, mapped to MITRE ATT&CK. Available in Sigma, Splunk SPL, Sentinel KQL, Elastic Lucene, and QRadar AQL.

high T1499 Impact

DoS Traffic Pattern Detection

Sigma Splunk SPL Sentinel KQL Elastic QRadar AQL

Get this rule in your SIEM's native format — copy, paste, detect. No manual conversion.

4 Sigma rules mapped to the ATT&CK techniques from this breach — pick your SIEM and get a ready-to-paste query.

Get Detection Rules →

Indicators of Compromise

IDTypeIndicator
CVE-2026-40164 DoS jq versions prior to commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784
CVE-2026-40164 DoS jq using MurmurHash3 with hardcoded seed 0x432A9843
CVE-2026-40164 DoS Crafted JSON object (~100 KB) with precomputed key collisions causing O(n^2) CPU exhaustion in jq

Related Posts

Critical RCE Flaw Hits NuGet Gallery Backend

CVE-2026-39399 — NuGet Gallery is a package repository that powers nuget.org. A security vulnerability exists in the NuGetGallery backend job’s handling of .nuspec files within...

vulnerabilityCVEcriticalhigh-severityremote-code-executioncwe-20cwe-22
/CRITICAL /⚑ 4 IOCs

BoidCMS LFI to RCE: A Critical Template Flaw

CVE-2026-39387 — BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are...

vulnerabilityCVEhigh-severityremote-code-executioncwe-98
/HIGH /⚑ 4 IOCs

Nanobot AI: WebSocket Hijack Puts WhatsApp Sessions at Risk

CVE-2026-35589 — nanobot is a personal AI assistant. Versions prior to 0.1.5 contain a Cross-Site WebSocket Hijacking (CSWSH) vulnerability exists in the bridge's WebSocket server...

vulnerabilityCVEhigh-severitycwe-1385
/HIGH /⚑ 5 IOCs