CVE-2026-49452

WeasyPrint: CSS Injection via Presentational Hints

Published Aug 18, 2026 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-jhhc-3hcp-qhm5 WeasyPrint has CSS Injection via Presentational Hints
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Kozea
Kozea weasyprint
Vendors & Products Kozea
Kozea weasyprint
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

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 19, 2026, 3:12 PM
Reserved
May 30, 2026, 2:43 AM
Status
Deferred
Published
Aug 18, 2026, 6:17 PM
Modified
Oct 22, 2026, 10:10 PM
Severity
Moderate
Public date
Aug 18, 2026, 5:59 PM