GHSA-8jp9-mpv9-98rj: Amphp/http client Amphp/http-client Header Leakage On Cross-domain Vulnerability

MODERATE
CVSS 4.0
Published
Advisory Summary

GHSA-8jp9-mpv9-98rj is a MODERATE (CVSS 4.0) amphp/http-client header leakage on cross-domain vulnerability (General Security Weakness) affecting Amphp/http client libraries in the Packagist ecosystem. The issue involves amphp/http-client header leakage on cross-domain redirects. Remediation is available by upgrading affected packages to version 4.4.0.

GHSA-8jp9-mpv9-98rj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-8jp9-mpv9-98rj
Severity MODERATE
CVSS v3.1 Base Score 4.0
CWE Classification General Security Weakness
Affected Product Amphp/http client
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.0

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

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

How to Fix GHSA-8jp9-mpv9-98rj

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

amphp/http-client fixed: 4.4.0
Upgrade amphp/http-client to 4.4.0
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 amphp/http-client

How to Check if You Are Affected

To determine whether your application is affected by GHSA-8jp9-mpv9-98rj, inspect your project dependencies for Amphp/http client:

inspect dependencies for amphp/http-client

Analyze the terminal output to locate any version of Amphp/http client in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.4.0), 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 General Security Weakness. In Amphp/http client, 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

amphp/http-client has a security weakness that might leak sensitive request headers from the initial request to the redirected host on cross-domain redirects, which were not removed correctly. `Message::setHeaders` does not replace the entire set of headers, but only operates on the headers matching the given array keys.

GHSA-8jp9-mpv9-98rj Affected Amphp/http client Versions

1 component(s)
Fixed Versions:
4.4.0
Product / Package Ecosystem Affected Versions Fixed Version
amphp/http-client
Packagist
≥ 4.0.0
< 4.4.0
4.4.0

References

Frequently Asked Questions

What is GHSA-8jp9-mpv9-98rj?
GHSA-8jp9-mpv9-98rj is a security vulnerability in Amphp/http client involving amphp/http-client Header leakage on cross-domain redirects under General Security Weakness.
Which Amphp/http client versions are affected?
Affected versions include releases prior to 4.4.0 across affected packages: amphp/http-client.
What version fixes GHSA-8jp9-mpv9-98rj?
Upgrading to 4.4.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is amphp/http-client affected?
Yes, amphp/http-client is affected in releases prior to 4.4.0. Upgrade your dependency to 4.4.0 or later.
What is the CVSS score of GHSA-8jp9-mpv9-98rj?
GHSA-8jp9-mpv9-98rj has a CVSS v3.1 base score of 4.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N.
What CWE is associated with GHSA-8jp9-mpv9-98rj?
GHSA-8jp9-mpv9-98rj is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-8jp9-mpv9-98rj?
Run the dependency tree command: 'inspect dependencies for amphp/http-client'. 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-8jp9-mpv9-98rj",
  "modified" : "2024-05-15T17:48:10Z",
  "published" : "2024-05-15T17:48:10Z",
  "aliases" : [ ],
  "summary" : "amphp/http-client Header leakage on cross-domain redirects",
  "details" : "amphp/http-client has a security weakness that might leak sensitive request headers from the initial request to the redirected host on cross-domain redirects, which were not removed correctly. `Message::setHeaders` does not replace the entire set of headers, but only operates on the headers matching the given array keys.\n\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/http-client"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.4.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http-client/commit/fa7925363e6d5a0d0d337e2e6eb1affb93cf226e"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/http-client/2020-06-16.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/amphp/http-client"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/http-client/releases/tag/v4.4.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T17:48:10Z",
    "nvd_published_at" : null
  }
}