Skip to content
OpenAdvisories
Medium · 5.9 CVE-2022-31033 EUVD-2022-5951GHSA-64qm-hrgp-pgr9

Authorization header leak in rubygem Mechanize

Published Jun 9, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
sparklemotion mechanize < 2.8.5 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ruby-mechanize 2.8.5-1 —
Debian 13 ruby-mechanize 2.8.5-1 —
Debian 12 ruby-mechanize 2.8.5-1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 ruby-mechanize No fix yet —
Ubuntu 26.04 LTS ruby-mechanize No fix yet —
Ubuntu 25.10 ruby-mechanize No fix yet —
Ubuntu 24.04 LTS ruby-mechanize No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
RubyGems mechanize < 2.8.5 2.8.5 GHSA-64qm-hrgp-pgr9

References