Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘 Packagist
Not in CISA KEV

Symfony2 security issue when the trust proxy mode is enabledGHSA-vfm6-r2gc-pwww

Fix: symfony/http-foundation@5cde522

GHSA-vfm6-r2gc-pwww is a security vulnerability in symfony/http-foundation. A fix is available for symfony/http-foundation — see the affected versions and patch details below.

Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Dec 4, 2024 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

4 pkgs affected
🐘symfony/http-foundation🐘symfony/http-foundation🐘symfony/symfony🐘symfony/symfony

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

An application is vulnerable if it uses the client IP address as returned by the Request::getClientIp() method for sensitive decisions like IP based access control.

To fix this security issue, the following changes have been made to all versions of Symfony2:

A new Request::setTrustedProxies() method has been introduced and should be used intead of Request::trustProxyData() to enable the trust proxy mode. It takes an array of trusted proxy IP addresses as its argument:

// before (probably in your front controller script)
Request::trustProxyData();

// after
Request::setTrustedProxies(array('1.1.1.1'));
// 1.1.1.1 being the IP address of a trusted reverse proxy

The Request::trustProxyData() method has been deprecated (when used, it automatically trusts the latest proxy in the chain -- which is the current remote address):

Request::trustProxyData();

// is equivalent to
Request::setTrustedProxies(array($request->server->get('REMOTE_ADDR')));

We encourage all Symfony2 users to upgrade as soon as possible. It you don't want to upgrade to the latest version yet, you can also apply the following patches:

  • Patch for Symfony 2.0.19
  • Patch for Symfony 2.1.4

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistsymfony/http-foundation≥ 2.0.0&&< 2.0.192.0.19composer require symfony/http-foundation:^2.0.19
🐘Packagistsymfony/http-foundation≥ 2.1.0&&< 2.1.42.1.4composer require symfony/http-foundation:^2.1.4
🐘Packagistsymfony/symfony≥ 2.0.0&&< 2.0.192.0.19composer require symfony/symfony:^2.0.19
🐘Packagistsymfony/symfony≥ 2.1.0&&< 2.1.42.1.4composer require symfony/symfony:^2.1.4

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for symfony/http-foundation, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update symfony/http-foundation to 2.0.19 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-vfm6-r2gc-pwww is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Frequently Asked Questions

An application is vulnerable if it uses the client IP address as returned by the Request::getClientIp() method for sensitive decisions like IP based access control. To fix this security issue, the following changes have been made to all versions of Symfony2: A new Request::setTrustedProxies() method has been introduced and should be used intead of Request::trustProxyData() to enable the trust proxy mode. It takes an array of trusted proxy IP addresses as its argument: ``` // before (probably in your front controller script) Request::trustProxyData(); // after Request::setTrustedProxies(arra
O3 Security · Impact-Aware SCA

Is GHSA-vfm6-r2gc-pwww in your dependencies?

Find it across Packagist, including transitive dependencies.

Symfony2 security issue when the trust proxy mode is…