Advisory

PYSEC-2026-2033

Also known as: CVE-2024-28184, GHSA-35jj-wx47-4w8r

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: CVSS v3 score 7.4, vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:L

Dates

Published
2026-07-07 11:45 UTC
Modified
2026-07-07 17:46 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: PyPA Advisory Database · CC BY 4.0

Sources & licences