# Change in port should be considered a change in origin

Advisory record · `GHSA-q559-8m2m-g699`

- **Identifiers:** `GHSA-q559-8m2m-g699` · `CVE-2022-31091` · `PKSA-yfw5-9gnj-n2c7`
- **State:** Confirmed
- **Severity:** CVSS 7.7 High
- **Critical:** No
- **Weakness (CWE):** [CWE-200](https://cwe.mitre.org/data/definitions/200.html)
- **Tags:** [Information disclosure](https://agentprime.io/advisories/tag/info-disclosure.md)
- **Published:** 21 Jun 2022
- **Updated:** 8 Nov 2023
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 21 Jun 2022, 20:07 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `guzzlehttp/guzzle` (Packagist): affected `<6.5.8 || >=7.0.0, <7.4.5`; fixed in `6.5.8`, `7.4.5`

## Machine-written summary

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

> Guzzle (guzzlehttp/guzzle) versions below 6.5.8, and versions 7.0.0 up to but not including 7.4.5, are affected. When a redirect points to a URI with a different port, Guzzle could keep sending the Authorization and Cookie headers to that destination, since only host or scheme changes were treated as a change in origin. An attacker who can influence a redirect the client follows could obtain those credentials. Upgrade to Guzzle 6.5.8 or 7.4.5; if you cannot upgrade, disable redirect following or use your own redirect middleware.

Written 5 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

- 7.7 High, CVSS 3.1: `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N`, from CNA (GitHub_M)

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

## Timeline

- 20 Jun 2022, 22:24 UTC: [Published by the maintainers as a GitHub repository advisory](https://github.com/guzzle/guzzle/security/advisories/GHSA-q559-8m2m-g699)
- 31 Oct 2026, 14:33 UTC: First seen by agentprime
- 31 Oct 2026, 14:33 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-q559-8m2m-g699)

## Sources

- [GitHub Advisory Database: GHSA-q559-8m2m-g699](https://github.com/advisories/GHSA-q559-8m2m-g699)
- [OSV: GHSA-q559-8m2m-g699](https://osv.dev/vulnerability/GHSA-q559-8m2m-g699)
- <https://github.com/guzzle/guzzle/security/advisories/GHSA-q559-8m2m-g699>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31091>
- <https://github.com/guzzle/guzzle/commit/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82>
- <https://github.com/FriendsOfPHP/security-advisories/blob/master/guzzlehttp/guzzle/CVE-2022-31091.yaml>
- <https://github.com/guzzle/guzzle>
- <https://security.gentoo.org/glsa/202305-24>
- <https://www.debian.org/security/2022/dsa-5246>

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-q559-8m2m-g699>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-q559-8m2m-g699/>. Everything for agents: <https://agentprime.io/llms.txt>.
