# CVE-2026-106443: WeasyPrint: EPS images reach the Ghostscript interpreter resulting in RCE

> Attackers can achieve remote code execution by supplying malicious EPS images to WeasyPrint if Ghostscript is installed on the host.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Oct 2026
- **Updated:** 6 Oct 2026
- **Also known as:** DEBIAN-CVE-2026-106443, GHSA-r543-q48m-4c9j, PYSEC-2026-4311, UBUNTU-CVE-2026-106443

## What is CVE-2026-106443?

CVE-2026-106443 is a high-severity code injection vulnerability in Kozea WeasyPrint, published on 6 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.

### Official 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.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2026-106443?

3 open source packages ship an affected version, including weasyprint and WeasyPrint.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `weasyprint` | PyPI | All versions | 70.0 |
| `weasyprint` | PyPI | All versions | 70.0 |
| `WeasyPrint` | PyPI | All versions | 70.0 |

## How do I fix CVE-2026-106443?

Upgrade weasyprint to 70.0 or later.

## Is CVE-2026-106443 being exploited?

There is no known exploitation of CVE-2026-106443 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-106443 and fix it if it is affected.

What it is: CVE-2026-106443 is a high-severity code injection vulnerability in Kozea WeasyPrint, published on 6 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-106443 in the wild and no public exploit code.

Affected packages and fixed versions:
- weasyprint (PyPI): affected all versions; fixed in 70.0
- weasyprint (PyPI): affected all versions; fixed in 70.0
- WeasyPrint (PyPI): affected all versions; fixed in 70.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-106443/ (Markdown: https://insights.sbomify.com/CVE-2026-106443/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-106443
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-106443
- OSV: https://osv.dev/vulnerability/CVE-2026-106443

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-106443/
Summaries are generated and may contain mistakes; the official description above is the record.
