Medium severity · published Aug 18, 2026
CVE-2026-49452
WeasyPrint: CSS Injection via Presentational Hints
6.5
CVSS
0.4%
EPSS
No
On KEV
Description
WeasyPrint helps web developers to create PDF documents. Prior to 69.0, WeasyPrint embeds unescaped HTML presentational-hint attribute values into CSS in weasyprint/css/__init__.py when presentational_hints=True. The background attribute is inserted into a background-image:url() declaration and parsed by tinycss2.parse_blocks_contents(), allowing untrusted HTML to inject additional CSS declarations. Applications that render untrusted HTML with presentational hints enabled can be affected by CSS injection and server-side requests through injected url() values. This issue is fixed in version 69.0.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
Low
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 31% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
WE
WeasyPrint · Kozea
< 69.0 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-49452
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-49452
github.com
https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d
github.com
https://github.com/Kozea/WeasyPrint/pull/2773
github.com
https://github.com/Kozea/WeasyPrint/releases/tag/v69.0
github.com
https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5
More from WeasyPrint
8.8
CVE-2026-106443
WeasyPrint: EPS images reach the Ghostscript interpreter resulting in RCE
7.5
CVE-2025-68616
WeasyPrint Vulnerable to Server-Side Request Forgery (SSRF) Protection Bypass via HTTP Redirect
7.4
CVE-2024-28184
WeasyPrint helps web developers to create PDF documents
6.2
CVE-2026-55073
WeasyPrint restrictive URL fetcher bypass allows local file read and SSRF
