{"id":"CVE-2022-31033","published":"2022-06-09T20:00:16Z","modified":"2025-04-23T18:17:26Z","title":"Authorization header leak in rubygem Mechanize","vendor":"sparklemotion","product":"mechanize","tier":"tail","description":{"text":"The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. In versions prior to 2.8.5 the Authorization header is leaked after a redirect to a different port on the same site. Users are advised to upgrade to Mechanize v2.8.5 or later. There are no known workarounds for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.9,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01523,"percentile":0.75261,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://github.com/sparklemotion/mechanize/security/advisories/GHSA-64qm-hrgp-pgr9","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/sparklemotion/mechanize/commit/c7fe6996a5b95f9880653ba3bc548a8d4ef72317","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OA2FJROTX2U6EBWDPKRQ2VAM67A5TQXF/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7OKZMR5O3T5HQ2V737TC7IU4WZRT2LGX/","tags":["vendor-advisory","x_refsource_FEDORA"]}],"priority":{"score":19.2,"factors":[{"name":"EPSS percentile","points":15.05},{"name":"CVSS severity","points":4.13}]},"vendorSlug":"sparklemotion","affectedVersions":[{"vendor":"sparklemotion","product":"mechanize","versions":["< 2.8.5"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:05:43.245841Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"mechanize","vulnerableRanges":["<2.8.5"],"patched":["2.8.5"],"from":["GHSA-64qm-hrgp-pgr9"],"provenance":"source"}],"summary":{"text":"The Mechanize Ruby library (sparklemotion/mechanize), used to automate interaction with websites, leaks the Authorization header after a redirect to a different port on the same site. An attacker able to position a redirect toward that site, under network-level conditions that are difficult to achieve (high complexity, no authentication or user interaction required), can obtain the credentials carried in that header.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:12Z"},"euvd":{"id":"EUVD-2022-5951","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-21289","published":"2021-02-02","fixed":"2.7.7","kev":false,"link":{"from":"CVE-2021-21289","to":"CVE-2022-31033","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"RubyGems:mechanize","fromFixed":"2.7.7","toFixed":"2.8.5","daysApart":492}]}},{"cve":"CVE-2022-31033","published":"2022-06-09","fixed":"2.8.5","kev":false},{"cve":"CVE-2026-107399","published":"2026-10-08","fixed":"2.14.1","kev":false},{"cve":"CVE-2026-107715","published":"2026-10-08","fixed":"2.14.1","kev":false}],"package":"RubyGems:mechanize"}}