Vulnerability · Published Jun 9, 2022 · Assigned by GitHub_M
CVE-2022-31033Authorization header leak in rubygem Mechanize
Medium 5.9
In plain English
A medium-severity information exposure in mechanize from sparklemotion. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 75% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | ruby-mechanize | 2.8.5-1 | DEBIAN-CVE-2022-31033 |
| Debian:13 | ruby-mechanize | 2.8.5-1 | DEBIAN-CVE-2022-31033 |
| Debian:14 | ruby-mechanize | 2.8.5-1 | DEBIAN-CVE-2022-31033 |
| RubyGems | mechanize | 2.8.5 | GHSA-64qm-hrgp-pgr9 |
| Ubuntu:24.04:LTS | ruby-mechanize | no fix listed | UBUNTU-CVE-2022-31033 |
| Ubuntu:25.10 | ruby-mechanize | no fix listed | UBUNTU-CVE-2022-31033 |
| Ubuntu:26.04:LTS | ruby-mechanize | no fix listed | UBUNTU-CVE-2022-31033 |
| Ubuntu:26.10 | ruby-mechanize | no fix listed | UBUNTU-CVE-2022-31033 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| sparklemotion | mechanize | < 2.8.5 |
Weakness: CWE-200 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/sparklemotion/mechanize/security/advisories/GHSA-64qm-hrgp-pgr9 x_refsource_CONFIRM
- https://github.com/sparklemotion/mechanize/commit/c7fe6996a5b95f9880653ba3bc548a8d4ef72317 x_refsource_MISC
- FEDORA-2022-fda14723ec vendor-advisory, x_refsource_FEDORA
- FEDORA-2022-6b1b324753 vendor-advisory, x_refsource_FEDORA