GHSA-c8rp-cgf4-937w: Mezzio/mezzio swoole Mezzio-swoole Applications Using Diactoros Vulnerable Vulnerability
HIGHGHSA-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
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.
Upgrade mezzio/mezzio-swoole to 3.7.0
Upgrade mezzio/mezzio-swoole to 4.3.0
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
GHSA-c8rp-cgf4-937w Affected Mezzio/mezzio swoole Versions
2 component(s)| 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?
Which Mezzio/mezzio swoole versions are affected?
What version fixes GHSA-c8rp-cgf4-937w?
Is mezzio/mezzio-swoole affected?
What CWE is associated with GHSA-c8rp-cgf4-937w?
How can I check Packagist dependencies for GHSA-c8rp-cgf4-937w?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}