PT-2026-52180 · Unknown · Weasyprint
CVE-2026-49452
·
Published
2026-06-15
·
Updated
2026-08-19
CVSS v3.1
6.5
Medium
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
WeasyPrint (affected versions not specified)
Description
A CSS injection issue occurs when HTML presentational hints are enabled. Unescaped attribute values are embedded into CSS, allowing the injection of arbitrary CSS declarations. This specifically affects the
background attribute used to construct CSS, which is then parsed by the tinycss2.parse blocks contents() function. An attacker can exploit this by providing crafted HTML input to trigger server-side requests via injected url() declarations.Recommendations
Escape attribute values before embedding them into CSS.
Restrict allowed values for presentational hints.
As a temporary mitigation, disable the
presentational hints feature by setting it to False.Exploit
Fix
Special Elements Injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Weasyprint