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

GHSA-vfm6-r2gc-pwww

Symfony2 security issue when the trust proxy mode is enabled

Published
May 30, 2024
Updated
Dec 4, 2024
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed

Blast Radius

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-foundation2.0.0&&< 2.0.192.0.19
🐘Packagistsymfony/http-foundation2.1.0&&< 2.1.42.1.4
🐘Packagistsymfony/symfony2.0.0&&< 2.0.192.0.19
🐘Packagistsymfony/symfony2.1.0&&< 2.1.42.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. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  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

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-vfm6-r2gc-pwww is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-vfm6-r2gc-pwww. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

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?

O3 detects GHSA-vfm6-r2gc-pwww across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.