Security Advisory: CVE-2026-39979

Severity
Medium
Published
2026-08-10
Fixed versions
  • 3.15.0.3
  • 3.14.0.12
  • 3.13.0.9
  • 3.12.0.10
  • 3.10.0.17
  • 3.4.3.29
Affected versions
  • 3.15.0.0 to 3.15.0.2
  • 3.14.0.0 to 3.14.0.11
  • 3.13.0.0 to 3.13.0.8
  • 3.12.0.0 to 3.12.0.9
  • 3.10.0.0 to 3.10.0.16
  • 3.4.0.0 to 3.4.3.28

CVE

Description

Severity

Affects Kong

CVE-2026-39979 libjq out-of-bounds read in jv_parse_sized() Medium (CVSS 4.0: 6.9) Yes

A medium-severity libjq out-of-bounds read vulnerability may affect Kong API Gateway Enterprise and Kong AI Gateway Enterprise.

CVE-2026-39979

Kong API Gateway Enterprise and Kong AI Gateway Enterprise include libjq, which is exposed to Kong’s Lua runtime and may be affected by an out-of-bounds read in the libjq counted-buffer parsing API.

The vulnerable jv_parse_sized() function accepts an input buffer together with an explicit length. When malformed JSON causes parsing to fail, an affected error-handling path may subsequently treat the supplied buffer as a NUL-terminated string.

If the supplied buffer does not contain a NUL terminator within its allocated bounds, libjq may read beyond the end of the buffer while constructing the parsing error message.

An attacker able to provide malformed JSON to an affected libjq parsing path could cause an NGINX worker process to read adjacent memory. Successful exploitation may result in limited disclosure of process memory or cause the worker process to terminate, potentially leading to information exposure, service degradation, or a denial-of-service condition.

  • Severity: Medium
  • CVSS v4.0 score: 6.9
  • Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Am I affected?

You should consider a Kong Gateway deployment affected if all of the following are true:

  • A plugin or custom Lua component parses JSON using Kong’s libjq integration.
  • The affected Lua-to-libjq execution path invokes jv_parse_sized().
  • An attacker can provide malformed JSON to that parsing operation.
  • The input is passed as a counted buffer that is not guaranteed to contain a NUL terminator within its allocated bounds.
  • The affected parsing operation is reachable through an untrusted or internet-accessible listener.

The vulnerability applies to the libjq API and is therefore potentially relevant to embedded libjq consumers such as Kong. However, merely using jq filters through Lua does not by itself establish that the vulnerable conditions are present. Deployments are not affected if the Lua binding does not invoke jv_parse_sized(), guarantees that input buffers are NUL-terminated, or does not parse attacker-controlled JSON through the affected path.

Impacted products

All Kong API Gateway Enterprise versions prior to the patch versions listed in the Patches section.

Patches

The vulnerability is addressed by applying the following patch:

Impacted supported versions of Kong API Gateway Enterprise

Patch

3.15.0.0 - 3.15.0.2 3.15.0.3
3.14.0.0 - 3.14.0.11 3.14.0.12
3.13.0.0 - 3.13.0.8 3.13.0.9
3.12.0.0 - 3.12.0.9 3.12.0.10
3.10.0.0 - 3.10.0.16 3.10.0.17
3.4.0.0 - 3.4.3.28 3.4.3.29

Contact

If you have questions or need help, open a case with Kong Support or email support@konghq.com.

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!