GHSA-xffp-6w68-4775: Zendframework/zendframework Zendframework Remote Address Spoofing Vector Vulnerability

HIGH
CVSS 7.5
CWE-601
Published
Advisory Summary

GHSA-xffp-6w68-4775 is a HIGH (CVSS 7.5) zendframework remote address spoofing vector vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Zendframework/zendframework libraries in the Packagist ecosystem. The issue involves zendframework remote address spoofing vector in `zend\http\phpenvironment\remoteaddress`. Remediation is available by upgrading affected packages to version 2.2.5.

GHSA-xffp-6w68-4775 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-xffp-6w68-4775
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Zendframework/zendframework
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-xffp-6w68-4775

To remediate this vulnerability, upgrade all affected Zendframework/zendframework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

zendframework/zendframework fixed: 2.2.5
Upgrade zendframework/zendframework to 2.2.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for zendframework/zendframework

How to Check if You Are Affected

To determine whether your application is affected by GHSA-xffp-6w68-4775, inspect your project dependencies for Zendframework/zendframework:

inspect dependencies for zendframework/zendframework

Analyze the terminal output to locate any version of Zendframework/zendframework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Zendframework/zendframework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-xffp-6w68-4775 Affected Zendframework/zendframework Versions

1 component(s)
Fixed Versions:
2.2.5
Product / Package Ecosystem Affected Versions Fixed Version
zendframework/zendframework
Packagist
≥ 2.2.0
< 2.2.5
2.2.5

References

Frequently Asked Questions

What is GHSA-xffp-6w68-4775?
GHSA-xffp-6w68-4775 is a security vulnerability in Zendframework/zendframework involving Zendframework Remote Address Spoofing Vector in `Zend\Http\PhpEnvironment\RemoteAddress` under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Zendframework/zendframework versions are affected?
Affected versions include releases prior to 2.2.5 across affected packages: zendframework/zendframework.
What version fixes GHSA-xffp-6w68-4775?
Upgrading to 2.2.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zendframework/zendframework affected?
Yes, zendframework/zendframework is affected in releases prior to 2.2.5. Upgrade your dependency to 2.2.5 or later.
What is the CVSS score of GHSA-xffp-6w68-4775?
GHSA-xffp-6w68-4775 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with GHSA-xffp-6w68-4775?
GHSA-xffp-6w68-4775 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Packagist dependencies for GHSA-xffp-6w68-4775?
Run the dependency tree command: 'inspect dependencies for zendframework/zendframework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-xffp-6w68-4775",
  "modified" : "2024-06-07T20:02:07Z",
  "published" : "2024-06-07T20:02:07Z",
  "aliases" : [ ],
  "summary" : "Zendframework Remote Address Spoofing Vector in `Zend\\Http\\PhpEnvironment\\RemoteAddress`",
  "details" : "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.\n\nThe 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "zendframework/zendframework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/zendframework/zendframework/commit/bb6784461d3b23ef1db4be8cf47957ccc3b681ed"
  }, {
    "type" : "WEB",
    "url" : "https://framework.zend.com/security/advisory/ZF2013-04"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/zendframework/zendframework/ZF2013-04.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/zendframework/zendframework"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-06-07T20:02:07Z",
    "nvd_published_at" : null
  }
}