CVE-2021-21289: debian debian_linux OS Command Injection
Vulnerability summary
CVE-2021-21289 is a high (CVSS 8.3) OS Command Injection vulnerability in debian debian_linux. EPSS estimates a 3.51% chance of exploitation in the next 30 days, higher than 89.1% of scored vulnerabilities.
Timeline
- 02-02-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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 metrics
6 scores · 5 sources · 2 versions- CVE.orgCNA7.4HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:NDiffers
- OSV · UbuntuEcosystem advisory · calculated8.3HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.3HighCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- OSV · RubygemsEcosystem advisory · calculated7.4HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:NDiffers
EPSS trend
Probability
3.51%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
0.00 pp
From 3.51% on 22-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Debian2 products
- ruby-mechanize< 2.7.5-1+deb9u1 | < 2.7.7-1
- debian_linuxEOL9.0
Mageia2 products
- ruby-mechanize< 2.7.6-2.1.mga7
- ruby-mechanize< 2.7.6-3.1.mga8
Fedoraproject1 product
- fedoraEOL32 | 33
Mechanize_project1 product
- mechanize≥ 2.0, < 2.7.7
RubyGems1 product
- mechanize≥ 2.0.0, < 2.7.7
Sparklemotion1 product
- mechanize≥ 2.0, < 2.7.7
Ubuntu1 product
- ruby-mechanizeAll versions (No fix recorded)
7 vendors · 9 products
References
25 links- github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8gX Refsource CONFIRMREPORTWEBThird Party Advisory
- github.com/sparklemotion/mechanize/releases/tag/v2.7.7X Refsource MISCREPORTWEBRelease NotesThird Party Advisory
- github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0X Refsource MISCREPORTWEBPatchThird Party Advisory
- lists.debian.org/debian-lts-announce/2021/02/msg00021.htmlMailing ListX Refsource MLISTWEBThird Party Advisory