Skip to content
OpenAdvisories
High · 7.1 CVE-2026-49839 EUVD-2026-39500

jq --rawfile invalid-state reuse after String too long causes heap-buffer-overflow

Published Jun 25, 2026 · Updated Jun 25, 2026 · Assigned by GitHub_M

Description

jq is a command-line JSON processor. Prior to 1.8.2,` jq --rawfile` can turn a handled oversized-string error into invalid-state reuse and a real heap out-of-bounds write in assertion-disabled builds. When jv_load_file(raw=1) reads an attacker-controlled file, it repeatedly appends file chunks to the same jv string accumulator. Once jv_string_append_buf() returns jv_invalid_with_msg("String too long"), the raw-file loop does not stop. If the file contains at least one more byte, the next loop iteration appends a new chunk to an object that is already invalid. With assertions enabled this aborts in jvp_string_ptr(). With assertions disabled, the invalid object is interpreted as a string object and ASan reports heap-buffer-overflow. This vulnerability is fixed in 1.8.2.

Affected products

VendorProductAffectedFixed
jqlang jq < 1.8.2 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 jq 1.8.1-8 —
Debian 13 jq 1.7.1-6+deb13u3 —
Debian 12 jq 1.6-2.1+deb12u2 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 jq No fix yet —
Ubuntu 26.04 LTS jq No fix yet —
Ubuntu 25.10 jq No fix yet —
Ubuntu 24.04 LTS jq No fix yet —
Ubuntu 22.04 LTS jq No fix yet —
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 20.04 LTS jq No fix yet —
Ubuntu Pro 18.04 LTS jq No fix yet —
Ubuntu Pro 16.04 LTS jq No fix yet —
Ubuntu Pro 14.04 LTS jq No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 jq +1 1.8.2-0.1.hum1 RHSA-2026:29986
ReleasePackageFixed inAdvisory
SLES 15 SP7 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES 15 SP6 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES 15 SP5 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES 15 SP4 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 jq 1.7.1-160000.4.1 SUSE-SU-2026:22637-1
SLES for SAP 15 SP6 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES for SAP 15 SP5 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES for SAP 15 SP4 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLES 16.0 jq 1.7.1-160000.4.1 SUSE-SU-2026:22637-1
SLE Micro 6.2 jq 1.7.1-160000.4.1 SUSE-SU-2026:22597-1
SLE Micro 6.1 jq 1.7.1-slfo.1.1_4.1 SUSE-SU-2026:22900-1
SLE Micro 6.0 jq 1.7.1-1.1 SUSE-SU-2026:23873-1
SLE Micro 5.5 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLE Micro 5.4 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLE Micro 5.3 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLE HPC 15 SP5 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
SLE HPC 15 SP4 jq 1.7.1-150000.3.25.1 SUSE-SU-2026:4275-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed jq 1.8.2-1.1 openSUSE-SU-2026:11133-1
openSUSE Leap 16.0 jq 1.7.1-160000.4.1 openSUSE-SU-2026:21318-1
ReleasePackageFixed inAdvisory
Alpine v3.24 jq 1.8.2-r0 —
Alpine v3.23 jq 1.8.2-r0 —
Alpine v3.22 jq 1.8.2-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 jq +1 1.8.1-60.amzn2023 ALAS2023-2026-1860

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 jq 1.7.1-8 —

Advisories 10

References