CVE-2024-28184 WeasyPrint allows the attachment of arbitrary files and URLs to a PDF

High 7.4 Published Updated

WeasyPrint allows attackers to attach arbitrary local files or URLs to generated PDFs, bypassing url_fetcher restrictions and exposing sensitive data.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-28184?

CVE-2024-28184 is a high-severity path traversal vulnerability in Fedoraproject Fedora, published on 9 Mar 2024. 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. Since version 61.0, there's a vulnerability which allows attaching content of arbitrary files and URLs to a generated PDF document, even if `url_fetcher` is configured to prevent access to files and URLs. This vulnerability has been patched in version 61.2.

Weakness: CWE-829

Which versions are affected by CVE-2024-28184?

3 open source packages ship an affected version, including weasyprint. It affects 2 products.

PackageAffectedFixed in
weasyprint PyPIFrom 61.061.2
weasyprint PyPIFrom 61.061.2
weasyprint PyPIFrom 61.061.2

Products include Fedoraproject Fedora, Kozea Weasyprint.

How do I fix CVE-2024-28184?

Upgrade weasyprint to 61.2 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-28184 being exploited?

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

All Fedoraproject Fedora vulnerabilities

Sources

Also known as DEBIAN-CVE-2024-28184, GHSA-35jj-wx47-4w8r, PYSEC-2026-2033, UBUNTU-CVE-2024-28184.

Is CVE-2024-28184 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free