Insertion of Sensitive Information Into Sent Data Affecting mechanize package, versions <2.14.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.36% (29th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-MECHANIZE-21716801
  • published26 Oct 2026
  • disclosed8 Oct 2026
  • creditflavorjones

Introduced: 8 Oct 2026

NewCVE-2026-107399  (opens in a new tab)
CWE-201  (opens in a new tab)
CWE-522  (opens in a new tab)

How to fix?

Upgrade mechanize to version 2.14.1 or higher.

Overview

Affected versions of this package are vulnerable to Insertion of Sensitive Information Into Sent Data via the response_follow_meta_refresh function in Mechanize::HTTP::Agent. An attacker who can place a meta refresh in a page the agent fetches can point it to another origin and capture bearer tokens or session cookies configured through Mechanize#request_headers=. This requires follow_meta_refresh to be enabled, which is false by default.

Workarounds

  • Leave Mechanize#follow_meta_refresh at its default value of false to prevent the agent from following attacker-controlled meta refreshes.
  • If meta refresh following is enabled, avoid setting credentials through Mechanize#request_headers= to prevent those credentials from being sent to a cross-origin refresh target.

CVSS Base Scores

version 4.0
version 3.1