Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-72xp-p242-47p9

Опубликовано: 27 мая 2026
Источник: github
Github: Прошло ревью

Описание

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

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.

Пакеты

Наименование

symfony/routing

composer
Затронутые версииВерсия исправления

< 5.4.52

5.4.52

Наименование

symfony/routing

composer
Затронутые версииВерсия исправления

>= 6.0.0, < 6.4.40

6.4.40

Наименование

symfony/routing

composer
Затронутые версииВерсия исправления

>= 7.0.0, < 7.4.12

7.4.12

Наименование

symfony/routing

composer
Затронутые версииВерсия исправления

>= 8.0.0, < 8.0.12

8.0.12

Наименование

symfony/symfony

composer
Затронутые версииВерсия исправления

< 5.4.52

5.4.52

Наименование

symfony/symfony

composer
Затронутые версииВерсия исправления

>= 6.0.0, < 6.4.40

6.4.40

Наименование

symfony/symfony

composer
Затронутые версииВерсия исправления

>= 7.0.0, < 7.4.12

7.4.12

Наименование

symfony/symfony

composer
Затронутые версииВерсия исправления

>= 8.0.0, < 8.0.12

8.0.12

EPSS

Процентиль: 18%
0.00261
Низкий

Дефекты

CWE-185
CWE-601

Связанные уязвимости

CVSS3: 6.1
ubuntu
16 дней назад

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, UrlGenerator validates route parameters against a pattern built as ^ plus the raw requirement plus $; with ungrouped alternations, middle alternatives match as unanchored substrings, allowing a value such as //evil.com to satisfy a common locale requirement and generate a protocol-relative off-site URL. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.

CVSS3: 6.1
nvd
16 дней назад

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. Prior to 5.4.52, 6.4.40, 7.4.12, and 8.0.12, UrlGenerator validates route parameters against a pattern built as ^ plus the raw requirement plus $; with ungrouped alternations, middle alternatives match as unanchored substrings, allowing a value such as //evil.com to satisfy a common locale requirement and generate a protocol-relative off-site URL. This issue is fixed in versions 5.4.52, 6.4.40, 7.4.12, and 8.0.12.

CVSS3: 6.1
debian
16 дней назад

Symfony is a PHP framework for web and console applications and a set ...

EPSS

Процентиль: 18%
0.00261
Низкий

Дефекты

CWE-185
CWE-601