# CVE-2021-20224: An integer overflow issue was discovered in ImageMagick's ExportIndexQuantum() function in MagickCore/quantum-export.c.

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `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
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 35% of CVEs (2026-12-01)
- Published: 2022-08-25T00:00:00.000Z
- Modified: 2026-06-17T03:33:30.000Z
- Weaknesses: CWE-190
- Assigned by: redhat

## Description

An integer overflow issue was discovered in ImageMagick's ExportIndexQuantum() function in MagickCore/quantum-export.c. Function calls to GetPixelIndex() could result in values outside the range of representable for the 'unsigned char'. When ImageMagick processes a crafted pdf file, this could lead to an undefined behaviour or a crash.

(As written by CVE List.)

## Affected

- ImageMagick: Fixed in ImageMagick-7.0.10-57, ImageMagick6-6.9.11-57
- imagemagick imagemagick: before 6.9.11-57; from 7.0.0-0 before 7.0.10-57

## References

- <https://github.com/ImageMagick/ImageMagick/pull/3083> (issue-tracking, patch, third-party-advisory)
- <https://github.com/ImageMagick/ImageMagick/commit/5af1dffa4b6ab984b5f13d1e91c95760d75f12a6> (patch, third-party-advisory)
- <https://github.com/ImageMagick/ImageMagick6/commit/553054c1cb1e4e05ec86237afef76a32cd7c464d> (patch, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2023/03/msg00008.html> (mailing-list)

## Sources

- CVE List: [CVE-2021-20224](https://www.cve.org/CVERecord?id=CVE-2021-20224), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-20224](https://nvd.nist.gov/vuln/detail/CVE-2021-20224), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-20224 · Whole record: https://cve.day/CVE-2021-20224.json · Rebuilt by cve.day 2026-11-25T22:58:07.789Z
