BreachSpiderVerified, not vibes

CVE-2022-31109 in Getlaminas Laminas-Diactoros

Medium 6.1

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 `Lamin...

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.16.1
EPSS0.9%
EPSS percentile56th
FixUnknown

Remotely exploitable over the network, low complexity, no authentication required, requires user interaction, can impact systems beyond the vulnerable component, no availability impact.

Affected products and versions

VendorProductAffected versions
Getlaminas Laminas-Diactoros < 2.11.1

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

Official 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.

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2022-31109
BreachSpider IDBS-2022-GLOBAL-319197-M
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Published2022-08-01
Last modified2026-06-17
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-79: Cross-Site Scripting (XSS)

Attacker injects malicious scripts into web pages viewed by other users, executing in the victim's browser context.

CWE-444: CWE-444

Related attack patterns (CAPEC)

CAPEC-33 HTTP Request Smuggling via CWE-444

CAPEC-85 AJAX Footprinting via CWE-79

CAPEC-209 XSS Using MIME Type Mismatch via CWE-79

CAPEC-273 HTTP Response Smuggling via CWE-444

CAPEC-588 DOM-Based XSS via CWE-79

Show all 8

CAPEC-591 Reflected XSS via CWE-79

CAPEC-592 Stored XSS via CWE-79

CAPEC-63 Cross-Site Scripting (XSS) via CWE-79

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

CVE-2022-31109 affects the laminas-diactoros PHP package, potentially allowing an attacker to modify the host, protocol, and/or port of a Uri instance associated with an incoming server request if the application is not behind a trusted proxy or can be accessed via untrusted proxies.

The vulnerability arises from the way laminas-diactoros handles URI normalization and validation in the presence of untrusted proxies. An attacker could exploit this to manipulate the URI, leading to potential redirection to malicious sites or other security issues.

Questions

What is CVE-2022-31109?

CVE-2022-31109 affects the laminas-diactoros PHP package, potentially allowing an attacker to modify the host, protocol, and/or port of a Uri instance associated with an incoming server request if the application is not behind a trusted proxy or can be accessed via untrusted proxies.

What is the CVSS score for CVE-2022-31109?

CVE-2022-31109 has CVSS 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N. EPSS: 0.9%.

Is CVE-2022-31109 actively exploited?

No confirmed active exploitation of CVE-2022-31109 as of 2026-09-25.

How do I remediate CVE-2022-31109?

Priority: MEDIUM.

What systems are affected by CVE-2022-31109?

CVE-2022-31109 affects Getlaminas Laminas-Diactoros.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Getlaminas","product":"Laminas-Diactoros","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.