CVE-2026-106443

WeasyPrint: EPS images reach the Ghostscript interpreter resulting in RCE

Published Oct 6, 2026 CVSS 3.1 · 8.8 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Interacting with WeasyPrint before version 70.0 allows an attacker to embed EPS or PostScript image data, which WeasyPrint passes directly to Pillow without filtering. Pillow’s EpsImagePlugin will invoke the Ghostscript interpreter on such data, enabling the execution of arbitrary PostScript code. If the Ghostscript binary contains a sandbox bypass, this results in remote code execution on the host where WeasyPrint runs. The weakness is a classic input delivering crafted image references via HTML, CSS, or SVG that refer to EPS content.

Affected Systems

The affected product is WeasyPrint, distributed by Kozea. All releases older than 70.0 are vulnerable. The flaw is only exploitable on systems where the Ghostscript interpreter is installed because Pillow will call it to rasterize EPS images. Hosts lacking Ghostscript are not impacted by the rasterization path.

Risk and Exploitability

The CVSS score of 8.8 indicates a high severity. EPSS data is not available, and the vulnerability is not currently listed in the CISA KEV catalog, which suggests a lower current exploitation probability but does not eliminate risk. The likely attack vector is the delivery of malicious image data through a WeasyPrint processing request, which an attacker could embed in a trusted content pipeline. Exfiltration or lateral movement would follow once the attacker gains code execution on the host.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade WeasyPrint to version 70.0 or later, which removes EPS handling from Pillow’s dispatcher
  • If immediate upgrade is unavailable, remove Ghostscript from the host or switch to a hardened, sandboxed build of Ghostscript
  • Configure Pillow to reject EPS/PS formats or enforce strict file type validation on incoming image data
  • Monitor the system for attempts to load EPS content or for Ghostscript invocation events

Generated by OpenCVE AI on October 7, 2026 at 13:46 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-r543-q48m-4c9j WeasyPrint: EPS images reach the Ghostscript interpreter resulting in RCE
History
Type Values Removed Values Added
First Time appeared Kozea
Kozea weasyprint
Vendors & Products Kozea
Kozea weasyprint
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title WeasyPrint: EPS images reach the Ghostscript interpreter resulting in RCE
Weaknesses CWE-20
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-20

    Improper Input Validation

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 6, 2026, 7:29 PM
Reserved
Oct 6, 2026, 4:49 PM
Status
Deferred
Published
Oct 6, 2026, 7:18 PM
Modified
Oct 6, 2026, 8:17 PM
Severity
Important
Public date
Oct 6, 2026, 6:57 PM