Loading...
Skip to main content

CVE-2022-31033 — Vulnerability in mechanize — CVE Details

MEDIUM

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

Published June 9, 2022Updated November 8, 2023Source: osv

Summary

**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](CVE-2022-27776) 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.

Advisory Timeline

  • First published June 9, 2022 (1585 days ago).
  • Last revised November 8, 2023 — 516 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update mechanize to 2.8.5 or later
gem install mechanize -v 2.8.5

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: rubygems (1).

PackageEcosystemAffectedFixed In
mechanize
rubygems
0.1.0, 0.1.1, 0.1.2, 0.1.3 (+79 more)2.8.5

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 5.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

Frequently Asked Questions

What is CVE-2022-31033?
Mechanize before v2.8.5 vulnerable to authorization header leak on port redirect This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 5.9/10).
How do I check if my project is affected by CVE-2022-31033?
CVE-2022-31033 affects mechanize. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2022-31033 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
5.9

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-64qm-hrgp-pgr9

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies