# CVE-2026-31973: NULL pointer dereference in samtools cram-size

- Severity: Medium 6.9 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.59%, higher than 49% of CVEs (2026-12-01)
- Published: 2026-03-18T20:34:00.846Z
- Modified: 2026-06-17T10:34:52.260Z
- Weaknesses: CWE-476
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

SAMtools is a program for reading, manipulating and writing bioinformatics file formats. Starting in version 1.17, in the cram-size command, used to write information about how well CRAM files are compressed, a check to see if the `cram_decode_compression_header()` was missing. If the function returned an error, this could lead to a NULL pointer dereference. 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.

(As written by CVE List.)

## Affected

- samtools samtools: >= 1.17, < 1.21.1; >= 1.22, < 1.22.2; = 1.23; from 1.17 up to 1.21.1; from 1.22 before 1.22.2; 1.23

## Every score

- GitHub_M: CVSS:4.0 6.9 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/samtools/samtools/security/advisories/GHSA-x86f-q6fj-cm43> (vendor-advisory)
- <https://github.com/samtools/samtools/commit/06fc2a219b3d7c94d3f412c09f6d1efd51199f2f> (patch)
- <http://www.openwall.com/lists/oss-security/2026/03/18/12> (mailing-list, third-party-advisory)

## Sources

- CVE List: [CVE-2026-31973](https://www.cve.org/CVERecord?id=CVE-2026-31973), CVE Terms of Use, modified 2026-03-19
- NVD: [CVE-2026-31973](https://nvd.nist.gov/vuln/detail/CVE-2026-31973), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2026-31973 · Whole record: https://cve.day/CVE-2026-31973.json · Rebuilt by cve.day 2026-11-25T22:59:16.138Z
