{"id":"CVE-2026-107399","published":"2026-10-08T21:24:46Z","modified":"2026-10-14T01:21:37Z","title":"Mechanize sends credential headers to another origin after a meta refresh","vendor":"sparklemotion","product":"mechanize","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.8,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00458,"percentile":0.31716,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"},{"id":"CWE-522","name":"Insufficiently Protected Credentials"}],"references":[{"url":"https://github.com/sparklemotion/mechanize/security/advisories/GHSA-c6rp-p8xm-4q9f","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sparklemotion/mechanize/pull/676","tags":["x_refsource_MISC"]},{"url":"https://github.com/sparklemotion/mechanize/commit/02a1235842d6eda8d4a5a3d8f13aba2cecf52e4f","tags":["x_refsource_MISC"]},{"url":"https://github.com/sparklemotion/mechanize/commit/84c74df87d15f5d119df268ba6aa79bc1e16a2c3","tags":["x_refsource_MISC"]},{"url":"https://github.com/sparklemotion/mechanize/releases/tag/v2.14.1","tags":["x_refsource_MISC"]}],"priority":{"score":11.1,"factors":[{"name":"EPSS percentile","points":6.34},{"name":"CVSS severity","points":4.76}]},"vendorSlug":"sparklemotion","affectedVersions":[{"vendor":"sparklemotion","product":"mechanize","versions":["< 2.15.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-14T01:21:27.011574Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"mechanize","vulnerableRanges":["<2.14.1"],"patched":["2.14.1"],"from":["GHSA-c6rp-p8xm-4q9f"],"provenance":"source"}],"summary":{"text":"The Mechanize Ruby library (sparklemotion/mechanize) fails to enforce an origin boundary in its meta refresh handling, so when follow_meta_refresh is enabled, headers configured via request_headers= are resent to a different origin. An attacker who controls content the crawler fetches, by serving a page with a meta refresh to another origin, can capture bearer tokens or session cookies, though the default configuration is unaffected because follow_meta_refresh is off and exposure is limited to caller-supplied default headers.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:58:15Z"},"euvd":{"id":"EUVD-2026-95318","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-sparklemotion-mechanize-cve-2022-31033","parents":[{"from":"CVE-2022-31033","to":"CVE-2026-107399","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/mechanize/http/agent.rb"],"commits":["https://github.com/sparklemotion/mechanize/commit/c7fe6996a5b95f9880653ba3bc548a8d4ef72317","https://github.com/sparklemotion/mechanize/commit/02a1235842d6eda8d4a5a3d8f13aba2cecf52e4f","https://github.com/sparklemotion/mechanize/commit/84c74df87d15f5d119df268ba6aa79bc1e16a2c3"],"basis":"shared function","functions":["response_redirect"]}]}]}}