# CVE-2019-13305: ImageMagick 7.0.8-50 Q16 has a stack-based buffer overflow at coders/pnm.c in WritePNMImage because of a misplaced strncpy and an off-by-on…

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/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): 2.08%, higher than 82% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2019-07-05T00:53:20.000Z
- Modified: 2026-06-17T02:16:31.493Z
- Weaknesses: CWE-193, CWE-787
- Assigned by: mitre

## Description

ImageMagick 7.0.8-50 Q16 has a stack-based buffer overflow at coders/pnm.c in WritePNMImage because of a misplaced strncpy and an off-by-one error.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- imagemagick imagemagick: 7.0.8-50
- debian debian_linux: 8.0; 9.0; 10.0
- canonical ubuntu_linux: 16.04; 18.04; 19.04; 19.10
- opensuse leap: 15.0; 15.1

## Every score

- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.8 Medium `AV:N/AC:M/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/ImageMagick/ImageMagick/issues/1613> (exploit, issue-tracking, patch, third-party-advisory)
- <https://github.com/ImageMagick/ImageMagick6/commit/5c7fbf9a14fb83c9685ad69d48899f490a37609d> (patch)
- <https://github.com/ImageMagick/ImageMagick/commit/29efd648f38b73a64d73f14cd2019d869a585888> (patch)
- <https://lists.debian.org/debian-lts-announce/2019/08/msg00021.html> (mailing-list, third-party-advisory)
- <http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00069.html> (mailing-list, third-party-advisory, vendor-advisory)
- <https://usn.ubuntu.com/4192-1/> (third-party-advisory, vendor-advisory)
- <https://www.debian.org/security/2020/dsa-4712> (third-party-advisory, vendor-advisory)
- <https://www.debian.org/security/2020/dsa-4715> (third-party-advisory, vendor-advisory)

## Sources

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

---

Page: https://cve.day/CVE-2019-13305 · Whole record: https://cve.day/CVE-2019-13305.json · Rebuilt by cve.day 2026-11-25T22:57:45.448Z
