{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "1.21.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "1.22.0"
                  },
                  {
                    "fixed": "1.22.3"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "introduced": "1.23.0"
                  },
                  {
                    "fixed": "1.23.2"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              },
              {
                "range": [
                  {
                    "fixed": "4af640f9ffd7f1fac95a739df7f560e3e5557960"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "504fb841b70afb948f58089c3a4337ce875c1e52"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "567fd43c6ef938de53c98217f99336e3ce5a60ab"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "range": [
                  {
                    "fixed": "cdf22929aad8dde719c1b2070ad565ac9dd76c02"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              },
              {
                "original_tag": "1.21.2",
                "range": [
                  {
                    "fixed": "03e8c34690124033f6552a22442418c93f058388"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "1.22.3",
                "range": [
                  {
                    "fixed": "22ef718565b378e0604e678761fd4be3b1e4055b"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "1.23.2",
                "range": [
                  {
                    "fixed": "3beae100a4c6b066e7f601f7e244bb371b9c1c16"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "original_tag": "1.24",
                "range": [
                  {
                    "fixed": "4b705e4fada8ee2b6b15746f725ee8ac51631803"
                  }
                ],
                "source": "REFERENCES_TAG"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "03e8c34690124033f6552a22442418c93f058388"
            },
            {
              "fixed": "22ef718565b378e0604e678761fd4be3b1e4055b"
            },
            {
              "fixed": "3beae100a4c6b066e7f601f7e244bb371b9c1c16"
            },
            {
              "fixed": "4af640f9ffd7f1fac95a739df7f560e3e5557960"
            },
            {
              "fixed": "504fb841b70afb948f58089c3a4337ce875c1e52"
            },
            {
              "fixed": "567fd43c6ef938de53c98217f99336e3ce5a60ab"
            },
            {
              "fixed": "cdf22929aad8dde719c1b2070ad565ac9dd76c02"
            },
            {
              "fixed": "4b705e4fada8ee2b6b15746f725ee8ac51631803"
            }
          ],
          "repo": "https://github.com/samtools/htslib",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4hjq-r829-8c8v"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-122",
      "CWE-787"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62256.json"
  },
  "details": "HTSlib is a library for reading and writing bioinformatics file formats. Prior to 1.21.2, 1.22.3, 1.23.2, and 1.24, fai_retrieve does not verify that the line width recorded in a FASTA .fai index is greater than or equal to the number of bases per line. When the line width is exactly one less than the base count, retrieval allocates an undersized heap buffer and writes one byte beyond its end; larger discrepancies instead cause an allocation failure that is handled. This issue can corrupt heap memory and crash the process. This issue is fixed in versions 1.21.2, 1.22.3, 1.23.2, and 1.24.",
  "id": "CVE-2026-62256",
  "modified": "2026-11-19T16:46:06.284963454Z",
  "published": "2026-11-19T15:52:04.669Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/62xxx/CVE-2026-62256.json"
    },
    {
      "type": "FIX",
      "url": "https://github.com/samtools/htslib/commit/4af640f9ffd7f1fac95a739df7f560e3e5557960"
    },
    {
      "type": "FIX",
      "url": "https://github.com/samtools/htslib/commit/504fb841b70afb948f58089c3a4337ce875c1e52"
    },
    {
      "type": "FIX",
      "url": "https://github.com/samtools/htslib/commit/567fd43c6ef938de53c98217f99336e3ce5a60ab"
    },
    {
      "type": "FIX",
      "url": "https://github.com/samtools/htslib/commit/cdf22929aad8dde719c1b2070ad565ac9dd76c02"
    },
    {
      "type": "FIX",
      "url": "https://github.com/samtools/htslib/pull/2008"
    },
    {
      "type": "WEB",
      "url": "https://github.com/samtools/htslib/releases/tag/1.21.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/samtools/htslib/releases/tag/1.22.3"
    },
    {
      "type": "WEB",
      "url": "https://github.com/samtools/htslib/releases/tag/1.23.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/samtools/htslib/releases/tag/1.24"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/samtools/htslib/security/advisories/GHSA-4hjq-r829-8c8v"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-62256"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "HTSlib: Heap write overflow in HTSlib FASTA index handling"
}