همهٔ گزارش‌ها
متوسط

WeasyPrint has CSS Injection via Presentational Hints

متن اصلی

نسخه‌های متأثر

بازه‌ها نیاز به بررسی دارند.

نسخه‌های متأثر
<=68.1
نسخهٔ اصلاح‌شده
اعلام نشده
نسخه‌های متأثر
<= 68.1
نسخهٔ اصلاح‌شده
اعلام نشده

بهره‌برداری

CVE-2026-49452

احتمال بهره‌برداری در ۳۰ روز آینده: 0.37%

FIRST EPSS · ۱۴۰۵/۰۸/۲۷

شرح آسیب‌پذیری

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
Impact
  • CSS injection

  • Server-side requests via injected url()

  • Limited to cases where presentational_hints=True

Suggested Fix

پیوندها

گزارش‌دهندگان

  • AyushParkara