IT SBIT Services
Schneeberger
DEEN
CVE tracker

Kozea WeasyPrint: Remote code execution via EPS images in Ghostscript

CVE-2026-106443High 8.8

← All vulnerabilities

Summary

WeasyPrint, a Python library that converts HTML and CSS into PDF documents, passes image data from HTML, CSS, SVG and data URIs to Pillow without excluding EPS/PostScript formats. On hosts with Ghostscript installed, a crafted EPS image can make Ghostscript interpret attacker-controlled PostScript, which can lead to remote code execution if the installed Ghostscript version has a usable sandbox bypass. Hosts without Ghostscript do not reach this code path.

Affected

  • WeasyPrint versions before 70.0
  • Exploitable only where Ghostscript is installed on the host
  • Some trackers list up to 69.x; the vendor's fixed version is 70.0

Fixed in

  • Upgrade to WeasyPrint 70.0 or later (vendor fix, commit 39cd37ce1610bd890388e26591c569db1cbab542)
  • Exact patched versions in Linux distribution packages: Unknown.

Workaround

  • Remove Ghostscript from hosts running WeasyPrint if an upgrade cannot be done immediately (inferred from the CVE text, not an official vendor recommendation)
  • Do not rely on Ghostscript -dSAFER as a control; multiple bypasses are known.
  • Note: WeasyPrint 70.0 no longer renders EPS images, which may cause functional changes.

Exploitation

  • CISA SSVC: exploitation none, automatable no, technical impact total.
  • Not listed in the CISA KEV catalogue. EPSS about 0.007.
  • Public proof of concept: Unknown.

Our recommendation

  • Check whether WeasyPrint is installed and which version is in use, including in containers and custom Python applications.
  • Upgrade to WeasyPrint 70.0 or later and test EPS-related rendering for regressions.
  • If Ghostscript is not needed on hosts running WeasyPrint, remove it.
  • Prioritise services that render untrusted HTML or images.
  • Monitor the vendor advisory GHSA-r543-q48m-4c9j for updates.

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 21:42.

Original description (NVD)

WeasyPrint helps web developers to create PDF documents. Prior to 70.0, the image-loading path in weasyprint/images.py passes fetched image bytes from HTML img URLs, CSS image values, SVG image references, and data URIs to Pillow's generic image dispatcher without excluding EPS or PostScript formats. On hosts with Ghostscript installed, Pillow EpsImagePlugin invokes the interpreter for attacker-controlled PostScript, which can produce interpreter-permitted effects and can lead to remote code execution when the installed Ghostscript version has a usable sandbox bypass. Hosts without Ghostscript do not reach this rasterization path. This issue is fixed in version 70.0.

NVD references (3)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.