Description
The Mechanize library is used for automating interaction with websites. Prior to 2.14.1, Mechanize applies no origin trust boundary in Mechanize::HTTP::Agent#response_follow_meta_refresh when Mechanize#follow_meta_refresh is enabled. A page containing a meta refresh to another origin causes headers configured through Mechanize#request_headers= to be reapplied to the refresh request, allowing an attacker who controls content in the crawl to capture bearer tokens or session cookies. The default configuration is not affected because follow_meta_refresh is false, and the exposure is limited to caller-supplied default headers. This issue is fixed in version 2.14.1.
Published: 2026-10-08
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized Credential Exposure
Action: Apply Patch
AI Analysis

Impact

The vulnerability allows an attacker controlling content to force Mechanize to follow a meta refresh to a different origin while unintentionally re‑applying bearer tokens or session cookies that were previously set in the user’s request headers. This results in the exposure of authentication credentials to a malicious third party. The flaw arises from a lack of origin trust boundary enforcement when the library’s follow_meta_refresh feature is enabled. Consequently, secrets meant for one domain can be leaked to another. The weakness aligns with information disclosure and credential exposure concepts.

Affected Systems

The issue affects the Mechanize Ruby library provided by sparklemotion. Versions prior to 2.14.1 are vulnerable when the follow_meta_refresh option is set to true and custom request headers are supplied. Calls that use the default configuration, where follow_meta_refresh is disabled, are not impacted.

Risk and Exploitability

The CVSS score of 6.8 indicates a medium severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog, suggesting no publicly known exploits at this time. Nevertheless, if an attacker can serve crafted content to a user of Mechanize with follow_meta_refresh enabled, the credential leakage can occur without user interaction. The likely attack vector is a controlled webpage served to an automated crawler or script consuming Mechanize, and exploitation requires the ability to instruct the library to follow a meta refresh. While not immediately critical, the exposure of bearer tokens or session cookies can lead to account compromise and broader system access, especially if the tokens grant privileged API access or administrative rights.

Generated by OpenCVE AI on October 9, 2026 at 02:39 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Mechanize library to version 2.14.1 or later, where the meta‑refresh handling is fixed.
  • If an upgrade is not yet possible, configure the mechanism to disable follow_meta_refresh (set it to false) when using Mechanize.
  • Ensure that sensitive headers such as Authorization or Cookie are not automatically included in request_headers when follow_meta_refresh may cause cross‑origin redirects, or clear them before submitting the request.

Generated by OpenCVE AI on October 9, 2026 at 02:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-c6rp-p8xm-4q9f Mechanize sends credential headers to another origin after a meta refresh
History

Wed, 14 Oct 2026 02:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 09 Oct 2026 09:15:00 +0000

Type Values Removed Values Added
First Time appeared Sparklemotion
Sparklemotion mechanize
Vendors & Products Sparklemotion
Sparklemotion mechanize

Fri, 09 Oct 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-201
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 08 Oct 2026 21:30:00 +0000

Type Values Removed Values Added
Description The Mechanize library is used for automating interaction with websites. Prior to 2.14.1, Mechanize applies no origin trust boundary in Mechanize::HTTP::Agent#response_follow_meta_refresh when Mechanize#follow_meta_refresh is enabled. A page containing a meta refresh to another origin causes headers configured through Mechanize#request_headers= to be reapplied to the refresh request, allowing an attacker who controls content in the crawl to capture bearer tokens or session cookies. The default configuration is not affected because follow_meta_refresh is false, and the exposure is limited to caller-supplied default headers. This issue is fixed in version 2.14.1.
Title Mechanize sends credential headers to another origin after a meta refresh
Weaknesses CWE-200
CWE-522
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N'}


Subscriptions

Sparklemotion Mechanize
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-14T01:21:37.665Z

Reserved: 2026-10-07T21:07:54.989Z

Link: CVE-2026-107399

cve-icon Vulnrichment

Updated: 2026-10-14T01:21:32.542Z

cve-icon NVD

Status : Deferred

Published: 2026-10-08T22:17:26.683

Modified: 2026-10-14T02:16:57.060

Link: CVE-2026-107399

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-08T21:24:46Z

Links: CVE-2026-107399 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-09T08:03:09Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-201

    Insertion of Sensitive Information Into Sent Data

  • CWE-522

    Insufficiently Protected Credentials