PyPI: weasyprint
CVE-2024-28184
Safety vulnerability ID: SFTY-20240309-67265
Safety legacy ID: pyup.io-71637
Affected versions of WeasyPrint are vulnerable to an arbitrary file content attachment vulnerability. This issue enables attackers to attach content from arbitrary files and URLs to generated PDF documents, bypassing restrictions imposed by the configured `url_fetcher`. The attack vector exploits weaknesses in WeasyPrint’s file and URL handling during PDF generation. Mitigation involves upgrading to version 61.2 or later, which patches the vulnerability and reinforces content source validation for secure PDF creation. This vulnerability specifically impacts web developers using WeasyPrint for PDF document generation.
Overview
WeasyPrint allows the attachment of arbitrary files and URLs to a PDF
Advisory
Affected versions of WeasyPrint are vulnerable to an arbitrary file content attachment vulnerability. This issue enables attackers to attach content from arbitrary files and URLs to generated PDF documents, bypassing restrictions imposed by the configured `url_fetcher`. The attack vector exploits weaknesses in WeasyPrint’s file and URL handling during PDF generation. Mitigation involves upgrading to version 61.2 or later, which patches the vulnerability and reinforces content source validation for secure PDF creation. This vulnerability specifically impacts web developers using WeasyPrint for PDF document generation.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20240309-67265/CVE-2024-28184
- https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-35jj-wx47-4w8r
- https://github.com/Kozea/WeasyPrint/commit/734ee8e2dc84ff3090682f3abff056d0907c8598
- https://nvd.nist.gov/vuln/detail/CVE-2024-28184
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZLQZMOEDY72TS43HDXOBVID2VYCTWIH6
- https://github.com/advisories/GHSA-35jj-wx47-4w8r
Verified by Safety
Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.
Learn more
