CVE-2022-31033
HIGH 7.5CVSS 3.1Mechanize before v2.8.5 vulnerable to authorization header leak on port redirect
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.
- Published
- 9 Jun 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-200CWE-522
- Also known as
- GHSA-64qm-hrgp-pgr9
- Sources
- NVDJSONOSV GHSA-64qm-hrgp-pgr9JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | mechanize_project | mechanizecpe:2.3:a:mechanize_project:mechanize:*:*:*:*:*:ruby:*:* |
< 2.8.5 | 2.8.5 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* |
= 35 | |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* |
= 36 | |
| OSV | RubyGems | mechanize | < 2.8.5 | 2.8.5 |
References
- https://github.com/sparklemotion/mechanize/commit/c7fe6996a5b95f9880653ba3bc548a8d4ef72317 · Patch, Third Party Advisory, WEB
- https://github.com/sparklemotion/mechanize/security/advisories/GHSA-64qm-hrgp-pgr9 · Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7OKZMR5O3T5HQ2V737TC7IU4WZRT2LGX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OA2FJROTX2U6EBWDPKRQ2VAM67A5TQXF/
- https://nvd.nist.gov/vuln/detail/CVE-2022-31033 · ADVISORY
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/mechanize/CVE-2022-31033.yml · WEB
- https://github.com/sparklemotion/mechanize · PACKAGE
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 9 Jun 2022)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 9 Jun 2022)