Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS02NHFtLWhyZ3AtcGdyOc4AAreP

Mechanize before v2.8.5 vulnerable to authorization header leak on port redirect

Summary

Mechanize (rubygem) < v2.8.5 leaks the Authorization header after a redirect to a different port on the same site.

Mitigation

Upgrade to Mechanize v2.8.5 or later.

Notes

See https://curl.se/docs/CVE-2022-27776.html for a similar vulnerability in curl.

Cookies are shared with a server at a different port on the same site, per https://datatracker.ietf.org/doc/html/rfc6265#section-8.5 which states in part:

Cookies do not provide isolation by port. If a cookie is readable
by a service running on one port, the cookie is also readable by a
service running on another port of the same server. If a cookie is
writable by a service on one port, the cookie is also writable by a
service running on another port of the same server. For this
reason, servers SHOULD NOT both run mutually distrusting services on
different ports of the same host and use cookies to store security-
sensitive information.

Permalink: https://github.com/advisories/GHSA-64qm-hrgp-pgr9
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS02NHFtLWhyZ3AtcGdyOc4AAreP
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: almost 2 years ago
Updated: about 1 year ago


CVSS Score: 5.9
CVSS vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Identifiers: GHSA-64qm-hrgp-pgr9, CVE-2022-31033
References: Repository: https://github.com/sparklemotion/mechanize
Blast Radius: 23.4

Affected Packages

rubygems:mechanize
Dependent packages: 931
Dependent repositories: 9,296
Downloads: 30,663,133 total
Affected Version Ranges: < 2.8.5
Fixed in: 2.8.5
All affected versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.6.6, 0.6.7, 0.6.8, 0.6.9, 0.6.10, 0.6.11, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.7, 0.7.8, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 1.0.0, 2.0.1, 2.1.1, 2.2.1, 2.5.1, 2.6.0, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4
All unaffected versions: 2.8.5, 2.9.0, 2.9.1, 2.9.2, 2.10.0