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

Symfony has a UrlGenerator Route-Requirement Bypass via Unanchored Regex Alternation → Off-Site //host URL Injection

متن اصلی

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

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

نسخه‌های متأثر
>= 7.0.0, < 7.4.12
نسخهٔ اصلاح‌شده
7.4.12
نسخه‌های متأثر
< 5.4.52
نسخهٔ اصلاح‌شده
5.4.52
نسخه‌های متأثر
>=2.0.0,<3.0.0|>=3.0.0,<4.0.0|>=4.0.0,<5.0.0|>=5.0.0,<5.1.0|>=5.1.0,<5.2.0|>=5.2.0,<5.3.0|>=5.3.0,<5.4.0|>=5.4.0,<5.4.52|>=6.0.0,<6.1.0|>=6.1.0,<6.2.0|>=6.2.0,<6.3.0|>=6.3.0,<6.4.0|>=6.4.0,<6.4.40|>=7.0.0,<7.1.0|>=7.1.0,<7.2.0|>=7.2.0,<7.3.0|>=7.3.0,<7.4.0|>=7.4.0,<7.4.12|>=8.0.0,<8.0.12
نسخهٔ اصلاح‌شده
اعلام نشده
نسخه‌های متأثر
>= 8.0.0, < 8.0.12
نسخهٔ اصلاح‌شده
8.0.12
نسخه‌های متأثر
>= 6.0.0, < 6.4.40
نسخهٔ اصلاح‌شده
6.4.40
نسخه‌های متأثر
>= 8.0.0, < 8.0.12
نسخهٔ اصلاح‌شده
8.0.12
نسخه‌های متأثر
>=2.0.0,<3.0.0|>=3.0.0,<4.0.0|>=4.0.0,<5.0.0|>=5.0.0,<5.1.0|>=5.1.0,<5.2.0|>=5.2.0,<5.3.0|>=5.3.0,<5.4.0|>=5.4.0,<5.4.52|>=6.0.0,<6.1.0|>=6.1.0,<6.2.0|>=6.2.0,<6.3.0|>=6.3.0,<6.4.0|>=6.4.0,<6.4.40|>=7.0.0,<7.1.0|>=7.1.0,<7.2.0|>=7.2.0,<7.3.0|>=7.3.0,<7.4.0|>=7.4.0,<7.4.12|>=8.0.0,<8.0.12
نسخهٔ اصلاح‌شده
اعلام نشده
نسخه‌های متأثر
< 5.4.52
نسخهٔ اصلاح‌شده
5.4.52
نسخه‌های متأثر
>= 6.0.0, < 6.4.40
نسخهٔ اصلاح‌شده
6.4.40
نسخه‌های متأثر
>= 7.0.0, < 7.4.12
نسخهٔ اصلاح‌شده
7.4.12

بهره‌برداری

CVE-2026-45065

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

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

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

Description

Symfony routes can declare a requirements regex per path parameter, e.g. a route /{_locale}/blog with requirements: { _locale: 'en|fr|de' }. The Twig path() / url() helpers (backed by UrlGenerator) validate supplied parameter values against that regex before building the URL.

UrlGenerator constructs the validation pattern as '#^'.$req.'$#', where $req is the raw requirement string. For a requirement expressed as an alternation, e.g. _locale: 'ar|bg|...|vi|...|zh_CN' (very common), ^ and $ anchor only the first and last alternatives, so any middle alternative matches as an unanchored substring. A value like /evil.com satisfies the requirement (because it contains vi), and the generated path becomes //evil.com/...: a protocol-relative URL the browser navigates off-site.

Resolution

The UrlGenerator class now wraps the requirement in a non-capturing group so the ^ and $ anchors apply to the whole alternation.

The patch for this issue is available here for branch 5.4.

Credits

Symfony would like to thank Claude Mythos Preview (via Project Glasswing) for reporting the issue and providing the fix.

پیوندها