CVE-2021-21289 — Command Injection Vulnerability in mechanize —...
Command Injection Vulnerability in Mechanize
Summary
Advisory Timeline
- First published February 2, 2021 (2078 days ago).
- Last revised September 10, 2026 — 2045 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install mechanize -v 2.7.7
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: rubygems (1).
| Package | Ecosystem | Affected | Fixed In |
|---|---|---|---|
| mechanize | rubygems | 2.0, 2.0.1, 2.1, 2.1.1 (+15 more) | 2.7.7 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-78OS Command InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.4 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N
References
- https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8gWEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-21289ADVISORY
- https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/mechanize/CVE-2021-21289.ymlWEB
- https://github.com/sparklemotion/mechanizePACKAGE
- https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7WEB
- https://lists.debian.org/debian-lts-announce/2021/02/msg00021.htmlWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPVWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2VWEB
- https://rubygems.org/gems/mechanizeWEB
- https://security.gentoo.org/glsa/202107-17WEB
Frequently Asked Questions
- What is CVE-2021-21289?
- Command Injection Vulnerability in Mechanize This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.4/10).
- How do I check if my project is affected by CVE-2021-21289?
- CVE-2021-21289 affects mechanize. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2021-21289 and 200,000+ other known vulnerabilities.
Severity & Exploitability
High exploitability or significant impact. Prioritize remediation within days.
Also Known As
Related CVEs
- CVE-2026-94462HIGH
Spree: Broken Access Control in `PATCH /api/v3/store/carts/:id/associate` (IDOR)
- CVE-2026-77601HIGH
OpenC3 COSMOS: Authenticated OS command injection via the `pypi_url` setting
- CVE-2026-107715MEDIUM
Mechanize sends credential headers to another host after an HTTP redirect
- CVE-2022-31033MEDIUM
Mechanize before v2.8.5 vulnerable to authorization header leak on port redirect
- CVE-2026-107399MEDIUM
Mechanize sends credential headers to another origin after a meta refresh
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies