CVE-2024-50340: Ability to change environment from query

Published Nov 5, 2024
·
Updated

Description

When the registerargcargv php directive is set to on , and users call any URL with a special crafted query string, they are able to change the environment or debug mode used by the kernel when handling the request.

Resolution

The SymfonyRuntime now ignores the argv values for non-cli SAPIs PHP runtimes

The patch for this issue is available here for branch 5.4.

Credits

We would like to thank Vladimir Dusheyko for reporting the issue and Wouter de Jong for providing the fix.

Other sources

CVE-2024-50340: Ability to change environment from query

— Packagist

symfony/runtime is a module for the Symphony PHP framework which enables decoupling PHP applications from global state. When the registerargvargc php directive is set to on , and users call any URL with a special crafted query string, they are able to change the environment or debug mode used by the kernel when handling the request. As of versions 5.4.46, 6.4.14, and 7.1.7 the SymfonyRuntime now ignores the argv values for non-SAPI PHP runtimes. All users are advised to upgrade. There are no known workarounds for this vulnerability.

— NVD

Affected Software

28 affected componentsFixes available
composer/symfony/symfony>=7.0.0<7.1.7
7.1.7
composer/symfony/symfony>=6.0.0<6.4.14
6.4.14
composer/symfony/symfony>=5.3.0<5.4.46
5.4.46
composer/symfony/runtime>=7.0.0<7.1.7
7.1.7
composer/symfony/runtime>=6.0.0<6.4.14
6.4.14
composer/symfony/runtime>=5.3.0<5.4.46
5.4.46
composer/symfony/symfony>=5.3.0, <5.4.0
composer/symfony/symfony>=5.4.0, <5.4.46
5.4.46
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.14
6.4.14
composer/symfony/symfony>=7.0.0, <7.1.0
composer/symfony/symfony>=7.1.0, <7.1.7
7.1.7
composer/symfony/runtime>=5.3.0, <5.4.0
composer/symfony/runtime>=5.4.0, <5.4.46
5.4.46
composer/symfony/runtime>=6.0.0, <6.1.0
composer/symfony/runtime>=6.1.0, <6.2.0
composer/symfony/runtime>=6.2.0, <6.3.0
composer/symfony/runtime>=6.3.0, <6.4.0
composer/symfony/runtime>=6.4.0, <6.4.14
6.4.14
composer/symfony/runtime>=7.0.0, <7.1.0
composer/symfony/runtime>=7.1.0, <7.1.7
7.1.7
debian/symfony<5.4.53+dfsg-0+deb12u1
5.4.53+dfsg-0+deb12u1
debian/symfony<6.4.41+dfsg-0+deb13u1
6.4.41+dfsg-0+deb13u1
debian/symfony<6.4.14+dfsg-1
6.4.14+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/symfony to a version that resolves this vulnerability.

    Fixed in 7.1.7
  2. Upgrade

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

    Fixed in 6.4.14
  3. Upgrade

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

    Fixed in 5.4.46
  4. Upgrade

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

    Fixed in 7.1.7
  5. Upgrade

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

    Fixed in 6.4.14
  6. Upgrade

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

    Fixed in 5.4.46
  7. Upgrade

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

    Fixed in 5.4.53+dfsg-0+deb12u1
  8. Upgrade

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

    Fixed in 6.4.41+dfsg-0+deb13u1
  9. Upgrade

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

    Fixed in 6.4.14+dfsg-1
  10. 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
  11. Upgrade

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

    Fixed in 5.4.46
  12. Upgrade

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

    Fixed in 6.4.14
  13. Upgrade

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

    Fixed in 7.1.7

Event History

Nov 5, 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:11 PM
CVE Published
via MITRE·09:09 PM
Data Sourced
via MITRE·09:09 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·09:15 PM
DescriptionSeverityAffected Software
Exploit Published
via GitHub·09:24 PM

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2024-50340?

The severity of CVE-2024-50340 is considered critical as it can allow an attacker to manipulate the environment settings.

2

How do I fix CVE-2024-50340?

To fix CVE-2024-50340, update your Symfony packages to the latest versions specified in the vulnerability advisory.

3

Which Symfony versions are affected by CVE-2024-50340?

CVE-2024-50340 affects Symfony versions between 5.3.0 and 5.4.46, and from 6.0.0 to 6.4.14, and from 7.0.0 to 7.1.7.

4

What happens if I don't resolve CVE-2024-50340?

Failure to resolve CVE-2024-50340 may result in unauthorized access to sensitive environment configurations.

5

Is the CVE-2024-50340 vulnerability specific to PHP configurations?

Yes, CVE-2024-50340 is specifically exploitable when the 'register_argc_argv' PHP directive is enabled.

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