CVE-2024-50343: Incorrect response from Validator when input ends with ` `
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.
Other sources
CVE-2024-50343: Incorrect response from Validator when input ends with
— Packagist
symfony/validator is a module for the Symphony PHP framework which provides tools to validate values. It is possible to trick a Validator configured with a regular expression using the $ metacharacters, with an input ending with \n. Symfony as of versions 5.4.43, 6.4.11, and 7.1.4 now uses the D regex modifier to match the entire input. Users are advised to upgrade. There are no known workarounds for this vulnerability.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
composer/symfony/validatorto a version that resolves this vulnerability.Fixed in 7.1.4 - Upgrade
Upgrade
composer/symfony/validatorto a version that resolves this vulnerability.Fixed in 6.4.11 - Upgrade
Upgrade
composer/symfony/validatorto a version that resolves this vulnerability.Fixed in 5.4.43 - Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 7.1.4 - Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 6.4.11 - Upgrade
Upgrade
composer/symfony/symfonyto a version that resolves this vulnerability.Fixed in 5.4.43 - Upgrade
Upgrade
debian/symfonyto a version that resolves this vulnerability.Fixed in 5.4.23+dfsg-1+deb12u3 - Upgrade
Upgrade
debian/symfonyto a version that resolves this vulnerability.Fixed in 6.4.11+dfsg-1 - Upgrade
Upgrade
debian/symfonyto a version that resolves this vulnerability.Fixed in 5.4.53+dfsg-0+deb12u1Fixed in 6.4.41+dfsg-0+deb13u1Fixed in 6.4.49+dfsg-0+deb13u1Fixed in 7.4.22+dfsg-1Fixed in 7.4.23+dfsg-1 - Upgrade
Upgrade
symfony/validatorto a version that resolves this vulnerability.Patch 7d1032bbead9a4229b32fa6ebca32681c80cb76f
Event History
Frequently Asked Questions
What is the severity of CVE-2024-50343?
CVE-2024-50343 has been classified as a moderate severity vulnerability.
How do I fix CVE-2024-50343?
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.
Which Symfony versions are affected by CVE-2024-50343?
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.
What specific issue does CVE-2024-50343 address?
CVE-2024-50343 addresses a vulnerability in the Validator component that can be exploited using specific regular expression metacharacter patterns.
Is there a specific regex modifier used to resolve CVE-2024-50343?
The resolution for CVE-2024-50343 involves using the 'D' regex modifier to ensure the entire input is matched.