CVE-2026-107714: Mechanize credential leak via cross-origin redirects

CVE-2026-107714 · Severity: medium · CVSS 5.9 · Published 2026-10-08

Mechanize is a Ruby library that automates interaction with websites by handling HTTP requests and cookies. The library failed to properly validate scheme and port changes when following redirects, allowing credentials (Authorization headers and cookies) to leak over insecure HTTPS-to-HTTP connections or to unintended services on different ports. An attacker controlling a website could craft a redirect chain to intercept these credentials sent by the client application.

Vendors: Sparklemotion.

Quick answers

Is CVE-2026-107714 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-107714 being exploited in the wild.
How severe is CVE-2026-107714?
Medium severity, with a CVSS score of 5.9, published 8 October 2026.
Which products and versions are affected?
Sparklemotion Mechanize prior to 2.14.1.
Is there a fix for CVE-2026-107714?
Yes: fixed in 2.14.1. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-107714 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-107714?
Check whether you run Sparklemotion Mechanize at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • Fixed in: 2.14.1

Technical details

The vulnerability in Mechanize::HTTP::Agent#response_redirect treats redirects as same-origin when only the host matches, without validating that scheme and port remain unchanged. This causes caller-supplied Authorization and Cookie headers to be forwarded across origin boundaries when an HTTPS redirect becomes HTTP or when the port changes. The fix implements proper origin checking per RFC 6454 and WHATWG Fetch specification, ensuring headers are stripped when scheme, host, or port changes between the request and redirect target.

Affected products

  • sparklemotion Mechanize prior to 2.14.1

Timeline

  • 2026-10-08: disclosed

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.