🛡️ GHSA-c8rp-cgf4-937w — mezzio-swoole
Description
mezzio-swoole Applications Using Diactoros Vulnerable to HTTP Host Header Attack
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:[email protected])
Affected software
GHSA-c8rp-cgf4-937w is recorded against 1 package.
- mezzio/mezzio-swoole (from 4.0.0 up to 4.3.0)
Timeline and source
Published on 29 July 2022 and last revised on 28 November 2024. No public exploit is currently recorded for this entry. Record sourced from OSV.
References
Details
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| mezzio/mezzio-swoole | 4.0.0 | 4.3.0 |
References
Site Security Check
Is mezzio-swoole part of your stack?
GHSA-c8rp-cgf4-937w is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.