GHSA-g3rh-rrhp-jhh9LowCVSS 3.1

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

Published
November 6, 2024
Last Modified
November 3, 2025

🔗 CVE IDs covered (1)

📋 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.

🎯 Affected products6

  • composer/symfony/symfony:< 5.4.43
  • composer/symfony/symfony:>= 6.0.0, < 6.4.11
  • composer/symfony/symfony:>= 7.0.0, < 7.1.4
  • composer/symfony/validator:< 5.4.43
  • composer/symfony/validator:>= 6.0.0, < 6.4.11
  • composer/symfony/validator:>= 7.0.0, < 7.1.4

🔗 References (8)