All reports
Low

Symfony has an incorrect response from Validator when input ends with `\n`

Affected versions

Version ranges need review.

Affected versions
< 5.4.43
Fixed version
5.4.43
Affected versions
>= 7.0.0, < 7.1.4
Fixed version
7.1.4
Affected versions
>=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.43|>=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.11|>=7.0.0,<7.1.0|>=7.1.0,<7.1.4
Fixed version
Not reported
Affected versions
>= 6.0.0, < 6.4.11
Fixed version
6.4.11
Affected versions
>=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.43|>=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.11|>=7.0.0,<7.1.0|>=7.1.0,<7.1.4
Fixed version
Not reported
Affected versions
>= 6.0.0, < 6.4.11
Fixed version
6.4.11
Affected versions
< 5.4.43
Fixed version
5.4.43
Affected versions
>= 7.0.0, < 7.1.4
Fixed version
7.1.4

Exploitation

CVE-2024-50343

Probability of exploitation in the next 30 days: 0.46%

FIRST EPSS · 2026-11-22

Description

Description

It is possible to trick a Validator configured with a regular expression using the $ metacharacters, with an input ending with \n.

Resolution

Symfony now uses the D regex modifier to match the entire input.

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

Credits

We would like to thank Offscript for reporting the issue and Alexandre Daubois for providing the fix.

Links

Credits

  • offscriptian
  • alexandre-daubois