jq: Use of Weak Hash
CVE-2026-40164 is a high-severity use of weak hash vulnerability in jq from Jqlang, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected jq versions: < 0c7d133c3c7e37c00b6d46b658a02244fdd3c784. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.38% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Check which version of jq you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE; 2 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- NoneNo data is disclosed.
- Integrity
- NoneNothing can be modified.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. Scored by CNA (github.com).
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (github.com) |
| CVSS 3.1 | 7.5 | High | CNA |
Official description
jq is a command-line JSON processor. Before commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784, jq used MurmurHash3 with a hardcoded, publicly visible seed (0x432A9843) for all JSON object hash table operations, which allowed an attacker to precompute key collisions offline. By supplying a crafted JSON object (~100 KB) where all keys hashed to the same bucket, hash table lookups degraded from O(1) to O(n), turning any jq expression into an O(n²) operation and causing significant CPU exhaustion. This affected common jq use cases such as CI/CD pipelines, web services, and data processing scripts, and was far more practical to exploit than existing heap overflow issues since it required only a small payload. This issue has been patched in commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Weak Hash
The product uses an algorithm that produces a digest (output value) that does not meet security expectations for a hash function that allows an adversary to reasonably determine the original input (preimage attack), find another input that can produce the same hash (2nd preimage attack), or find multiple inputs that evaluate to the same hash (birthday attack).
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Other references
- access.redhat.com/errata/RHSA-2026:16252
- access.redhat.com/errata/RHSA-2026:16692
- access.redhat.com/errata/RHSA-2026:16693
- access.redhat.com/errata/RHSA-2026:18040
- access.redhat.com/errata/RHSA-2026:18042
- access.redhat.com/errata/RHSA-2026:18043
- access.redhat.com/errata/RHSA-2026:18044
- access.redhat.com/errata/RHSA-2026:18045
- access.redhat.com/errata/RHSA-2026:18046
- access.redhat.com/errata/RHSA-2026:18047
- access.redhat.com/errata/RHSA-2026:18048
- access.redhat.com/errata/RHSA-2026:19151
- access.redhat.com/errata/RHSA-2026:19365
- access.redhat.com/errata/RHSA-2026:23233
- access.redhat.com/errata/RHSA-2026:23245
Other vulnerabilities in jq
- 7.1 High severity
- 7.5 High severity
- 7.5 High severity
- 8.1 High severity
- 7.5 High severity
Recent Use of Weak Hash vulnerabilities
- 8.7 High severity
- 7.4 High severity
- 9.8 Critical severity
- 7.5 High severity
- 9.8 Critical severity
- 9.3 Critical severity
Spotted an error? Tell us.