GHSA-c8rp-cgf4-937w: Mezzio/mezzio swoole Mezzio-swoole Applications Using Diactoros Vulnerable Vulnerability

HIGH
Published
Advisory Summary

GHSA-c8rp-cgf4-937w is a HIGH mezzio-swoole applications using diactoros vulnerable vulnerability (General Security Weakness) affecting Mezzio/mezzio swoole libraries in the Packagist ecosystem. The issue involves mezzio-swoole applications using diactoros vulnerable to http host header attack. Remediation is available by upgrading affected packages to version 3.7.0, 4.3.0.

GHSA-c8rp-cgf4-937w at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-c8rp-cgf4-937w
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Mezzio/mezzio swoole
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix GHSA-c8rp-cgf4-937w

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

mezzio/mezzio-swoole fixed: 3.7.0
Upgrade mezzio/mezzio-swoole to 3.7.0
mezzio/mezzio-swoole fixed: 4.3.0
Upgrade mezzio/mezzio-swoole to 4.3.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 mezzio/mezzio-swoole

How to Check if You Are Affected

To determine whether your application is affected by GHSA-c8rp-cgf4-937w, inspect your project dependencies for Mezzio/mezzio swoole:

inspect dependencies for mezzio/mezzio-swoole

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

### Impact mezzio-swoole applications using Diactoros for their PSR-7 implementation, and which are either not behind a proxy, or can be accessed via untrusted proxies, can potentially have the host, protocol, and/or port of a `Laminas\Diactoros\Uri` instance associated with the incoming server request modified to reflect values from `X-Forwarded-*` headers. Such changes can potentially lead to XSS attacks (if a fully-qualified URL is used in links) and/or URL poisoning. ### Patches 3.7.0, and 4.3.0 and later. The patches present in these versions update the `SwooleServerRequestFactory` to filter out `X-Forwarded-*` headers when creating the initial request. They then by default pass that instance through a `Laminas\Diactoros\ServerRequestFilter\FilterUsingXForwardedHeaders` instance created from the `trustReservedSubnet()` constructor, ensuring that the request only honors the `X-Forwarded-*` headers for private reserved subnets. Users can define the `Laminas\Diactoros\ServerRequestFilter\FilterServerRequestInterface` service if they wish to provide a different implementation, or configure the `FilterUsingXForwardedHeaders` instance differently. When defined, that instance will be used to filter the generated request instance. ### Workarounds Infrastructure or DevOps can place a trusted reverse proxy in front of the mezzio-swoole server. ### References - [HTTP Host Header Attacks](https://portswigger.net/web-security/host-header) ### For more information If you have any questions or comments about this advisory: - Open an issue in [mezzio/mezzio-swoole](https://github.com/mezzio/mezzio-swoole/) - [Email us](mailto:security@getlaminas.org)

GHSA-c8rp-cgf4-937w Affected Mezzio/mezzio swoole Versions

2 component(s)
Fixed Versions:
3.7.04.3.0
Product / Package Ecosystem Affected Versions Fixed Version
mezzio/mezzio-swoole
Packagist
< 3.7.0
3.7.0
mezzio/mezzio-swoole
Packagist
≥ 4.0.0
< 4.3.0
4.3.0

References

Frequently Asked Questions

What is GHSA-c8rp-cgf4-937w?
GHSA-c8rp-cgf4-937w is a security vulnerability in Mezzio/mezzio swoole involving mezzio-swoole Applications Using Diactoros Vulnerable to HTTP Host Header Attack under General Security Weakness.
Which Mezzio/mezzio swoole versions are affected?
Affected versions include releases prior to 3.7.0, 4.3.0 across affected packages: mezzio/mezzio-swoole.
What version fixes GHSA-c8rp-cgf4-937w?
Upgrading to 3.7.0, 4.3.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mezzio/mezzio-swoole affected?
Yes, mezzio/mezzio-swoole is affected in releases prior to 3.7.0, 4.3.0. Upgrade your dependency to 3.7.0, 4.3.0 or later.
What CWE is associated with GHSA-c8rp-cgf4-937w?
GHSA-c8rp-cgf4-937w is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-c8rp-cgf4-937w?
Run the dependency tree command: 'inspect dependencies for mezzio/mezzio-swoole'. 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-c8rp-cgf4-937w",
  "modified" : "2022-07-29T22:26:10Z",
  "published" : "2022-07-29T22:26:10Z",
  "aliases" : [ ],
  "summary" : "mezzio-swoole Applications Using Diactoros Vulnerable to HTTP Host Header Attack",
  "details" : "### Impact\n\nmezzio-swoole applications using Diactoros for their PSR-7 implementation, and which are either not behind a proxy, or can be accessed via untrusted proxies, can potentially have the host, protocol, and/or port of a `Laminas\\Diactoros\\Uri` instance associated with the incoming server request modified to reflect values from `X-Forwarded-*` headers. Such changes can potentially lead to XSS attacks (if a fully-qualified URL is used in links) and/or URL poisoning.\n\n### Patches\n\n3.7.0, and 4.3.0 and later.\n\nThe patches present in these versions update the `SwooleServerRequestFactory` to filter out `X-Forwarded-*` headers when creating the initial request. They then by default pass that instance through a `Laminas\\Diactoros\\ServerRequestFilter\\FilterUsingXForwardedHeaders` instance created from the `trustReservedSubnet()` constructor, ensuring that the request only honors the `X-Forwarded-*` headers for private reserved subnets.\n\nUsers can define the `Laminas\\Diactoros\\ServerRequestFilter\\FilterServerRequestInterface` service if they wish to provide a different implementation, or configure the `FilterUsingXForwardedHeaders` instance differently. When defined, that instance will be used to filter the generated request instance.\n\n### Workarounds\n\nInfrastructure or DevOps can place a trusted reverse proxy in front of the mezzio-swoole server.\n\n### References\n\n- [HTTP Host Header Attacks](https://portswigger.net/web-security/host-header)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [mezzio/mezzio-swoole](https://github.com/mezzio/mezzio-swoole/)\n- [Email us](mailto:security@getlaminas.org)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mezzio/mezzio-swoole"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.7.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "mezzio/mezzio-swoole"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.3.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/mezzio/mezzio-swoole/security/advisories/GHSA-c8rp-cgf4-937w"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mezzio/mezzio-swoole"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-29T22:26:10Z",
    "nvd_published_at" : null
  }
}