CVE-2024-50343: Incorrect response from Validator when input ends with ` `

Published Aug 30, 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 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

40 affected componentsFixes available
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
composer/symfony/symfony>=2.0.0, <3.0.0
composer/symfony/symfony>=3.0.0, <4.0.0
composer/symfony/symfony>=4.0.0, <5.0.0
composer/symfony/symfony>=5.0.0, <5.1.0
composer/symfony/symfony>=5.1.0, <5.2.0
composer/symfony/symfony>=5.2.0, <5.3.0
composer/symfony/symfony>=5.3.0, <5.4.0
composer/symfony/symfony>=5.4.0, <5.4.43
5.4.43
composer/symfony/symfony>=6.0.0, <6.1.0
composer/symfony/symfony>=6.1.0, <6.2.0
composer/symfony/symfony>=6.2.0, <6.3.0
composer/symfony/symfony>=6.3.0, <6.4.0
composer/symfony/symfony>=6.4.0, <6.4.11
6.4.11
composer/symfony/symfony>=7.0.0, <7.1.0
composer/symfony/symfony>=7.1.0, <7.1.4
7.1.4
composer/symfony/validator>=2.0.0, <3.0.0
composer/symfony/validator>=3.0.0, <4.0.0
composer/symfony/validator>=4.0.0, <5.0.0
composer/symfony/validator>=5.0.0, <5.1.0
composer/symfony/validator>=5.1.0, <5.2.0
composer/symfony/validator>=5.2.0, <5.3.0
composer/symfony/validator>=5.3.0, <5.4.0
composer/symfony/validator>=5.4.0, <5.4.43
5.4.43
composer/symfony/validator>=6.0.0, <6.1.0
composer/symfony/validator>=6.1.0, <6.2.0
composer/symfony/validator>=6.2.0, <6.3.0
composer/symfony/validator>=6.3.0, <6.4.0
composer/symfony/validator>=6.4.0, <6.4.11
6.4.11
composer/symfony/validator>=7.0.0, <7.1.0
composer/symfony/validator>=7.1.0, <7.1.4
7.1.4
debian/symfony<5.4.23+dfsg-1+deb12u3
5.4.23+dfsg-1+deb12u3
debian/symfony<6.4.11+dfsg-1
6.4.11+dfsg-1
debian/symfony<6.4.11+dfsg-1
6.4.11+dfsg-1
debian/symfony
5.4.53+dfsg-0+deb12u16.4.41+dfsg-0+deb13u16.4.49+dfsg-0+deb13u17.4.22+dfsg-17.4.23+dfsg-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade composer/symfony/validator to a version that resolves this vulnerability.

    Fixed in 7.1.4
  2. Upgrade

    Upgrade composer/symfony/validator to a version that resolves this vulnerability.

    Fixed in 6.4.11
  3. Upgrade

    Upgrade composer/symfony/validator to a version that resolves this vulnerability.

    Fixed in 5.4.43
  4. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 7.1.4
  5. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.11
  6. Upgrade

    Upgrade composer/symfony/symfony to a version that resolves this vulnerability.

    Fixed in 5.4.43
  7. Upgrade

    Upgrade debian/symfony to a version that resolves this vulnerability.

    Fixed in 5.4.23+dfsg-1+deb12u3
  8. Upgrade

    Upgrade debian/symfony to a version that resolves this vulnerability.

    Fixed in 6.4.11+dfsg-1
  9. Upgrade

    Upgrade debian/symfony to 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
  10. Upgrade

    Upgrade symfony/validator to a version that resolves this vulnerability.

    Patch 7d1032bbead9a4229b32fa6ebca32681c80cb76f

Event History

Aug 30, 2024
Advisory Published
via Packagist·08:00 AM
Data Sourced
via Packagist·08:00 AM
DescriptionSeverityAffected Software
Nov 6, 2024
Advisory Published
via GitHub·03:21 PM
CVE Published
via MITRE·09:00 PM
Data Sourced
via MITRE·09:00 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·09:15 PM
DescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2024-50343?

CVE-2024-50343 has been classified as a moderate severity vulnerability.

2

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.

3

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.

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.

5

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.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203