# CVE-2026-106443: WeasyPrint arbitrary code execution via EPS image processing

Source: https://junglewise.ai/threats/cve-2026-106443-weasyprint-helps-web-developers-to-create-pdf-documents-prior-to  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-06. Updated: 2026-10-06  
License: CC BY 4.0 with a link back

CVE-2026-106443 · Severity: high · CVSS 8.8 · Published 2026-10-06

WeasyPrint is a Python library that converts HTML and CSS into PDF documents. Before version 70.0, it accepted PostScript and EPS image formats without restrictions and passed them to the Pillow image library, which invokes Ghostscript for rendering. On systems with Ghostscript installed, an attacker can embed malicious PostScript code in an image to achieve remote code execution, particularly if Ghostscript has a sandbox bypass vulnerability.

Technologies: [Kozea Weasyprint](https://junglewise.ai/threats/technologies/weasyprint), [weasyprint (PyPI)](https://junglewise.ai/threats/technologies/pypi-weasyprint). Vendors: [Kozea](https://junglewise.ai/threats/vendors/kozea), [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-106443 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-106443 being exploited in the wild.

**How severe is CVE-2026-106443?** High severity, with a CVSS score of 8.8, published 6 October 2026.

**Which products and versions are affected?** Kozea Weasyprint before 70.0; weasyprint (PyPI) <= 69.0, ECOSYSTEM:introduced=0,fixed=70.0.

**Is there a fix for CVE-2026-106443?** Yes. weasyprint (PyPI): upgrade to 70.0 or later. Until then: Avoid processing untrusted images with WeasyPrint, or uninstall Ghostscript from hosts that process potentially malicious content. Restrict the URL fetcher to filter metadata and stylesheets passed as parameters. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-106443 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-106443?** Check whether you run Kozea Weasyprint or weasyprint (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- weasyprint (PyPI): upgrade to 70.0 or later

  ```sh
  pip install "weasyprint>=70.0"
  ```


Avoid processing untrusted images with WeasyPrint, or uninstall Ghostscript from hosts that process potentially malicious content. Restrict the URL fetcher to filter metadata and stylesheets passed as parameters.

## Technical details

The vulnerability exists in weasyprint/images.py, which passes untrusted image bytes from HTML img tags, CSS image properties, SVG references, and data URIs directly to Pillow's generic image dispatcher. Pillow's EpsImagePlugin invokes Ghostscript to rasterize EPS/PostScript images; attackers can craft malicious PostScript to exploit interpreter bugs or sandbox bypasses. The attack requires Ghostscript to be installed on the host and only affects systems that process untrusted images.

## Affected products

- Kozea WeasyPrint before 70.0

## Identifiers

- CVE-2026-106443
- GHSA-r543-q48m-4c9j
- PYSEC-2026-4311

## Timeline

- 2026-10-06: disclosed
- 2026-09-08: patched: WeasyPrint v70.0 released with fix to reject EPS images

## References

- [https://github.com/Kozea/WeasyPrint/commit/39cd37ce1610bd890388e26591c569db1cbab542](https://github.com/Kozea/WeasyPrint/commit/39cd37ce1610bd890388e26591c569db1cbab542)
- [https://github.com/Kozea/WeasyPrint/releases/tag/v70.0](https://github.com/Kozea/WeasyPrint/releases/tag/v70.0)

## Related threats

- [WeasyPrint server-side request forgery and local file read via url_fetcher bypass](https://junglewise.ai/threats/cve-2026-55073-weasyprint-server-side-request-forgery-and-local-file-read-via)
- [PYSEC-2026-2033 - WeasyPrint allows the attachment of arbitrary files and URLs to a PDF](https://junglewise.ai/threats/cve-2024-28184-weasyprint-arbitrary-file-attachment-in-pdf-generation)
- [Kozea WeasyPrint CSS injection in presentational hints](https://junglewise.ai/threats/cve-2026-49452-kozea-weasyprint-css-injection-in-presentational-hints)
- [Kozea WeasyPrint SSRF bypass in default_url_fetcher](https://junglewise.ai/threats/cve-2025-68616-kozea-weasyprint-ssrf-bypass-in-default-url-fetcher)
