# guzzlehttp/psr7: Host Confusion via Weak URI Host Validation

Advisory record · `GHSA-c2w2-prh8-qm98`

- **Identifiers:** `GHSA-c2w2-prh8-qm98` · `CVE-2026-59882` · `PKSA-vznr-tgp9-fd7d`
- **State:** Confirmed
- **Severity:** CVSS 4.2 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-20](https://cwe.mitre.org/data/definitions/20.html) · [CWE-436](https://cwe.mitre.org/data/definitions/436.html)
- **Tags:** [CWE-20](https://agentprime.io/advisories/tag/cwe-20.md) · [CWE-436](https://agentprime.io/advisories/tag/cwe-436.md)
- **Published:** 21 Jul 2026
- **Updated:** 21 Jul 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 21 Jul 2026, 18:35 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `guzzlehttp/psr7` (Packagist): affected `<2.12.3`; fixed in `2.12.3`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Versions of guzzlehttp/psr7 before 2.12.3 accept URI host values containing authority delimiters, an embedded port, or unframed IPv6 brackets, so getHost() can disagree with the URI authority. An attacker who can supply host data to a Uri, or to a raw HTTP message or $\_SERVER values that are parsed, can cause host-based access checks, SSRF guards, or routing to use a different host than the one connected to. Upgrade to 2.12.3 or later; until then, reject hosts containing /, ?, #, @, or \ and validate hosts before parsing untrusted input.

Written 3 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 4.2 Medium, CVSS 3.1: `CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0032, the 24th percentile, on 6 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:25 UTC: First seen by agentprime
- 31 Oct 2026, 14:25 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-c2w2-prh8-qm98)

## Sources

- [GitHub Advisory Database: GHSA-c2w2-prh8-qm98](https://github.com/advisories/GHSA-c2w2-prh8-qm98)
- [OSV: GHSA-c2w2-prh8-qm98](https://osv.dev/vulnerability/GHSA-c2w2-prh8-qm98)
- <https://github.com/guzzle/psr7/security/advisories/GHSA-c2w2-prh8-qm98>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-59882>
- <https://github.com/guzzle/psr7/pull/811>
- <https://github.com/guzzle/psr7/commit/ddd64f17d4cc1f7e5ffe6fd2c989ec7221712580>
- <https://github.com/guzzle/psr7>
- <https://github.com/guzzle/psr7/releases/tag/2.12.3>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-c2w2-prh8-qm98>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-c2w2-prh8-qm98/>. Everything for agents: <https://agentprime.io/llms.txt>.
