First published: Wed Nov 06 2024(Updated: )
### 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.
Credit: security-advisories@github.com security-advisories@github.com
Affected Software | Affected Version | How to fix |
---|---|---|
composer/symfony/validator | >=7.0.0<7.1.4 | 7.1.4 |
composer/symfony/validator | >=6.0.0<6.4.11 | 6.4.11 |
composer/symfony/validator | <5.4.43 | 5.4.43 |
composer/symfony/symfony | >=7.0.0<7.1.4 | 7.1.4 |
composer/symfony/symfony | >=6.0.0<6.4.11 | 6.4.11 |
composer/symfony/symfony | <5.4.43 | 5.4.43 |
debian/symfony | <=4.4.19+dfsg-2+deb11u6 | 5.4.23+dfsg-1+deb12u4 6.4.18+dfsg-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2024-50343 has been classified as a moderate severity vulnerability.
To mitigate CVE-2024-50343, update the symfony/validator and symfony/symfony packages to version 7.1.4, 6.4.11, or 5.4.43.
CVE-2024-50343 affects Symfony versions ranging from 5.0.0 to 5.4.43, 6.0.0 to 6.4.11, and 7.0.0 to 7.1.4.
CVE-2024-50343 addresses a vulnerability in the Validator component that can be exploited using specific regular expression metacharacter patterns.
The resolution for CVE-2024-50343 involves using the 'D' regex modifier to ensure the entire input is matched.