Incorrect Regular Expression Affecting symfony/routing package, versions <5.4.52>=6.0.0-BETA1, <6.4.40>=7.4.0-BETA1, <7.4.12>=8.0.0-BETA1, <8.0.12


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Regular Expression vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PHP-SYMFONYROUTING-16799802
  • published22 May 2026
  • disclosed20 May 2026
  • creditUnknown

Introduced: 20 May 2026

NewCVE-2026-45065  (opens in a new tab)
CWE-185  (opens in a new tab)

How to fix?

Upgrade symfony/routing to version 5.4.52, 6.4.40, 7.4.12, 8.0.12 or higher.

Overview

Affected versions of this package are vulnerable to Incorrect Regular Expression in the route URL requirements when a requirement is set as an alternation (such as _locale: 'ar|bg|...|vi|...|zh_CN'). An attacker can bypass security redirect restrictions by suppling a URL that passes any but the first and the last alternatives since they are the only ones anchored by ^ and $ in UrlGenerator constructed pattern '#^'.$req.'$#'.

CVSS Base Scores

version 4.0
version 3.1