NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · Composer (PHP)

CVE-2024-50343: Symfony has an incorrect response from Validator when input ends with `\n`

lowCVSS 4.0 2.3 · 3.1 3.1GHSA-g3rh-rrhp-jhh9

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.

Published Nov 6, 2024 · Updated Nov 3, 2025

Affected packages

symfony/symfony

Ecosystem
Composer (PHP)
Affected
< 5.4.43
Fixed in
5.4.43
Check
composer show symfony/symfony

symfony/symfony

Ecosystem
Composer (PHP)
Affected
>= 6.0.0, < 6.4.11
Fixed in
6.4.11
Check
composer show symfony/symfony

symfony/symfony

Ecosystem
Composer (PHP)
Affected
>= 7.0.0, < 7.1.4
Fixed in
7.1.4
Check
composer show symfony/symfony

symfony/validator

Ecosystem
Composer (PHP)
Affected
< 5.4.43
Fixed in
5.4.43
Check
composer show symfony/validator

symfony/validator

Ecosystem
Composer (PHP)
Affected
>= 6.0.0, < 6.4.11
Fixed in
6.4.11
Check
composer show symfony/validator

symfony/validator

Ecosystem
Composer (PHP)
Affected
>= 7.0.0, < 7.1.4
Fixed in
7.1.4
Check
composer show symfony/validator

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to offscriptian, alexandre-daubois.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More Composer (PHP) vulnerabilities

All Composer (PHP) entries