Skip to content
Heist/ feed
Back to feed
MediumFix available

jq — security advisory

Type: advisorySources: OSVAdvisory ID: DEBIAN-CVE-2026-33948

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.

Products
jq
Affected versions
1.6-2.1, 1.6-2.1+deb12u1, 1.7.1-6+deb13u1, 1.8.0-1, 1.8.1-1, 1.8.1-2, 1.8.1-3, 1.8.1-4
Fixed versions
1.6-2.1+deb12u2, 1.7.1-6+deb13u2, 1.8.1-5
CVEs
CVE-2026-33948
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 17:49 UTC · Revision 1

Source evidence

DEBIAN-CVE-2026-33948

core-osv · Original source

Published 14 Apr 2026, 00:16 UTC

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.

osv:DEBIAN-CVE-2026-33948

jq

Fixed versions: 1.6-2.1+deb12u2

jq

Fixed versions: 1.7.1-6+deb13u2

jq

Fixed versions: 1.8.1-5

Complete source record
{
  "id": "0bdd281649882037ed093366b7204586046d2399af09c9f7aab4a584b16ea991",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-33948",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-33948",
    "summary": "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.",
    "evidence": "osv:DEBIAN-CVE-2026-33948",
    "products": [
      {
        "name": {
          "value": "jq",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.6-2.1+deb12u2",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.6-2.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.6-2.1+deb12u1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jq",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.7.1-6+deb13u2",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.7.1-6+deb13u1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "jq",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.8.1-5",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.8.0-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-3",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.8.1-4",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "DEBIAN-CVE-2026-33948",
      "aliases": [
        "DEBIAN-CVE-2026-33948"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.6-2.1+deb12u2"
                }
              ]
            }
          ],
          "package": {
            "name": "jq",
            "purl": "pkg:deb/debian/jq?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "1.6-2.1",
            "1.6-2.1+deb12u1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33948.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.7.1-6+deb13u2"
                }
              ]
            }
          ],
          "package": {
            "name": "jq",
            "purl": "pkg:deb/debian/jq?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "1.7.1-6+deb13u1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33948.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.8.1-5"
                }
              ]
            }
          ],
          "package": {
            "name": "jq",
            "purl": "pkg:deb/debian/jq?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "1.8.0-1",
            "1.8.1-1",
            "1.8.1-2",
            "1.8.1-3",
            "1.8.1-4"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-33948.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-27T09:47:37.622842344Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-33948"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-33948"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-33948",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 461280,
  "published_at": "2026-04-14T00:16:06.867+00:00"
}