CVE-2026-41257

jq: Signed-int overflow in `stack_reallocate` (jq VM stack)

Published May 11, 2026 CVSS 4.0 · 6.4 Medium EPSS < 1% KEV · Not listed
Description
jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4599-1 jq security update
Debian DLA Debian DLA DLA-4662-1 jq security update
Debian DSA Debian DSA DSA-6416-1 jq security update
History
Type Values Removed Values Added
CPEs cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Jqlang
Jqlang jq
Vendors & Products Jqlang
Jqlang jq
Type Values Removed Values Added
Description jq is a command-line JSON processor. In 1.8.1 and earlier, the jq bytecode VM's data stack tracks its allocation size in a signed int. When the stack grows beyond ≈1 GiB (via deeply nested generator forks), the doubling arithmetic overflows. The wrapped value is passed to realloc and then used for a memmove with attacker-influenced offsets.
Title jq: Signed-int overflow in `stack_reallocate` (jq VM stack)
Weaknesses CWE-190
CWE-787
References
Metrics cvssV4_0

{'score': 6.4, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 11, 2026, 7:25 PM
Reserved
Apr 18, 2026, 2:01 PM
Status
Analyzed
Published
May 11, 2026, 6:16 PM
Modified
Oct 26, 2026, 6:10 PM
Severity
Moderate
Public date
May 11, 2026, 5:14 PM