Advisory

GHSA-35jj-wx47-4w8r

Also known as: CVE-2024-28184, PYSEC-2026-2033

Summary

WeasyPrint allows the attachment of arbitrary files and URLs to a PDF

Details

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

Patches
Fixed by 734ee8e that’s included in 61.2

Workarounds

  • Check that no PDF attachment is defined in source HTML.
  • Launch WeasyPrint in a sandbox that prevents access to the filesystem and the network.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2024-03-08 20:42 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

weasyprint

PyPI · All systems

Affected

  • introduced 61.0, fixed 61.2 (ecosystem)

Fixed versions

61.2

Fix

  • Fixed version 61.2
    pip install --upgrade weasyprint==61.2

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences