CVE-2026-49839

Source
https://cve.org/CVERecord?id=CVE-2026-49839
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-49839.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-49839
Aliases
  • GHSA-cfh2-vwfq-qfmm
Downstream
Related
Published
2026-06-25T17:17:46.181Z
Modified
2026-07-08T08:13:40.439620343Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H CVSS Calculator
Summary
jq --rawfile invalid-state reuse after String too long causes heap-buffer-overflow
Details

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 jvloadfile(raw=1) reads an attacker-controlled file, it repeatedly appends file chunks to the same jv string accumulator. Once jvstringappendbuf() returns jvinvalidwithmsg("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 jvpstringptr(). 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49839.json",
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
        "CWE-787"
    ]
}
References

Affected packages

Git / github.com/jqlang/jq

Affected ranges

Type
GIT
Repo
https://github.com/jqlang/jq
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
{
    "source": [
        "AFFECTED_FIELD",
        "CPE_RANGE"
    ],
    "cpe": "cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.8.2"
        }
    ]
}

Affected versions

1.*
1.6rc2
jq-1.*
jq-1.0
jq-1.1
jq-1.2
jq-1.3
jq-1.4
jq-1.5rc1
jq-1.5rc2
jq-1.6
jq-1.6rc1
jq-1.7
jq-1.7.1
jq-1.7rc1
jq-1.7rc2
jq-1.8.0
jq-1.8.1
jq-1.8.2rc1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-49839.json"