CVE-2021-21289

  • Severity 8.3 HIGH
  • Published
  • Updated
  • Status Modified
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.
OS Command Injection
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
8.3 HIGH
NETWORK
HIGH
NONE
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
Base Score
CVSS 3.1
EPSS Score
Percentile: 89.65%
Affected Products (NVD)
VendorProductVersion
mechanize_projectmechanize
2.0 ≤
𝑥
< 2.7.7
debiandebian_linux
9.0
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
ruby-mechanize
bookworm
2.8.5-1
fixed
bullseye
2.7.7-1
fixed
sid
2.10.1-1
fixed
trixie
2.10.1-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
ruby-mechanize
bionic
Fixed 2.7.5-2ubuntu0.1~esm1
released
focal
Fixed 2.7.6-1ubuntu0.1~esm1
released
groovy
ignored
hirsute
ignored
impish
ignored
jammy
not-affected
kinetic
ignored
lunar
not-affected
mantic
not-affected
noble
not-affected
oracular
not-affected
plucky
not-affected
questing
not-affected
resolute
not-affected
stonking
not-affected
trusty
dne
xenial
Fixed 2.7.3-1ubuntu0.1~esm1
released