GHSA-gm98-g2wf-7c68: Amphp/artax Amphp/artax Cookie Leakage To Wrong Vulnerability

MODERATE
Published
Advisory Summary

GHSA-gm98-g2wf-7c68 is a MODERATE amphp/artax cookie leakage to wrong vulnerability (General Security Weakness) affecting Amphp/artax libraries in the Packagist ecosystem. The issue involves amphp/artax cookie leakage to wrong origins and non-restricted cookie acceptance. Remediation is available by upgrading affected packages to version 2.0.6, 1.0.6.

GHSA-gm98-g2wf-7c68 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gm98-g2wf-7c68
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Amphp/artax
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-gm98-g2wf-7c68

To remediate this vulnerability, upgrade all affected Amphp/artax 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/artax fixed: 2.0.6
Upgrade amphp/artax to 2.0.6
amphp/artax fixed: 1.0.6
Upgrade amphp/artax to 1.0.6
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/artax

How to Check if You Are Affected

To determine whether your application is affected by GHSA-gm98-g2wf-7c68, inspect your project dependencies for Amphp/artax:

inspect dependencies for amphp/artax

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

In artax version before 1.0.6 and 2 before 2.0.6, cookies of `foo.bar.example.com` were leaked to `foo.bar`. Additionally, any site could set cookies for any other site. Artax fixed this issue by following newer browser implementations now. Cookies can only be set on domains higher or equal to the current domain, but not on any public suffixes.

GHSA-gm98-g2wf-7c68 Affected Amphp/artax Versions

2 component(s)
Fixed Versions:
2.0.61.0.6
Product / Package Ecosystem Affected Versions Fixed Version
amphp/artax
Packagist
≥ 2
< 2.0.6
2.0.6
amphp/artax
Packagist
< 1.0.6
1.0.6

References

Frequently Asked Questions

What is GHSA-gm98-g2wf-7c68?
GHSA-gm98-g2wf-7c68 is a security vulnerability in Amphp/artax involving amphp/artax Cookie leakage to wrong origins and non-restricted cookie acceptance under General Security Weakness.
Which Amphp/artax versions are affected?
Affected versions include releases prior to 2.0.6, 1.0.6 across affected packages: amphp/artax.
What version fixes GHSA-gm98-g2wf-7c68?
Upgrading to 2.0.6, 1.0.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is amphp/artax affected?
Yes, amphp/artax is affected in releases prior to 2.0.6, 1.0.6. Upgrade your dependency to 2.0.6, 1.0.6 or later.
What CWE is associated with GHSA-gm98-g2wf-7c68?
GHSA-gm98-g2wf-7c68 is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-gm98-g2wf-7c68?
Run the dependency tree command: 'inspect dependencies for amphp/artax'. 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-gm98-g2wf-7c68",
  "modified" : "2024-05-15T17:52:00Z",
  "published" : "2024-05-15T17:52:00Z",
  "aliases" : [ ],
  "summary" : "amphp/artax Cookie leakage to wrong origins and non-restricted cookie acceptance",
  "details" : "In artax version before 1.0.6 and 2 before 2.0.6, cookies of `foo.bar.example.com` were leaked to `foo.bar`. Additionally, any site could set cookies for any other site. \nArtax fixed this issue by following newer browser implementations now. Cookies can only be set on domains higher or equal to the current domain, but not on any public suffixes.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/artax"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2"
      }, {
        "fixed" : "2.0.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "amphp/artax"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/amphp/artax/commit/25668b891d2bced567bd69611c7d18b6a93d5fc4"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/artax/commit/accdadaf78f7a43305c3a97d6a964bbc550a555d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/amphp/artax/2017-05-09.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/amphp/artax"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/amphp/artax/releases/tag/v2.0.6"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T17:52:00Z",
    "nvd_published_at" : null
  }
}