Skip to content
Heist/ feed
Back to feed
HighFix available

htslib — security advisory

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

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. While most alignment records store DNA sequence and quality values, the format also allows them to omit this data in certain cases to save space. Due to some quirks of the CRAM format, it is necessary to handle these records carefully as they will actually store data that needs to be consumed and then discarded. Unfortunately the `CONST`, `XPACK` and `XRLE` encodings did not properly implement the interface needed to do this. Trying to decode records with omitted sequence or quality data using these encodings would result in an attempt to write to a NULL pointer. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.

Products
htslib
Affected versions
1.16+ds-3, 1.17+ds-0+exp1, 1.17+ds-1, 1.18+ds-0+exp1, 1.18+ds-1, 1.19+ds-0+exp0, 1.19+ds-1, 1.19+ds-1+exp1, 1.19+ds-1.1, 1.20+ds-1, 1.20+ds-2, 1.21+ds-0+exp1, 1.21+ds-0+exp2, 1.21+ds-1, 1.22.1+ds-1, 1.22.1+ds-2, 1.22.1+ds2-1, 1.24-1, 1.24-2, 1.24-3
Fixed versions
1.24-2
CVEs
CVE-2026-31964
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 08:20 UTC · Revision 1

Source evidence

DEBIAN-CVE-2026-31964

core-osv · Original source

Published 18 Mar 2026, 19:16 UTC

HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. While most alignment records store DNA sequence and quality values, the format also allows them to omit this data in certain cases to save space. Due to some quirks of the CRAM format, it is necessary to handle these records carefully as they will actually store data that needs to be consumed and then discarded. Unfortunately the `CONST`, `XPACK` and `XRLE` encodings did not properly implement the interface needed to do this. Trying to decode records with omitted sequence or quality data using these encodings would result in an attempt to write to a NULL pointer. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.

osv:DEBIAN-CVE-2026-31964

htslib

Fixed versions: Not specified

htslib

Fixed versions: Not specified

htslib

Fixed versions: 1.24-2

Complete source record
{
  "id": "42665a833c1eff3da5572a01e3ef8bb20fe8f48387b43a4b2b60afd824f178ae",
  "url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-31964",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DEBIAN-CVE-2026-31964",
    "summary": "HTSlib is a library for reading and writing bioinformatics file formats. CRAM is a compressed format which stores DNA sequence alignment data using a variety of encodings and compression methods. While most alignment records store DNA sequence and quality values, the format also allows them to omit this data in certain cases to save space. Due to some quirks of the CRAM format, it is necessary to handle these records carefully as they will actually store data that needs to be consumed and then discarded. Unfortunately the `CONST`, `XPACK` and `XRLE` encodings did not properly implement the interface needed to do this. Trying to decode records with omitted sequence or quality data using these encodings would result in an attempt to write to a NULL pointer. Exploiting this bug causes a NULL pointer dereference. Typically this will cause the program to crash. Versions 1.23.1, 1.22.2 and 1.21.1 include fixes for this issue. There is no workaround for this issue.",
    "evidence": "osv:DEBIAN-CVE-2026-31964",
    "products": [
      {
        "name": {
          "value": "htslib",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.16+ds-3",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.17+ds-0+exp1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.17+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.18+ds-0+exp1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.18+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.19+ds-0+exp0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.19+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.19+ds-1+exp1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.19+ds-1.1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.20+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.20+ds-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.21+ds-0+exp1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.21+ds-0+exp2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.21+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.22.1+ds-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.22.1+ds-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.22.1+ds2-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.24-1",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.24-2",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.24-3",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "htslib",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "1.21+ds-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.22.1+ds-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.22.1+ds-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.22.1+ds2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.24-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.24-2",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.24-3",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "htslib",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.24-2",
            "evidence": "/affected/2/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.21+ds-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.22.1+ds-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.22.1+ds-2",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.22.1+ds2-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "1.24-1",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "DEBIAN-CVE-2026-31964",
      "aliases": [
        "DEBIAN-CVE-2026-31964"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "htslib",
            "purl": "pkg:deb/debian/htslib?arch=source&distro=bookworm",
            "ecosystem": "Debian:12"
          },
          "versions": [
            "1.16+ds-3",
            "1.17+ds-0+exp1",
            "1.17+ds-1",
            "1.18+ds-0+exp1",
            "1.18+ds-1",
            "1.19+ds-0+exp0",
            "1.19+ds-1",
            "1.19+ds-1+exp1",
            "1.19+ds-1.1",
            "1.20+ds-1",
            "1.20+ds-2",
            "1.21+ds-0+exp1",
            "1.21+ds-0+exp2",
            "1.21+ds-1",
            "1.22.1+ds-1",
            "1.22.1+ds-2",
            "1.22.1+ds2-1",
            "1.24-1",
            "1.24-2",
            "1.24-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-31964.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "htslib",
            "purl": "pkg:deb/debian/htslib?arch=source&distro=trixie",
            "ecosystem": "Debian:13"
          },
          "versions": [
            "1.21+ds-1",
            "1.22.1+ds-1",
            "1.22.1+ds-2",
            "1.22.1+ds2-1",
            "1.24-1",
            "1.24-2",
            "1.24-3"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-31964.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "1.24-2"
                }
              ]
            }
          ],
          "package": {
            "name": "htslib",
            "purl": "pkg:deb/debian/htslib?arch=source&distro=forky",
            "ecosystem": "Debian:14"
          },
          "versions": [
            "1.21+ds-1",
            "1.22.1+ds-1",
            "1.22.1+ds-2",
            "1.22.1+ds2-1",
            "1.24-1"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-31964.json"
          },
          "ecosystem_specific": {
            "urgency": "not yet assigned"
          }
        }
      ],
      "modified": "2026-10-19T17:00:07.090886290Z",
      "provider": "osv",
      "upstream": [
        "CVE-2026-31964"
      ],
      "references": [
        "https://security-tracker.debian.org/tracker/CVE-2026-31964"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2026-31964",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 375445,
  "published_at": "2026-03-18T19:16:04.633+00:00"
}