Read the docs

WeasyPrint passes EPS images to Ghostscript, risking code execution

Priority MEDIUM 42CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

WeasyPrint before 70.0 passes image bytes to Pillow without excluding EPS or PostScript formats, an improper input validation flaw (CWE-20). On hosts with Ghostscript installed, Pillow hands attacker-controlled PostScript to the interpreter. An attacker with low privileges who supplies image content can cause interpreter-permitted effects and possibly code execution, depending on the Ghostscript version. Hosts without Ghostscript do not reach this path.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00915 60th percentileScored 2026-11-07
Fix Fixed WeasyPrint (Kozea): 70.0WeasyPrint (PyPI): 70.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
KozeaWeasyPrintbefore 70.070.0Patch availableCNA
—WeasyPrint (PyPI)before 70.070.0Patch availableGHSA-r543-q48m-4c9j
  • WeasyPrint VendorKozea Affected before 70.0 Fixed in 70.0 Patch available CNA
  • WeasyPrint (PyPI) Vendor— Affected before 70.0 Fixed in 70.0 Patch available GHSA-r543-q48m-4c9j

Remediation

Upgrade the PyPI package WeasyPrint to version 70.0, which fixes this issue.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA WeasyPrint (Kozea) Fixed in 70.0
  • Fix · GHSA-r543-q48m-4c9j WeasyPrint (PyPI) Fixed in 70.0 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat Ansible Automation Platform 2

Timeline

  1. 2026-10-06 Threatist record created from CVE-2026-106443
  2. 2026-10-07 Affected versions changed · Red Hat
  3. 2026-10-07 CVSS score added · Red Hat
  4. 2026-10-07 Alias added: GHSA-r543-q48m-4c9j
  5. 2026-10-07 Fix available: PyPI/[email protected] · GHSA-r543-q48m-4c9j
  6. 2026-10-07 CVSS score added · GHSA-r543-q48m-4c9j
  7. 2026-10-07 Weakness changed · GHSA-r543-q48m-4c9j
  8. 2026-10-07 5 new references · GHSA-r543-q48m-4c9j
  9. 2026-10-07 Priority changed: LOW → MEDIUM
  10. 2026-10-13 Affected versions changed · Red Hat

References

  • TI-2026-69644 Inefficient path parsing in CairoSVG enables denial of service CVSS 4.0HIGH 8.7
  • TI-2026-24451 CairoSVG vulnerable to Exponential DoS via recursive <use> element amplification CVSS 3.1HIGH 7.5
  • TI-2025-42134 WeasyPrint Vulnerable to Server-Side Request Forgery (SSRF) Protection Bypass via HTTP Redirect CVSS 3.1HIGH 7.5
  • TI-2026-36607 WeasyPrint: CSS Injection via Presentational Hints CVSS 3.1MEDIUM 6.5
  • TI-2026-39778 WeasyPrint restrictive URL fetcher bypass allows local file read and SSRF CVSS 3.1MEDIUM 6.2
  • TI-2023-12296 CairoSVG improperly processes SVG files loaded from external resources CVSS 3.1CRITICAL 9.9
See all 8 →

Sources