CVE-2026-49452
MEDIUM 6.5CVSS 3.1WeasyPrint has CSS Injection via Presentational Hints
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
- 18 Aug 2026
- Last modified
- 22 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-74
- Also known as
- GHSA-jhhc-3hcp-qhm5PYSEC-2026-3412
- Sources
- NVDJSONOSV GHSA-jhhc-3hcp-qhm5JSONOSV PYSEC-2026-3412JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | PyPI | weasyprint | <= 68.1 |
References
- https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d
- https://github.com/Kozea/WeasyPrint/pull/2773
- https://github.com/Kozea/WeasyPrint/releases/tag/v69.0
- https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5 · WEB
- https://github.com/Kozea/WeasyPrint · PACKAGE
- https://pypi.org/project/weasyprint · PACKAGE
- https://github.com/advisories/GHSA-jhhc-3hcp-qhm5 · ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2026-49452 · ADVISORY
History
- 25 Nov 2026 21:04 UTC · NVD: first stored (published 18 Aug 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 6 Jul 2026)