Description
CFITSIO through 4.7.0 contains a heap-based out-of-bounds read vulnerability in the imcompress.c unquantize helpers that allows attackers to read memory before the fits_rand_value table via a zero or negative ZDITHER0 seed. Attackers can supply a crafted FITS file with a SUBTRACTIVE_DITHER_1 compressed image, read through fits_open_file() and fits_read_pix(), to cause crashes or leak heap contents in decoded pixels.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| HEASARC | cfitsio | ≤ 4.7.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | cfitsio | No fix yet | — |
| Debian 13 | cfitsio | No fix yet | — |
| Debian 12 | cfitsio | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | cfitsio | No fix yet | — |
| Ubuntu 26.04 LTS | cfitsio | No fix yet | — |
| Ubuntu 24.04 LTS | cfitsio | No fix yet | — |
| Ubuntu 22.04 LTS | cfitsio | No fix yet | — |
| Ubuntu 20.04 LTS | cfitsio | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | cfitsio | No fix yet | — |
| Ubuntu 16.04 LTS | cfitsio | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | cfitsio | No fix yet | — |
References
- https://hackmd.io/@haind-pwn/cfitsio-zdither0-dither-seed-oob-read technical-description
- https://github.com/HEASARC/cfitsio/blob/d6d27653740864a0483e74cff23c53e34e1dceee/imcompress.c#L5353-L5362 technical-description
- https://github.com/HEASARC/cfitsio/blob/d6d27653740864a0483e74cff23c53e34e1dceee/imcompress.c#L7495-L7516 technical-description
- https://github.com/HEASARC/cfitsio product
- VulnCheck Advisory: CFITSIO through 4.7.0 Heap Out-of-Bounds Read via Negative ZDITHER0 Seed third-party-advisory