{"id":"CVE-2026-49452","aliases":["GHSA-jhhc-3hcp-qhm5","PYSEC-2026-3412"],"url":"https://o3.security/vulnerability/CVE-2026-49452","summary":"WeasyPrint: CSS Injection via Presentational Hints","details":"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.","published":"2026-08-18T17:59:36.144Z","modified":"2026-08-21T03:30:38.388180152Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"epss":{"score":0.00273,"percentile":0.19422,"asOf":"2026-09-07"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"weasyprint","fixedVersion":null}],"fix":{"url":"https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d","label":"Kozea/WeasyPrint@e158264"},"references":[{"type":"WEB","url":"https://github.com/Kozea/WeasyPrint/releases/tag/v69.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/49xxx/CVE-2026-49452.json"},{"type":"ADVISORY","url":"https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49452"},{"type":"FIX","url":"https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d"},{"type":"FIX","url":"https://github.com/Kozea/WeasyPrint/pull/2773"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-21T03:30:38.388180152Z"}}