Skip to main content

Mechanize

5 CVEs product

Monthly

CVE-2026-107715 Oct 08, 21:27 Ruby MEDIUM POC PATCH GHSA This Month

Cross-origin credential leakage in the Mechanize Ruby library (versions prior to 2.14.1) allows attackers who control a redirect target to capture bearer tokens, session cookies, Proxy-Authorization credentials, or Cookie2 values that the calling application supplied through Mechanize#request_headers= or the per-request headers argument. The flaw is conditional: it only triggers when an application actually sets credentials via those header APIs and a response issues a cross-origin HTTP redirect (or a cross-origin meta refresh), so same-origin redirects are unaffected and credentials managed through Mechanize#cookie_jar or Mechanize::HTTP::AuthStore are explicitly out of scope; there is no public exploit identified at time of analysis. Because the attacker must influence the redirect destination rather than merely reach the service, this is a genuine but conditional information-disclosure issue (CWE-200) rather than a mass-exploitation priority.

Information Disclosure Ruby Red Hat Mechanize Sparklemotion
NVD GitHub VulDB
CVSS 3.1
6.8
EPSS
0.4%
CVE-2026-107714 Oct 08, 21:26 MEDIUM PATCH This Month

Credential-header leakage in the Ruby Mechanize gem before 2.14.1 allows sensitive headers to be forwarded to a lower-trust destination during redirect following, because Mechanize::HTTP::Agent#response_redirect considered a redirect same-origin whenever the host matched, without comparing scheme or port. A same-host HTTPS-to-HTTP downgrade can put caller-supplied Authorization (or Proxy-Authorization) and Cookie (or Cookie2) headers on the wire in cleartext, and a same-host redirect to a different port can deliver a caller-supplied Cookie to an unrelated service listening there. Per the assessed vector (CVSS 5.9, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) the impact is confidentiality-only with no integrity or availability effect, and no public exploit was identified at time of analysis; the practical risk is limited because the consuming application must explicitly inject its own credential headers and an attacker must control or man-in-the-middle the redirect response, while cookies held in Mechanize#cookie_jar are scoped correctly and are not leaked. Vendor-released patch: 2.14.1.

Information Disclosure Ruby Red Hat Mechanize Sparklemotion
NVD GitHub
CVSS 3.1
5.9
EPSS
0.2%
CVE-2026-107399 Oct 08, 21:24 Ruby MEDIUM POC PATCH GHSA This Month

Credential leakage in the Ruby Mechanize library before 2.14.1 lets an attacker who controls page content encountered during a crawl capture bearer tokens or session cookies, because a cross-origin meta refresh caused Mechanize::HTTP::Agent#response_follow_meta_refresh to reapply the caller's global default headers to the refresh request. Exploitation is conditional and rated AC:H: Mechanize#follow_meta_refresh must be explicitly enabled (it defaults to false), the caller must have placed sensitive credentials in the agent-wide default headers via Mechanize#request_headers=, and the attacker must be able to serve attacker-controlled markup to the crawl, though the request itself is unauthenticated (PR:N) and requires no user interaction (UI:N). There is no KEV entry, no public exploit identified at time of analysis, and no EPSS score supplied; the vendor-released fix is Mechanize 2.14.1, where cross-origin meta refreshes now discard credential and cookie headers under the same origin rules as HTTP redirects.

Information Disclosure Ruby Red Hat Mechanize Sparklemotion
NVD GitHub
CVSS 3.1
6.8
EPSS
0.4%
CVE-2022-31033 Jun 09, 20:15 Ruby HIGH PATCH This Week

The Mechanize library is used for automating interaction with websites. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Exposure of Sensitive Information vulnerability could allow attackers to access sensitive data that should not be disclosed.

Information Disclosure Fedora Mechanize Fedoraproject Mechanize Project
NVD GitHub
CVSS 3.1
7.5
EPSS
1.4%
CVE-2021-21289 Feb 02, 19:15 Ruby HIGH PATCH This Week

