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.
Advisories
| Source | ID | Title |
|---|---|---|
Github GHSA |
GHSA-jhhc-3hcp-qhm5 | WeasyPrint has CSS Injection via Presentational Hints |
Fixes
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
References
History
Tue, 18 Aug 2026 19:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| First Time appeared |
Kozea
Kozea weasyprint |
|
| Vendors & Products |
Kozea
Kozea weasyprint |
Tue, 18 Aug 2026 18:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | WeasyPrint: CSS Injection via Presentational Hints | |
| Weaknesses | CWE-74 | |
| References |
| |
| Metrics |
cvssV3_1
|
Projects
Sign in to view the affected projects.
Status: PUBLISHED
Assigner: GitHub_M
Published:
Updated: 2026-08-18T17:59:36.144Z
Reserved: 2026-05-30T02:43:33.106Z
Link: CVE-2026-49452
No data.
Status : Received
Published: 2026-08-18T18:17:49.147
Modified: 2026-08-18T18:17:49.147
Link: CVE-2026-49452
No data.
OpenCVE Enrichment
Updated: 2026-08-18T20:45:04Z
Weaknesses
Github GHSA