{"cve":"CVE-2021-21289","nvd":{"published":"2021-02-02T19:15:14.220","modified":"2026-06-17T03:35:12.263","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","score":8.3},"cwes":["CWE-78"],"references":["https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0","https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7","https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g","https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html","https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/"],"products":["debian:debian_linux","fedoraproject:fedora","mechanize_project:mechanize"],"source":"nvd","synced_at":"2026-10-19T21:14:10.479542811+00:00"},"epss":{"cve":"CVE-2021-21289","score":0.03549,"percentile":0.89306,"date":"2026-11-01"},"kev":null,"osv":[{"id":"GHSA-qrqm-fpv6-6r8g","url":"https://osv.dev/vulnerability/GHSA-qrqm-fpv6-6r8g","summary":"Command Injection Vulnerability in Mechanize","modified":"2026-09-10T03:48:25.998395050Z","packages":[{"ecosystem":"RubyGems","name":"mechanize","purl":"pkg:gem/mechanize","ranges":[">=2.0.0 <2.7.7"],"fixed":["2.7.7"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}