# JLSEC-2026-845: WriteOnePNGImage() from coders/png.c (the PNG coder) has a for loop with an improper exit condition that can allow an out-of-bounds READ vi…

- Severity: Medium 5.5 (CVSS:3.1, scored by Julia Security Advisories) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-07-30T16:02:27.435Z
- Modified: 2026-07-30T18:23:44.847Z
- Related: CVE-2020-25674

## Description

WriteOnePNGImage() from `coders/png.c` (the PNG coder) has a for loop with an improper exit condition that can allow an out-of-bounds READ via heap-buffer-overflow. This occurs because it is possible for the colormap to have less than 256 valid values but the loop condition will loop 256 times, attempting to pass invalid colormap data to the event logger. The patch replaces the hardcoded 256 value with a call to MagickMin() to ensure the proper value is used. This could impact application availability when a specially crafted input file is processed by ImageMagick. This flaw affects ImageMagick versions prior to 7.0.8-68.

(As written by Julia Security Advisories.)

## Affected

- ImageMagick_jll (Julia): before 6.9.12+0

## Every score

- Julia Security Advisories: CVSS:2.0 `AV:N/AC:M/Au:N/C:N/I:N/A:P`
- Julia Security Advisories: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H`

## References

- <https://bugzilla.redhat.com/show_bug.cgi?id=1891928> (web)
- <https://lists.debian.org/debian-lts-announce/2021/01/msg00010.html> (web)
- <https://lists.debian.org/debian-lts-announce/2023/03/msg00008.html> (web)

## Sources

- Julia Security Advisories: [JLSEC-2026-845](https://osv.dev/vulnerability/JLSEC-2026-845), CC-BY-4.0, modified 2026-07-30

---

Page: https://cve.day/JLSEC-2026-845 · Whole record: https://cve.day/JLSEC-2026-845.json · Rebuilt by cve.day 2026-11-25T22:56:26.258Z
