CVE-2022-31033: Authorization header leak in rubygem Mechanize

Published Jun 9, 2022
·
Updated

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 Software

7 affected componentsFixes available
Mechanize Project Mechanize Ruby<2.8.5
Fedoraproject Fedora=35
Fedoraproject Fedora=36
debian/ruby-mechanize<2.8.5-1
2.8.5-1
debian/ruby-mechanize<2.8.5-1
2.8.5-1
debian/ruby-mechanize<2.8.5-1
2.8.5-1
debian/ruby-mechanize
2.8.5-12.10.1-12.14.2-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/ruby-mechanize to a version that resolves this vulnerability.

    Fixed in 2.8.5-1Fixed in 2.10.1-1Fixed in 2.14.2-1
  2. Upgrade

    Upgrade debian/ruby-mechanize to a version that resolves this vulnerability.

    Fixed in 2.8.5-1
  3. Upgrade

    Upgrade rubygem Mechanize to a version that resolves this vulnerability.

    Fixed in 2.8.5

Event History

Jun 9, 2022
CVE Published
via MITRE·08:00 PM
Data Sourced
via MITRE·08:00 PM
DescriptionSeverityWeakness
Data Sourced
via OSV·08:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is CVE-2022-31033?

CVE-2022-31033 is a vulnerability in the Mechanize library that leaks the Authorization header after a redirect to a different port on the same site.

2

How does CVE-2022-31033 affect the Mechanize library?

CVE-2022-31033 affects versions of the Mechanize library prior to 2.8.5.

3

What is the severity of CVE-2022-31033?

CVE-2022-31033 has a severity rating of 7.5 (high).

4

How can I fix CVE-2022-31033?

To fix CVE-2022-31033, update to version 2.8.5 or later of the Mechanize library.

5

Where can I find more information about CVE-2022-31033?

More information about CVE-2022-31033 can be found in the references provided: [Reference 1](https://github.com/sparklemotion/mechanize/commit/c7fe6996a5b95f9880653ba3bc548a8d4ef72317), [Reference 2](https://github.com/sparklemotion/mechanize/security/advisories/GHSA-64qm-hrgp-pgr9), [Reference 3](https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7OKZMR5O3T5HQ2V737TC7IU4WZRT2LGX/)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203