CVE-2026-107715 Mechanize sends credential headers to another host after an HTTP redirect

Medium 6.8 Published Updated

Mechanize leaks credential headers to attacker-controlled hosts during redirects, allowing capture of bearer tokens or session cookies.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-107715?

CVE-2026-107715 is a medium-severity vulnerability in sparklemotion mechanize, published on 8 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

The Mechanize library is used for automating interaction with websites. Prior to 2.14.1, Mechanize sends caller-supplied credential headers to a different host after an HTTP redirect. Mechanize#request_headers= is reapplied by Mechanize::HTTP::Agent#request_add_headers even after Mechanize::HTTP::Agent#response_redirect strips per-request headers, and the protected header lists omit Proxy-Authorization and Cookie2. An attacker who controls a redirect target can capture bearer tokens or session cookies supplied through request_headers= or the per-request headers argument, while Mechanize#cookie_jar and Mechanize::HTTP::AuthStore are not affected. This issue is fixed in version 2.14.1.

Weakness: CWE-522, CWE-200

Which versions are affected by CVE-2026-107715?

2 open source packages ship an affected version, including mechanize.

PackageAffectedFixed in
mechanize RubyGemsAll versions2.14.1
mechanize RubyGemsAll versions2.14.1

How do I fix CVE-2026-107715?

Upgrade mechanize to 2.14.1 or later.

Is CVE-2026-107715 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-107715 exists.

Sources

Also known as DEBIAN-CVE-2026-107715, GHSA-2mwr-xjcg-37j7, UBUNTU-CVE-2026-107715.

Is CVE-2026-107715 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free