---
id: CVE-2026-115504
title: CFITSIO through 4.7.0 Out-of-Bounds Write via ffgcls2 in getcols.c
summary: >-
  CFITSIO through 4.7.0 contains an out-of-bounds write vulnerability in
  ffgcls2() in getcols.c that trusts attacker-controlled heap descriptor lengths
  for variable-length string columns. Attackers can supply a crafted FITS file
  that overf…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-787
vendor: HEASARC
product: cfitsio
affected:
  - cfitsio <= 4.7.0
published: '2026-10-22'
updated: '2026-10-22'
sourceUpdated: '2026-10-22T19:14:04.552Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-115504'
references:
  - url: 'https://gist.github.com/yure1432/98f15c7e8f48dc90ae65646f926aa176'
  - url: 'https://github.com/HEASARC/cfitsio/pull/184'
  - url: >-
      https://github.com/HEASARC/cfitsio/commit/579792e0f85bff0c6733ad5ebdf54c3b5c188686
  - url: 'https://github.com/HEASARC/cfitsio'
  - url: >-
      https://www.vulncheck.com/advisories/cfitsio-through-4.7.0-out-of-bounds-write-via-ffgcls2-in-getcols-c
    label: >-
      VulnCheck Advisory: CFITSIO through 4.7.0 Out-of-Bounds Write via ffgcls2
      in getcols.c
tags:
  - cve.org
ingestedAt: '2026-10-22T22:00:50.410Z'
---

## Overview

CFITSIO through 4.7.0 contains an out-of-bounds write vulnerability in ffgcls2() in getcols.c that trusts attacker-controlled heap descriptor lengths for variable-length string columns. Attackers can supply a crafted FITS file that overflows a fixed 28,800-byte stack buffer and the caller's string array, enabling arbitrary code execution.

## Affected

- `cfitsio <= 4.7.0`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
