요약
- CVE-2026-49452은(는) weasyprint에 영향을 주는 보통 (CVSS 6.5) 취약점입니다.
- 향후 30일 내 악용 확률(EPSS): 0.37%, 전체 취약점의 31.3%보다 높음.
- 아직 패치 버전 정보가 없습니다. 참고 자료의 공급업체 권고를 확인하세요.
| Package | Affected versions | Patched versions |
|---|
| weasyprint PyPI | ≤ 68.1
| No fix yet |
Description
Summary
A CSS injection issue exists in WeasyPrint when HTML presentational hints are enabled. Unescaped attribute values are embedded into CSS, allowing injection of arbitrary CSS declarations. This affects applications processing untrusted HTML input.
Details
File: weasyprint/css/init.py
The background attribute is used to construct CSS:
background-image:url({element.get("background")})
This string is parsed by tinycss2.parse_blocks_contents().
Because the value is not escaped, additional CSS declarations can be injected.
PoC
<body background="x);background-image:url(http://169.254.169.254/latest/meta-data/)">
Impact
- CSS injection
- Server-side requests via injected
url()
- Limited to cases where
presentational_hints=True
Suggested Fix
NVD 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.
Running one of these products? Scan your site to see whether it exposes a vulnerable version.
Scan my site free