{"id":"CVE-2019-13305","details":"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.","modified":"2026-04-11T08:55:56.169836Z","published":"2019-07-05T01:15:10.563Z","related":["SUSE-SU-2019:2106-1","openSUSE-SU-2019:1983-1"],"references":[{"type":"ADVISORY","url":"https://lists.debian.org/debian-lts-announce/2019/08/msg00021.html"},{"type":"ADVISORY","url":"https://usn.ubuntu.com/4192-1/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2020/dsa-4712"},{"type":"ADVISORY","url":"https://www.debian.org/security/2020/dsa-4715"},{"type":"ADVISORY","url":"http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00069.html"},{"type":"FIX","url":"https://github.com/ImageMagick/ImageMagick/commit/29efd648f38b73a64d73f14cd2019d869a585888"},{"type":"FIX","url":"https://github.com/ImageMagick/ImageMagick/issues/1613"},{"type":"FIX","url":"https://github.com/ImageMagick/ImageMagick6/commit/5c7fbf9a14fb83c9685ad69d48899f490a37609d"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/imagemagick/imagemagick","events":[{"introduced":"0"},{"fixed":"29efd648f38b73a64d73f14cd2019d869a585888"}]},{"type":"GIT","repo":"https://github.com/imagemagick/imagemagick6","events":[{"introduced":"0"},{"fixed":"5c7fbf9a14fb83c9685ad69d48899f490a37609d"}]},{"type":"GIT","repo":"https://github.com/imagemagick/imagemagick","events":[{"introduced":"0"},{"fixed":"29efd648f38b73a64d73f14cd2019d869a585888"}]},{"type":"GIT","repo":"https://github.com/imagemagick/imagemagick6","events":[{"introduced":"0"},{"fixed":"5c7fbf9a14fb83c9685ad69d48899f490a37609d"}]}],"versions":["6.9.10-0","6.9.10-1","6.9.10-10","6.9.10-11","6.9.10-12","6.9.10-13","6.9.10-14","6.9.10-15","6.9.10-16","6.9.10-17","6.9.10-18","6.9.10-19","6.9.10-2","6.9.10-20","6.9.10-21","6.9.10-22","6.9.10-23","6.9.10-24","6.9.10-25","6.9.10-26","6.9.10-27","6.9.10-28","6.9.10-29","6.9.10-3","6.9.10-30","6.9.10-31","6.9.10-32","6.9.10-33","6.9.10-34","6.9.10-35","6.9.10-36","6.9.10-37","6.9.10-38","6.9.10-39","6.9.10-4","6.9.10-40","6.9.10-41","6.9.10-42","6.9.10-43","6.9.10-44","6.9.10-45","6.9.10-46","6.9.10-47","6.9.10-48","6.9.10-49","6.9.10-5","6.9.10-6","6.9.10-7","6.9.10-8","6.9.10-9","6.9.4-0","6.9.4-1","6.9.4-10","6.9.4-2","6.9.4-3","6.9.4-4","6.9.4-5","6.9.4-6","6.9.4-7","6.9.4-8","6.9.4-9","6.9.5-0","6.9.5-1","6.9.5-10","6.9.5-2","6.9.5-3","6.9.5-4","6.9.5-5","6.9.5-6","6.9.5-7","6.9.5-8","6.9.5-9","6.9.6-0","6.9.6-1","6.9.6-2","6.9.6-3","6.9.6-4","6.9.6-5","6.9.6-6","6.9.6-7","6.9.6-8","6.9.7-0","6.9.7-1","6.9.7-10","6.9.7-2","6.9.7-3","6.9.7-4","6.9.7-5","6.9.7-6","6.9.7-7","6.9.7-8","6.9.7-9","6.9.8-0","6.9.8-1","6.9.8-10","6.9.8-2","6.9.8-3","6.9.8-4","6.9.8-5","6.9.8-6","6.9.8-7","6.9.8-8","6.9.8-9","6.9.9-0","6.9.9-1","6.9.9-10","6.9.9-11","6.9.9-12","6.9.9-13","6.9.9-14","6.9.9-15","6.9.9-17","6.9.9-18","6.9.9-19","6.9.9-2","6.9.9-20","6.9.9-21","6.9.9-22","6.9.9-23","6.9.9-24","6.9.9-25","6.9.9-26","6.9.9-27","6.9.9-28","6.9.9-29","6.9.9-3","6.9.9-30","6.9.9-31","6.9.9-32","6.9.9-33","6.9.9-34","6.9.9-35","6.9.9-36","6.9.9-37","6.9.9-38","6.9.9-39","6.9.9-4","6.9.9-40","6.9.9-41","6.9.9-42","6.9.9-43","6.9.9-44","6.9.9-45","6.9.9-46","6.9.9-47","6.9.9-48","6.9.9-49","6.9.9-5","6.9.9-50","6.9.9-51","6.9.9-6","6.9.9-7","6.9.9-8","6.9.9-9","7.0.1-0","7.0.1-1","7.0.1-10","7.0.1-2","7.0.1-3","7.0.1-4","7.0.1-5","7.0.1-6","7.0.1-7","7.0.1-8","7.0.1-9","7.0.2-0","7.0.2-1","7.0.2-10","7.0.2-2","7.0.2-3","7.0.2-4","7.0.2-5","7.0.2-6","7.0.2-7","7.0.2-8","7.0.2-9","7.0.3-0","7.0.3-1","7.0.3-10","7.0.3-2","7.0.3-3","7.0.3-4","7.0.3-5","7.0.3-6","7.0.3-7","7.0.3-8","7.0.3-9","7.0.4-0","7.0.4-1","7.0.4-10","7.0.4-2","7.0.4-3","7.0.4-4","7.0.4-5","7.0.4-6","7.0.4-7","7.0.4-8","7.0.4-9","7.0.5-0","7.0.5-1","7.0.5-10","7.0.5-2","7.0.5-3","7.0.5-4","7.0.5-5","7.0.5-6","7.0.5-7","7.0.5-8","7.0.5-9","7.0.6-0","7.0.6-1","7.0.6-2","7.0.6-3","7.0.6-4","7.0.6-5","7.0.6-6","7.0.6-7","7.0.6-8","7.0.6-9","7.0.7-0","7.0.7-1","7.0.7-10","7.0.7-11","7.0.7-12","7.0.7-13","7.0.7-14","7.0.7-15","7.0.7-16","7.0.7-17","7.0.7-18","7.0.7-19","7.0.7-2","7.0.7-20","7.0.7-21","7.0.7-22","7.0.7-23","7.0.7-24","7.0.7-25","7.0.7-26","7.0.7-27","7.0.7-28","7.0.7-29","7.0.7-3","7.0.7-30","7.0.7-31","7.0.7-32","7.0.7-33","7.0.7-34","7.0.7-35","7.0.7-36","7.0.7-37","7.0.7-38","7.0.7-39","7.0.7-4","7.0.7-5","7.0.7-6","7.0.7-8","7.0.7-9","7.0.7.7","7.0.8-0","7.0.8-1","7.0.8-10","7.0.8-11","7.0.8-12","7.0.8-13","7.0.8-14","7.0.8-15","7.0.8-16","7.0.8-17","7.0.8-18","7.0.8-19","7.0.8-2","7.0.8-20","7.0.8-21","7.0.8-22","7.0.8-23","7.0.8-24","7.0.8-25","7.0.8-26","7.0.8-27","7.0.8-28","7.0.8-29","7.0.8-3","7.0.8-30","7.0.8-31","7.0.8-32","7.0.8-33","7.0.8-34","7.0.8-35","7.0.8-36","7.0.8-37","7.0.8-38","7.0.8-39","7.0.8-4","7.0.8-40","7.0.8-41","7.0.8-42","7.0.8-43","7.0.8-44","7.0.8-45","7.0.8-46","7.0.8-47","7.0.8-48","7.0.8-49","7.0.8-5","7.0.8-6","7.0.8-7","7.0.8-8","7.0.8-9"],"database_specific":{"vanir_signatures_modified":"2026-04-11T08:55:56Z","unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"7.0.8-50-q16"}]},{"events":[{"introduced":"0"},{"last_affected":"8.0"}]},{"events":[{"introduced":"0"},{"last_affected":"9.0"}]},{"events":[{"introduced":"0"},{"last_affected":"10.0"}]},{"events":[{"introduced":"0"},{"last_affected":"16.04"}]},{"events":[{"introduced":"0"},{"last_affected":"18.04"}]},{"events":[{"introduced":"0"},{"last_affected":"19.04"}]},{"events":[{"introduced":"0"},{"last_affected":"19.10"}]},{"events":[{"introduced":"0"},{"last_affected":"15.0"}]},{"events":[{"introduced":"0"},{"last_affected":"15.1"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2019-13305.json","vanir_signatures":[{"signature_type":"Line","target":{"file":"coders/pnm.c"},"id":"CVE-2019-13305-1c6537f9","digest":{"line_hashes":["173762177608646474229096952035740399235","289406497514684310294962166107346125501","21097388086084617718518641042937076416","35642898481975699506351846593204015195","77906465006221657393526514938524859468","285544180431742860460340536518089203315","331103141952356089566155178080339761980","208860185305730238549952908594482552465","223298258395674198923092237956824505086","136093366047081782534432463312274729429","221104929025802232976201896599260669426","163154869902866174508379178574013779285","222362234539984236477823386084086610404","21097388086084617718518641042937076416","35642898481975699506351846593204015195","77906465006221657393526514938524859468","285544180431742860460340536518089203315","331103141952356089566155178080339761980","208860185305730238549952908594482552465","223298258395674198923092237956824505086","136093366047081782534432463312274729429","221104929025802232976201896599260669426"],"threshold":0.9},"source":"https://github.com/imagemagick/imagemagick6/commit/5c7fbf9a14fb83c9685ad69d48899f490a37609d","signature_version":"v1","deprecated":false},{"signature_type":"Function","target":{"function":"WritePNMImage","file":"coders/pnm.c"},"id":"CVE-2019-13305-2814054e","digest":{"length":21296,"function_hash":"332819623678125575910808390063345700395"},"source":"https://github.com/imagemagick/imagemagick6/commit/5c7fbf9a14fb83c9685ad69d48899f490a37609d","signature_version":"v1","deprecated":false},{"signature_type":"Function","target":{"function":"WritePNMImage","file":"coders/pnm.c"},"id":"CVE-2019-13305-c830bb5e","digest":{"length":21985,"function_hash":"137037883599812925999839805869440558077"},"source":"https://github.com/imagemagick/imagemagick/commit/29efd648f38b73a64d73f14cd2019d869a585888","signature_version":"v1","deprecated":false},{"signature_type":"Line","target":{"file":"coders/pnm.c"},"id":"CVE-2019-13305-dd7809ac","digest":{"line_hashes":["63560967211026655781415365551152740604","17561297529628399240895611359329573059","21097388086084617718518641042937076416","35642898481975699506351846593204015195","77906465006221657393526514938524859468","285544180431742860460340536518089203315","331103141952356089566155178080339761980","208860185305730238549952908594482552465","191554334367101042462272792348364098863","251469381905454677448473595287462568586","68682566748185754501242263673426332532","199112087754320044143379395221326717145","22717455355125320837774627697453994572","21097388086084617718518641042937076416","35642898481975699506351846593204015195","77906465006221657393526514938524859468","285544180431742860460340536518089203315","331103141952356089566155178080339761980","208860185305730238549952908594482552465","191554334367101042462272792348364098863","251469381905454677448473595287462568586","68682566748185754501242263673426332532"],"threshold":0.9},"source":"https://github.com/imagemagick/imagemagick/commit/29efd648f38b73a64d73f14cd2019d869a585888","signature_version":"v1","deprecated":false}]}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"}]}