{"id":"CVE-2026-25797","aliases":["CVE-2026-25797","GHSA-rw6c-xp26-225v"],"related":[],"kind":"vulnerability","state":"published","title":"ImageMagick vulnerable to Code injection via PostScript header in ps coders","summary":"ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, the ps coders, responsible for writing PostScript files, fails to sanitize the input before writing it into the PostScript header.  An attacker can provide a malicous file and inject arbitrary PostScript code. When the resulting file is processed by a printer or a viewer (like Ghostscript), the injected code is interpreted and executed. The html encoder does not properly escape strings that are written to in the html document. An attacker can provide a malicious file and injection arbitrary html code. Versions 7.1.2-15 and 6.9.13-40 contain a patch.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"ImageMagick is free and open-source software used for editing and manipulating digital images. Prior to versions 7.1.2-15 and 6.9.13-40, the ps coders, responsible for writing PostScript files, fails to sanitize the input before writing it into the PostScript header.  An attacker can provide a malicous file and inject arbitrary PostScript code. When the resulting file is processed by a printer or a viewer (like Ghostscript), the injected code is interpreted and executed. The html encoder does not properly escape strings that are written to in the html document. An attacker can provide a malicious file and injection arbitrary html code. Versions 7.1.2-15 and 6.9.13-40 contain a patch.","source":"cvelist"},{"lang":"en","text":"The ps encoders, responsible for writing PostScript files, fails to sanitize the input before writing it into the PostScript header.  An attacker can provide a malicious file and inject arbitrary PostScript code. When the resulting file is processed by a printer or a viewer (like Ghostscript), the injected code is interpreted and executed.\n\nThe html encoder does not properly escape strings that are written to in the html document. An attacker can provide a malicious file and injection arbitrary html code.","format":"markdown","source":"ghsa"},{"lang":"es","text":"ImageMagick es un software libre y de código abierto utilizado para editar y manipular imágenes digitales. Antes de las versiones 7.1.2-15 y 6.9.13-40, los codificadores ps, responsables de escribir archivos PostScript, no sanean la entrada antes de escribirla en la cabecera PostScript. Un atacante puede proporcionar un archivo malicioso e inyectar código PostScript arbitrario. Cuando el archivo resultante es procesado por una impresora o un visor (como Ghostscript), el código inyectado es interpretado y ejecutado. El codificador html no escapa correctamente las cadenas que se escriben en el documento html. Un atacante puede proporcionar un archivo malicioso e inyectar código html arbitrario. Las versiones 7.1.2-15 y 6.9.13-40 contienen un parche.","source":"nvd"}],"published":"2026-02-24T01:01:22.025Z","modified":"2026-06-17T10:25:15.707Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L","score":5.7,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L","score":5.7,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L","score":5.7,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-94"],"affected":[{"ranges":[{"version":">= 7.0.0, < 7.1.2-15","status":"affected"},{"version":"< 6.9.13-40","status":"affected"}],"vendor":"ImageMagick","product":"ImageMagick","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-AnyCPU","purl":"pkg:nuget/Magick.NET-Q16-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-AnyCPU","purl":"pkg:nuget/Magick.NET-Q16-HDRI-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-OpenMP-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-OpenMP-x64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-OpenMP-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-arm64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x64","purl":"pkg:nuget/Magick.NET-Q16-HDRI-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-HDRI-x86","purl":"pkg:nuget/Magick.NET-Q16-HDRI-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-OpenMP-x64","purl":"pkg:nuget/Magick.NET-Q16-OpenMP-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-OpenMP-x86","purl":"pkg:nuget/Magick.NET-Q16-OpenMP-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-arm64","purl":"pkg:nuget/Magick.NET-Q16-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-x86","purl":"pkg:nuget/Magick.NET-Q16-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-AnyCPU","purl":"pkg:nuget/Magick.NET-Q8-AnyCPU","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q8-OpenMP-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-OpenMP-x64","purl":"pkg:nuget/Magick.NET-Q8-OpenMP-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-arm64","purl":"pkg:nuget/Magick.NET-Q8-arm64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-x64","purl":"pkg:nuget/Magick.NET-Q8-x64","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q8-x86","purl":"pkg:nuget/Magick.NET-Q8-x86","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"14.10.3"}],"ecosystem":"NuGet","package":"Magick.NET-Q16-OpenMP-arm64","purl":"pkg:nuget/Magick.NET-Q16-OpenMP-arm64","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"6.9.13-40"},{"status":"affected","introduced":"7.0.0-0","fixed":"7.1.2-15"}],"vendor":"imagemagick","product":"imagemagick","cpe":"cpe:2.3:a:imagemagick:imagemagick:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-rw6c-xp26-225v","tags":["third-party-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25797","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ImageMagick/ImageMagick/commit/26088a83d71e9daa203d54a56fe3c31f3f85463d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ImageMagick/ImageMagick","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/dlemstra/Magick.NET/releases/tag/14.10.3","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-02-26T15:13:11.583Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-25797","url":"https://www.cve.org/CVERecord?id=CVE-2026-25797","licence":"CVE Terms of Use","modified":"2026-02-26T15:13:42.512Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rw6c-xp26-225v","url":"https://github.com/advisories/GHSA-rw6c-xp26-225v","licence":"CC-BY-4.0","modified":"2026-02-24T16:26:22.429Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-25797","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-25797","licence":"Public domain","modified":"2026-06-17T10:25:15.707Z"}],"updatedAt":"2026-11-25T22:59:14.680Z","epss":{"score":0.00213,"percentile":0.06614,"date":"2026-11-30T12:00:22.000Z"}}