8.3
HIGH
CVE-2021-21289
Mechanize Command Injection Vulnerability
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.

INFO

Published Date :

Feb. 2, 2021, 7:15 p.m.

Last Modified :

Nov. 7, 2023, 3:29 a.m.

Remotely Exploitable :

Yes !

Impact Score :

6.0

Exploitability Score :

1.6
Affected Products

The following products are affected by CVE-2021-21289 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Debian debian_linux
1 Mechanize_project mechanize

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2021-21289 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2021-21289 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ [No types assigned]
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ [No types assigned]
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/
  • Modified Analysis by [email protected]

    Apr. 26, 2022

    Action Type Old Value New Value
    Changed Reference Type https://security.gentoo.org/glsa/202107-17 No Types Assigned https://security.gentoo.org/glsa/202107-17 Third Party Advisory
    Added CWE NIST CWE-78
  • CVE Modified by [email protected]

    Jul. 08, 2021

    Action Type Old Value New Value
    Added Reference https://security.gentoo.org/glsa/202107-17 [No Types Assigned]
  • Modified Analysis by [email protected]

    Feb. 19, 2021

    Action Type Old Value New Value
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html No Types Assigned https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ Third Party Advisory https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ Third Party Advisory https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Feb. 16, 2021

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html [No Types Assigned]
  • Modified Analysis by [email protected]

    Feb. 16, 2021

    Action Type Old Value New Value
    Removed CVSS V2 NIST (AV:N/AC:M/Au:N/C:C/I:C/A:C)
    Added CVSS V2 NIST (AV:N/AC:H/Au:N/C:C/I:C/A:C)
    Removed CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
    Added CVSS V3.1 NIST AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Feb. 11, 2021

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/ [No Types Assigned]
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Feb. 08, 2021

    Action Type Old Value New Value
    Added CVSS V2 Metadata Victim must voluntarily interact with attack mechanism
    Added CVSS V2 NIST (AV:N/AC:M/Au:N/C:C/I:C/A:C)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
    Changed Reference Type https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0 No Types Assigned https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0 Patch, Third Party Advisory
    Changed Reference Type https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7 No Types Assigned https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7 Release Notes, Third Party Advisory
    Changed Reference Type https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g No Types Assigned https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g Third Party Advisory
    Changed Reference Type https://rubygems.org/gems/mechanize/ No Types Assigned https://rubygems.org/gems/mechanize/ Product, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:mechanize_project:mechanize:*:*:*:*:*:ruby:*:* versions from (including) 2.0 up to (excluding) 2.7.7
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2021-21289 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.30 }} 0.00%

score

0.66132

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability