CVE-2022-31109
Last modified
CVE-2022-31109 is a medium-severity vulnerability rated 6.1/10 on the CVSS scale. laminas-diactoros is a PHP package containing implementations of the PSR-7 HTTP message interfaces and PSR-17 HTTP message factory interfaces. Applications that use Diactoros, and 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. EPSS estimates a 0.59% chance of exploitation in the next 30 days.
Description
laminas-diactoros is a PHP package containing implementations of the PSR-7 HTTP message interfaces and PSR-17 HTTP message factory interfaces. Applications that use Diactoros, and 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. Since the `X-Forwarded-*` headers do have valid use cases, particularly in clustered environments using a load balancer, the library offers mitigation measures only in the v2 releases, as doing otherwise would break these use cases immediately. Users of v2 releases from 2.11.1 can provide an additional argument to `Laminas\Diactoros\ServerRequestFactory::fromGlobals()` in the form of a `Laminas\Diactoros\RequestFilter\RequestFilterInterface` instance, including the shipped `Laminas\Diactoros\RequestFilter\NoOpRequestFilter` implementation which ignores the `X-Forwarded-*` headers. Starting in version 3.0, the library will reverse behavior to use the `NoOpRequestFilter` by default, and require users to opt-in to `X-Forwarded-*` header usage via a configured `Laminas\Diactoros\RequestFilter\LegacyXForwardedHeaderFilter` instance. Users are advised to upgrade to version 2.11.1 or later to resolve this issue. Users unable to upgrade may configure web servers to reject `X-Forwarded-*` headers at the web server level.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Getlaminas | Laminas-Diactoros | < 2.11.1 |
References
- https://github.com/laminas/laminas-diactoros/commit/25b11d422c2e5dad868f68619888763b30f91e2dPatch, Third Party Advisory
- https://github.com/laminas/laminas-diactoros/security/advisories/GHSA-8274-h5jp-97vrMitigation, Third Party Advisory
- https://portswigger.net/web-security/host-headerThird Party Advisory
- https://github.com/laminas/laminas-diactoros/commit/25b11d422c2e5dad868f68619888763b30f91e2dPatch, Third Party Advisory
- https://github.com/laminas/laminas-diactoros/security/advisories/GHSA-8274-h5jp-97vrMitigation, Third Party Advisory
- https://portswigger.net/web-security/host-headerThird Party Advisory
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2022-31109?
How severe is CVE-2022-31109?
How do I fix CVE-2022-31109?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2022
- CVE-2022-31103lettersanitizer is a DOM-based HTML email sanitizer for in-b…7.5
- CVE-2022-31104Wasmtime is a standalone runtime for WebAssembly. In affecte…5.6
- CVE-2022-31105Argo CD is a declarative, GitOps continuous delivery tool fo…9.6
- CVE-2022-31106Underscore.deep is a collection of Underscore mixins that op…9.8
- CVE-2022-31107Grafana is an open-source platform for monitoring and observ…7.5
- CVE-2022-31108Mermaid is a JavaScript based diagramming and charting tool …6.1
- CVE-2022-3111An issue was discovered in the Linux kernel through 5.16-rc6…5.5
- CVE-2022-31110RSSHub is an open source, extensible RSS feed generator. In …7.5
- CVE-2022-31111Frontier is Substrate's Ethereum compatibility layer. In aff…5.3
- CVE-2022-31112Parse Server is an open source backend that can be deployed …8.2
- CVE-2022-31113Canarytokens is an open source tool which helps track activi…6.1
- CVE-2022-31114backpack/crud provides Create, Read, Update & Delete (CRUD) …5.1
Are you affected by CVE-2022-31109?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
