jq --rawfile invalid-state reuse after String too long causes heap-buffer-overflow
CVE-2026-49839 is fixed in 4 products on 1 platform, first by ALAS2023-2026-1860, released June 22, 2026. It is not reported as exploited. Patch Radar priority: High.
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.
Where it's fixed
| Product | Fixed in | Fix | Released |
|---|---|---|---|
| Linux | |||
| jq · Debian 12.15 (bookworm) | 1.6-2.1+deb12u2 | DEBIAN-CVE-2026-49839 | Jun 24, 2026 |
| jq · Debian 13.5 (trixie) | 1.7.1-6+deb13u3 | DEBIAN-CVE-2026-49839 | Jun 24, 2026 |
| jq · Debian 14 | 1.8.1-8 | DEBIAN-CVE-2026-49839 | Jun 24, 2026 |
| jq · amzn 2023 | 1.8.1-60.amzn2023 | ALAS2023-2026-1860 | Jun 22, 2026 |
| jq · opensuse-leap 16.0 | 1.7.1-160000.4.1 | OPENSUSE-SU-2026:21318-1 | Jul 13, 2026 |
| jq · sles 15.6 | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 | Sep 21, 2026 |
| jq · sles 15.7 | 1.7.1-150000.3.25.1 | SUSE-SU-2026:4275-1 | Sep 21, 2026 |
| jq · sles 16.0 | 1.7.1-160000.4.1 | SUSE-SU-2026:22637-1 | Jul 13, 2026 |
| jq-debuginfo · amzn 2023 | 1.8.1-60.amzn2023 | ALAS2023-2026-1860 | Jun 22, 2026 |
| jq-debugsource · amzn 2023 | 1.8.1-60.amzn2023 | ALAS2023-2026-1860 | Jun 22, 2026 |
| jq-devel · amzn 2023 | 1.8.1-60.amzn2023 | ALAS2023-2026-1860 | Jun 22, 2026 |
Patch Radar data is free to use with attribution. Terms and how to credit it.
Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.