Mechanize is an open-source ruby library that makes automated web interaction easy. Rated high severity (CVSS 8.3), this vulnerability is remotely exploitable, no authentication required. This OS Command Injection vulnerability could allow attackers to execute arbitrary operating system commands on the host.

Command Injection Debian Debian Linux Fedora Mechanize +2
NVD GitHub
CVSS 3.1
8.3
EPSS
3.5%
EPSS 0% CVSS 6.8
MEDIUM POC PATCH This Month

Cross-origin credential leakage in the Mechanize Ruby library (versions prior to 2.14.1) allows attackers who control a redirect target to capture bearer tokens, session cookies, Proxy-Authorization credentials, or Cookie2 values that the calling application supplied through Mechanize#request_headers= or the per-request headers argument. The flaw is conditional: it only triggers when an application actually sets credentials via those header APIs and a response issues a cross-origin HTTP redirect (or a cross-origin meta refresh), so same-origin redirects are unaffected and credentials managed through Mechanize#cookie_jar or Mechanize::HTTP::AuthStore are explicitly out of scope; there is no public exploit identified at time of analysis. Because the attacker must influence the redirect destination rather than merely reach the service, this is a genuine but conditional information-disclosure issue (CWE-200) rather than a mass-exploitation priority.

Information Disclosure Ruby Red Hat +2
NVD GitHub VulDB
EPSS 0% CVSS 5.9
MEDIUM PATCH This Month

Credential-header leakage in the Ruby Mechanize gem before 2.14.1 allows sensitive headers to be forwarded to a lower-trust destination during redirect following, because Mechanize::HTTP::Agent#response_redirect considered a redirect same-origin whenever the host matched, without comparing scheme or port. A same-host HTTPS-to-HTTP downgrade can put caller-supplied Authorization (or Proxy-Authorization) and Cookie (or Cookie2) headers on the wire in cleartext, and a same-host redirect to a different port can deliver a caller-supplied Cookie to an unrelated service listening there. Per the assessed vector (CVSS 5.9, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) the impact is confidentiality-only with no integrity or availability effect, and no public exploit was identified at time of analysis; the practical risk is limited because the consuming application must explicitly inject its own credential headers and an attacker must control or man-in-the-middle the redirect response, while cookies held in Mechanize#cookie_jar are scoped correctly and are not leaked. Vendor-released patch: 2.14.1.

Information Disclosure Ruby Red Hat +2
NVD GitHub
EPSS 0% CVSS 6.8
MEDIUM POC PATCH This Month

Credential leakage in the Ruby Mechanize library before 2.14.1 lets an attacker who controls page content encountered during a crawl capture bearer tokens or session cookies, because a cross-origin meta refresh caused Mechanize::HTTP::Agent#response_follow_meta_refresh to reapply the caller's global default headers to the refresh request. Exploitation is conditional and rated AC:H: Mechanize#follow_meta_refresh must be explicitly enabled (it defaults to false), the caller must have placed sensitive credentials in the agent-wide default headers via Mechanize#request_headers=, and the attacker must be able to serve attacker-controlled markup to the crawl, though the request itself is unauthenticated (PR:N) and requires no user interaction (UI:N). There is no KEV entry, no public exploit identified at time of analysis, and no EPSS score supplied; the vendor-released fix is Mechanize 2.14.1, where cross-origin meta refreshes now discard credential and cookie headers under the same origin rules as HTTP redirects.

Information Disclosure Ruby Red Hat +2
NVD GitHub
EPSS 1% CVSS 7.5
HIGH PATCH This Week

The Mechanize library is used for automating interaction with websites. Rated high severity (CVSS 7.5), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Exposure of Sensitive Information vulnerability could allow attackers to access sensitive data that should not be disclosed.

Information Disclosure Fedora Mechanize +2
NVD GitHub
EPSS 4% CVSS 8.3
HIGH PATCH This Week

Mechanize is an open-source ruby library that makes automated web interaction easy. Rated high severity (CVSS 8.3), this vulnerability is remotely exploitable, no authentication required. This OS Command Injection vulnerability could allow attackers to execute arbitrary operating system commands on the host.

Command Injection Debian Debian Linux +4
NVD GitHub

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy