~ / search / GHSA-g3rh-rrhp-jhh9

GHSA-g3rh-rrhp-jhh9

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

Source: GitHub Advisory Database (reviewed) Low CVE-2024-50343

Packages

EcosystemPackageAffectedFixed in
Packagist symfony/symfony < 5.4.43 5.4.43
Packagist symfony/symfony >= 6.0.0, < 6.4.11 6.4.11
Packagist symfony/symfony >= 7.0.0, < 7.1.4 7.1.4
Packagist symfony/validator < 5.4.43 5.4.43
Packagist symfony/validator >= 6.0.0, < 6.4.11 6.4.11
Packagist symfony/validator >= 7.0.0, < 7.1.4 7.1.4

Details

As written in the advisory (Markdown source, shown as plain text).

### 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](https://github.com/symfony/symfony/commit/7d1032bbead9a4229b32fa6ebca32681c80cb76f) for branch 5.4. ### Credits We would like to thank Offscript for reporting the issue and Alexandre Daubois for providing the fix.

References

External links from the advisory. They lead to third-party sites.