# CVE-2026-49452: WeasyPrint: CSS Injection via Presentational Hints

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.34%, higher than 28% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-06T17:29:53.000Z
- Modified: 2026-10-22T22:10:00.250Z
- Also known as: GHSA-jhhc-3hcp-qhm5, PYSEC-2026-3412
- Weaknesses: CWE-74
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- Kozea WeasyPrint: < 69.0
- weasyprint (PyPI): up to 68.1

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N`

## References

- <https://github.com/Kozea/WeasyPrint/security/advisories/GHSA-jhhc-3hcp-qhm5> (exploit, web)
- <https://github.com/Kozea/WeasyPrint/pull/2773>
- <https://github.com/Kozea/WeasyPrint/commit/e158264e33fa399b29f415d30719c1d85a55df1d>
- <https://github.com/Kozea/WeasyPrint/releases/tag/v69.0>
- <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)

## Sources

- CVE List: [CVE-2026-49452](https://www.cve.org/CVERecord?id=CVE-2026-49452), CVE Terms of Use, modified 2026-08-19
- GitHub Advisory Database: [GHSA-jhhc-3hcp-qhm5](https://github.com/advisories/GHSA-jhhc-3hcp-qhm5), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-49452](https://nvd.nist.gov/vuln/detail/CVE-2026-49452), Public domain, modified 2026-10-22
- PyPA Advisory Database: [PYSEC-2026-3412](https://osv.dev/vulnerability/PYSEC-2026-3412), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-49452 · Whole record: https://cve.day/CVE-2026-49452.json · Rebuilt by cve.day 2026-11-25T22:59:33.534Z
