Skip to content
Heist/ feed
Back to feed
Medium

jq: Embedded NUL truncates top-level jq programs loaded with -f

Type: advisorySources: OSV

jq is a command-line JSON processor. In 1.8.1 and earlier, Top-level jq programs loaded from a file with -f are truncated at the first embedded NUL byte on current upstream HEAD. A crafted filter file such as . followed by \x00 and arbitrary suffix compiles and executes as only the prefix before the NUL. This leaves jq with a post-CVE-2026-33948 prefix/full-buffer mismatch on the compilation path even though the JSON parser path has already been fixed.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-41256
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 21:06 UTC · Revision 1

Source evidence

jq: Embedded NUL truncates top-level jq programs loaded with -f

core-osv · Original source

Published 11 May 2026, 17:18 UTC

jq is a command-line JSON processor. In 1.8.1 and earlier, Top-level jq programs loaded from a file with -f are truncated at the first embedded NUL byte on current upstream HEAD. A crafted filter file such as . followed by \x00 and arbitrary suffix compiles and executes as only the prefix before the NUL. This leaves jq with a post-CVE-2026-33948 prefix/full-buffer mismatch on the compilation path even though the JSON parser path has already been fixed.

osv:CVE-2026-41256
Complete source record
{
  "id": "4a8d3e7fce162c495c90fe60e9270c0ea284dc282cb335a8493aa1606f2af86e",
  "url": "https://osv.dev/vulnerability/CVE-2026-41256",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "jq: Embedded NUL truncates top-level jq programs loaded with -f",
    "summary": "jq is a command-line JSON processor. In 1.8.1 and earlier, Top-level jq programs loaded from a file with -f are truncated at the first embedded NUL byte on current upstream HEAD. A crafted filter file such as . followed by \\x00 and arbitrary suffix compiles and executes as only the prefix before the NUL. This leaves jq with a post-CVE-2026-33948 prefix/full-buffer mismatch on the compilation path even though the JSON parser path has already been fixed.",
    "evidence": "osv:CVE-2026-41256",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-41256",
      "aliases": [
        "CVE-2026-41256",
        "GHSA-vf2h-chrj-q3fg"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/jqlang/jq",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "4467af7068b1bcd7f882defff6e7ea674c5357f4"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.8.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:jqlang:jq:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.8.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "jq-1.8.1",
            "jq-1.8.0",
            "jq-1.7.1",
            "jq-1.7",
            "jq-1.7rc2",
            "jq-1.7rc1",
            "jq-1.6",
            "1.6rc2",
            "jq-1.6rc1",
            "jq-1.5rc2",
            "jq-1.5rc1",
            "jq-1.4",
            "jq-1.3",
            "jq-1.2",
            "jq-1.1",
            "jq-1.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-41256.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:23.776087188Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41256.json",
        "https://github.com/jqlang/jq/security/advisories/GHSA-vf2h-chrj-q3fg",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-41256"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-158"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/41xxx/CVE-2026-41256.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-41256",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490077,
  "published_at": "2026-05-11T17:18:30.975+00:00"
}