OESA-2026-1981

Source
https://www.openeuler.org/en/security/security-bulletins/detail/?id=openEuler-SA-2026-1981
Import Source
https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json
JSON Data
https://api.osv.dev/v1/vulns/OESA-2026-1981
Upstream
  • CVE-2026-32316
  • CVE-2026-33947
  • CVE-2026-33948
  • CVE-2026-39956
  • CVE-2026-39979
  • CVE-2026-40164
Published
2026-04-17T13:03:22Z
Modified
2026-04-17T13:20:44.962218Z
Summary
jq security update
Details

jq is a lightweight and flexible command-line JSON processor. you can use it to slice and filter and map and transform structured data. It is written in portable C, and it has zero runtime dependencies. it can mangle the data format that you have into the one that you want.

Security Fix(es):

jq is a command-line JSON processor. An integer overflow vulnerability exists through version 1.8.1 within the jvpstringappend() and jvpstringcopyreplacebad 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.(CVE-2026-32316)

jq is a command-line JSON processor. In versions 1.8.1 and below, functions jvsetpath(), jvgetpath(), and delpathssorted() in jq's src/jvaux.c use unbounded recursion whose depth is controlled by the length of a caller-supplied path array, with no depth limit enforced. An attacker can supply a JSON document containing a flat array of ~65,000 integers (~200 KB) that, when used as a path argument by a trusted jq filter, exhausts the C call stack and crashes the process with a segmentation fault (SIGSEGV). This bypass works because the existing MAXPARSINGDEPTH (10,000) limit only protects the JSON parser, not runtime path operations where arrays can be programmatically constructed to arbitrary lengths. The impact is denial of service (unrecoverable crash) affecting any application or service that processes untrusted JSON input through jq's setpath, getpath, or delpaths builtins. This issue has been addressed in commit fb59f1491058d58bdc3e8dd28f1773d1ac690a1f.(CVE-2026-33947)

jq is a command-line JSON processor. Commits before 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b contain a vulnerability where CLI input parsing allows validation bypass via embedded NUL bytes. When reading JSON from files or stdin, jq uses strlen() to determine buffer length instead of the actual byte count from fgets(), causing it to truncate input at the first NUL byte and parse only the preceding prefix. This enables an attacker to craft input with a benign JSON prefix before a NUL byte followed by malicious trailing data, where jq validates only the prefix as valid JSON while silently discarding the suffix. Workflows relying on jq to validate untrusted JSON before forwarding it to downstream consumers are susceptible to parser differential attacks, as those consumers may process the full input including the malicious trailing bytes. This issue has been patched by commit 6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b.(CVE-2026-33948)

jq is a command-line JSON processor. In commits after 69785bf77f86e2ea1b4a20ca86775916889e91c9, the strindices builtin in jq's src/builtin.c passes its arguments directly to jvstringindexes() without verifying they are strings, and jvstring_indexes() in src/jv.c relies solely on assert() checks that are stripped in release builds compiled with -DNDEBUG. This allows an attacker to crash jq trivially with input like _strindices(0), and by crafting a numeric value whose IEEE-754 bit pattern maps to a chosen pointer, achieve a controlled pointer dereference and limited memory read/probe primitive. Any deployment that evaluates untrusted jq filters against a release build is vulnerable. This issue has been patched in commit fdf8ef0f0810e3d365cdd5160de43db46f57ed03.(CVE-2026-39956)

jq is a command-line JSON processor. In commits before 2f09060afab23fe9390cce7cb860b10416e1bf5f, the jvparsesized() API in libjq accepts a counted buffer with an explicit length parameter, but its error-handling path formats the input buffer using %s in jvstringfmt(), which reads until a NUL terminator is found rather than respecting the caller-supplied length. This means that when malformed JSON is passed in a non-NUL-terminated buffer, the error construction logic performs an out-of-bounds read past the end of the buffer. The vulnerability is reachable by any libjq consumer calling jvparsesized() with untrusted input, and depending on memory layout, can result in memory disclosure or process termination. The issue has been patched in commit 2f09060afab23fe9390cce7cb860b10416e1bf5f.(CVE-2026-39979)

jq is a command-line JSON processor. Before commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784, jq used MurmurHash3 with a hardcoded, publicly visible seed (0x432A9843) for all JSON object hash table operations, which allowed an attacker to precompute key collisions offline. By supplying a crafted JSON object (~100 KB) where all keys hashed to the same bucket, hash table lookups degraded from O(1) to O(n), turning any jq expression into an O(n²) operation and causing significant CPU exhaustion. This affected common jq use cases such as CI/CD pipelines, web services, and data processing scripts, and was far more practical to exploit than existing heap overflow issues since it required only a small payload. This issue has been patched in commit 0c7d133c3c7e37c00b6d46b658a02244fdd3c784.(CVE-2026-40164)

Database specific
{
    "severity": "High"
}
References

Affected packages

openEuler:20.03-LTS-SP4
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-20.03-LTS-SP4

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2003sp4

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2003sp4.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2003sp4.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2003sp4.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2003sp4.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2003sp4.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2003sp4.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2003sp4.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2003sp4.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2003sp4.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2003sp4.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"
openEuler:22.03-LTS-SP4
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-22.03-LTS-SP4

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2203sp4

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2203sp4.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2203sp4.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2203sp4.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2203sp4.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2203sp4.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2203sp4.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2203sp4.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2203sp4.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2203sp4.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2203sp4.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"
openEuler:24.03-LTS
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-24.03-LTS

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2403sp3

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2403.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403.x86_64.rpm",
        "jq-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp3.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2403.src.rpm",
        "jq-1.8.0-3.oe2403sp1.src.rpm",
        "jq-1.8.0-3.oe2403sp2.src.rpm",
        "jq-1.8.0-3.oe2403sp3.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2403.noarch.rpm",
        "jq-help-1.8.0-3.oe2403sp1.noarch.rpm",
        "jq-help-1.8.0-3.oe2403sp2.noarch.rpm",
        "jq-help-1.8.0-3.oe2403sp3.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2403.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403.aarch64.rpm",
        "jq-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp3.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"
openEuler:24.03-LTS-SP1
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-24.03-LTS-SP1

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2403sp1

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp1.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp1.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2403sp1.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2403sp1.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp1.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp1.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"
openEuler:24.03-LTS-SP2
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-24.03-LTS-SP2

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2403sp2

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp2.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp2.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2403sp2.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2403sp2.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp2.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp2.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"
openEuler:24.03-LTS-SP3
jq

Package

Name
jq
Purl
pkg:rpm/openEuler/jq&distro=openEuler-24.03-LTS-SP3

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.8.0-3.oe2403sp3

Ecosystem specific

{
    "x86_64": [
        "jq-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp3.x86_64.rpm",
        "jq-devel-1.8.0-3.oe2403sp3.x86_64.rpm"
    ],
    "src": [
        "jq-1.8.0-3.oe2403sp3.src.rpm"
    ],
    "noarch": [
        "jq-help-1.8.0-3.oe2403sp3.noarch.rpm"
    ],
    "aarch64": [
        "jq-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-debuginfo-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-debugsource-1.8.0-3.oe2403sp3.aarch64.rpm",
        "jq-devel-1.8.0-3.oe2403sp3.aarch64.rpm"
    ]
}

Database specific

source
"https://repo.openeuler.org/security/data/osv/OESA-2026-1981.json"