GHSA-qrqm-fpv6-6r8g · Severity: high · Ecosystem: rubygems — Command Injection Vulnerability in Mechanize
Mechanize is an open-source ruby library that makes automated web interaction easy. In Mechanize from version 2.0.0 and before version 2.7.7 there is a command injection vulnerability. Affected versions of mechanize allow for OS commands to be injected using several classes' methods which implicitly use Ruby's Kernel.open method. Exploitation is possible only if untrusted input is used as a local filename and passed to any of these calls: Mechanize::CookieJar#load, Mechanize::CookieJar#save_as, Mechanize#download, Mechanize::Download#save, Mechanize::File#save, and Mechanize::FileResponse#read_body. This is fixed in version 2.7.7.
Conclusion & alert: CVE-2021-21289 is rated Moderate Risk (61.3/100): CVSS High severity, with medium exploitation likelihood (EPSS 3.51%). Core evidence: EPSS rose +1.00% over the last day, indicating growing attacker interest. Mandatory action: Review affected assets and schedule remediation.
Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.
EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).
| # | Date | Old EPSS score | New EPSS score | Delta (New - Old) |
|---|---|---|---|---|
| 1 | 2026-06-15 | 2.50% | 3.51% | +1.00% |
| 2 | 2025-11-21 | 1.74% | 2.50% | +0.76% |
| 3 | 2025-11-18 | — | 1.74% | — |
Full EPSS history (14 records total)
CVSS metrics for this CVE.
| Base score | Version | Severity | Vector | Exploitability | Impact | Score source |
|---|---|---|---|---|---|---|
| 7.4 | 3.1 | HIGH |
|
2.8 | 4.0 | [email protected] |
| 8.3 | 3.1 | HIGH |
|
1.6 | 6.0 | [email protected] |
| 7.6 | 2.0 | HIGH |
|
4.9 | 10.0 | [email protected] |
GHSA-qrqm-fpv6-6r8g · Severity: high · Ecosystem: rubygems — Command Injection Vulnerability in Mechanize
| vendor | priority | summary | link |
|---|---|---|---|
debian
|
not yet assigned | CVE-2021-21289 not yet assigned priority: Debian including 1 source packages (ruby-mechanize), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. | https://security-tracker.debian.org/tracker/CVE-2021-21289 |
gentoo
|
high | CVE-2021-21289: 1 GLSA(s) (202107-17), 1 atom(s) (dev-ruby/mechanize); latest impact high. | https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-21289 |
redhat
|
medium | — | https://access.redhat.com/security/cve/CVE-2021-21289 |
ubuntu
|
medium | CVE-2021-21289 medium priority: Ubuntu including 1 source packages (ruby-mechanize), 16 status rows across 16 suites (bionic, focal, groovy, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): not-affected 6, ignored 4, needs-triage 4, DNE 1, released 1. | https://ubuntu.com/security/CVE-2021-21289 |
| Vendor | Product | Version | Raw CPE |
|---|---|---|---|
| mechanize_project | mechanize | >= 2.0, < 2.7.7 | cpe:2.3:a:mechanize_project:mechanize:*:*:*:*:*:ruby:*:* |
| fedoraproject | fedora | 32 | cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* |
| fedoraproject | fedora | 33 | cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
| debian | debian_linux | 9.0 | cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
| URL | Tags |
|---|---|
| https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0 | Patch Third Party Advisory |
| https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7 | Release Notes Third Party Advisory |
| https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g | Third Party Advisory |
| https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html | Mailing List Third Party Advisory |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ | |
| https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ | |
| https://rubygems.org/gems/mechanize/ | Product Third Party Advisory |
| https://security.gentoo.org/glsa/202107-17 | Third Party Advisory |