Description
WeasyPrint helps web developers to create PDF documents. Prior to 70.0, server-side applications that configure a restrictive url_fetcher and pass attacker-influenced values to HTML.write_pdf() can have the restriction bypassed through the xmp_metadata or stylesheets options. In weasyprint/pdf/init.py, xmp_metadata calls select_source() without the document url_fetcher, allowing an accessible local file to be read and embedded verbatim in the output PDF. In weasyprint/document.py, stylesheets constructs CSS() without the document url_fetcher, allowing local or internal resource loading and propagating the permissive fetcher through nested CSS imports and url() references. The stylesheets channel applies fetched resources but does not by itself disclose stylesheet comments verbatim. This issue is fixed in version 70.0.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Kozea | WeasyPrint | < 70.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | weasyprint | 70.0-1 | — |
| Debian 13 | weasyprint | No fix yet | — |
| Debian 12 | weasyprint | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | weasyprint | No fix yet | — |
| Ubuntu 26.04 LTS | weasyprint | No fix yet | — |
| Ubuntu 24.04 LTS | weasyprint | No fix yet | — |
| Ubuntu 22.04 LTS | weasyprint | No fix yet | — |
| Ubuntu 20.04 LTS | weasyprint | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-weasyprint | 70.0-1.1 | openSUSE-SU-2026:11816-1 |
| openSUSE Leap 16.0 | python-weasyprint | 65.1-bp160.4.1 | openSUSE-SU-2026:21928-1 |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | weasyprint | < 70.0 | 70.0 | GHSA-jf6q-chmf-3h3v |
Advisories 2
- openSUSE-SU-2026:21928-1 Security update for python-weasyprint SUSE / openSUSE Security Updates · Sep 25, 2026
- openSUSE-SU-2026:11816-1 python313-weasyprint-70.0-1.1 on GA media SUSE / openSUSE Security Updates · Sep 19, 2026