Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2021-21289

published high CVSS 3.1 · 7.4

Command Injection Vulnerability in Mechanize

Published
02 Feb 2021, 18:50:13 UTC
Updated
03 Aug 2024, 18:09:15 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
sparklemotion — mechanize>= 2.0, < 2.7.7 Affected Not stated GitHub_M
Debian stretch ruby-mechanize Advisory build 2.7.5-1+deb9u1 DLA-2561-1
Ubuntu bionic ruby-mechanize Advisory build 2.7.5-2ubuntu0.1~esm1 USN-9148-1
Ubuntu focal ruby-mechanize Advisory build 2.7.6-1ubuntu0.1~esm1 USN-9148-1
Ubuntu xenial ruby-mechanize Advisory build 2.7.3-1ubuntu0.1~esm1 USN-9148-1

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.

en · GitHub_M · cna

Vendor advisories explicitly linked to this CVE.

4

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.4 / 10
Severity
high
Provider
GitHub_M · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
sparklemotion mechanize >= 2.0, < 2.7.7 (affected) GitHub_M · cna

Weaknesses

1
  • CWE-78 CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (GitHub_M · cna)

References

8

Provider assertions

2

GitHub_M · cna

Command Injection Vulnerability in Mechanize

CVE · adp

CVE Program Container

Provenance

Schema
5.1
Searchable
yes
Content hash
a80bb25b6c432475be5e72154f3e73213b215dcf8e83f5b45aa07902b23b20f8
Ingested
23 Sep 2026, 07:52:31 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected