{"answers":{"affected":"It affects 1 product.","exploited":"There is no known exploitation of CVE-2026-31972 in the wild and no public exploit code.","fix":"No fix has been published for CVE-2026-31972 yet. Limit exposure of the affected software until one is available.","what":"CVE-2026-31972 is a medium-severity use after free vulnerability in samtools, published on 18 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-31972 and fix it if it is affected.\n\nWhat it is: CVE-2026-31972 is a medium-severity use after free vulnerability in samtools, published on 18 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-31972 in the wild and no public exploit code.\n\nAffected product: samtools. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-31972/ (Markdown: https://insights.sbomify.com/CVE-2026-31972/index.md)","id":"CVE-2026-31972","markdown":"https://insights.sbomify.com/CVE-2026-31972/index.md","name":"CVE-2026-31972","record":{"aliases":["DEBIAN-CVE-2026-31972","GHSA-72c8-4jf3-f27p","UBUNTU-CVE-2026-31972"],"analysis":{"component_type":"desktop_application","fix_type":"upgrade","impacts":["data_read","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Bioinformatics tool","requires_auth":"none","summary":"An attacker can trigger a use-after-free in samtools mpileup, potentially leaking program state or causing a crash.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"samtools","vendor":"samtools"}],"cvss":{"score":6.9,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"description":"SAMtools is a program for reading, manipulating and writing bioinformatics file formats. The `mpileup` command outputs DNA sequences that have been aligned against a known reference. On each output line it writes the reference position, optionally the reference DNA base at that position (obtained from a separate file) and all of the DNA bases that aligned to that position. As the output is ordered by position, reference data that is no longer needed is discarded once it has been printed out. Under certain conditions the data could be discarded too early, leading to an attempt to read from a pointer to freed memory. This bug may allow information about program state to be leaked. It may also cause a program crash through an attempt to access invalid memory. This bug is fixed in versions 1.21.1 and 1.22. There is no workaround for this issue.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":false,"headline":"samtools mpileup has use-after-free leading to an invalid read","id":"CVE-2026-31972","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"use_after_free","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"NULL pointer dereference in samtools cram-size","id":"CVE-2026-31973"},"packages":[],"prev":{"headline":"HTSlib CRAM decoder vulnerable to buffer overflow","id":"CVE-2026-31971"},"products":["samtools"],"published":"2026-03-18","related":[{"cvss_score":6.9,"headline":"NULL pointer dereference in samtools cram-size","id":"CVE-2026-31973","kev_date_added":null,"published":"2026-03-18"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-03-19","vendors":["samtools"]},"summary":"An attacker can trigger a use-after-free in samtools mpileup, potentially leaking program state or causing a crash.","url":"https://insights.sbomify.com/CVE-2026-31972/"}