Skip to content
OpenAdvisories
Medium · 6.2 CVE-2026-55073 EUVD-2026-77638GHSA-jf6q-chmf-3h3vPYSEC-2026-3940

WeasyPrint restrictive URL fetcher bypass allows local file read and SSRF

Published Sep 14, 2026 · Updated Sep 16, 2026 · Assigned by GitHub_M

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

VendorProductAffectedFixed
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.

ReleasePackageFixed inAdvisory
Debian 14 weasyprint 70.0-1 —
Debian 13 weasyprint No fix yet —
Debian 12 weasyprint No fix yet —
ReleasePackageFixed inAdvisory
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 —
ReleasePackageFixed inAdvisory
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

EcosystemPackageAffectedFixedRecord
PyPI weasyprint < 70.0 70.0 GHSA-jf6q-chmf-3h3v

Advisories 2

References