GHSA-xffp-6w68-4775
Zendframework Remote Address Spoofing Vector in `Zend\Http\PhpEnvironment\RemoteAddress`
Quick fix
GHSA-xffp-6w68-4775 — zendframework/zendframework: upgrade to the fixed version with the command below.
composer require zendframework/zendframework:^2.2.5Details
The `Zend\Http\PhpEnvironment\RemoteAddress` class provides features around detecting the internet protocol (IP) address for an incoming proxied request via the X-Forwarded-For header, taking into account a provided list of trusted proxy server IPs. Prior to 2.2.5, the class was not taking into account whether or not the IP address contained in PHP's `$_SERVER['REMOTE_ADDR']` was in the trusted proxy server list.
The IETF draft specification indicates that if `$_SERVER['REMOTE_ADDR']` is not a trusted proxy, it must be considered the originating IP address, and the value of X-Forwarded-For must be disregarded.
Are you affected?
Enter the version of the package you're using.
Affected packages
2.2.0Fixed in: 2.2.5composer require zendframework/zendframework:^2.2.5References
- https://github.com/zendframework/zendframework/commit/bb6784461d3b23ef1db4be8cf47957ccc3b681ed[WEB]
- https://framework.zend.com/security/advisory/ZF2013-04[WEB]
- https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/ZF2013-04.yaml[WEB]
- https://github.com/zendframework/zendframework[PACKAGE]
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:composer/zendframework/zendframework"]}'