You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Symfony has an incorrect response from Validator when input ends with `\n`
Low severity
GitHub Reviewed
Published
Nov 6, 2024
in
symfony/symfony
•
Updated Dec 13, 2024
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
Learn more on MITRE.
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.
References