Miggo Logo

GHSA-vfm6-r2gc-pwww: Symfony2 security issue when the trust proxy mode is enabled

N/A

CVSS Score

Basic Information

CVE ID
-
EPSS Score
-
CWE
-
Published
5/30/2024
Updated
5/30/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
-
Package NameEcosystemVulnerable VersionsFirst Patched Version
symfony/http-foundationcomposer>= 2.0.0, < 2.0.192.0.19
symfony/http-foundationcomposer>= 2.1.0, < 2.1.42.1.4
symfony/symfonycomposer>= 2.0.0, < 2.0.192.0.19
symfony/symfonycomposer>= 2.1.0, < 2.1.42.1.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key functions: 1) trustProxyData() enables proxy trust without proper IP validation, creating an insecure default configuration. 2) getClientIp() relies on this insecure configuration to return client IPs from untrusted headers. Together, they allow IP spoofing when the application is behind a reverse proxy. The deprecated trustProxyData() method is particularly critical as it automatically trusts the immediate proxy (REMOTE_ADDR), while getClientIp() becomes dangerous when used with this configuration for security decisions.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*n *ppli**tion is vuln*r**l* i* it us*s t** *li*nt IP ***r*ss *s r*turn** *y t** R*qu*st::**t*li*ntIp() m*t*o* *or s*nsitiv* ***isions lik* IP **s** ****ss *ontrol. To *ix t*is s**urity issu*, t** *ollowin* ***n**s **v* ***n m*** to *ll v*rsions o*

Reasoning

T** vuln*r**ility st*ms *rom two k*y *un*tions: *) `trustProxy**t*()` *n**l*s proxy trust wit*out prop*r IP v*li**tion, *r**tin* *n ins**ur* ****ult `*on*i*ur*tion`. *) `**t*li*ntIp()` r*li*s on t*is ins**ur* `*on*i*ur*tion` to r*turn *li*nt IPs *rom