Vulnerability Details : CVE-2021-21289
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.
Products affected by CVE-2021-21289
- cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:32:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
- cpe:2.3:a:mechanize_project:mechanize:*:*:*:*:*:ruby:*:*
Exploit prediction scoring system (EPSS) score for CVE-2021-21289
0.30%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 66 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2021-21289
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
7.6
|
HIGH | AV:N/AC:H/Au:N/C:C/I:C/A:C |
4.9
|
10.0
|
NIST | |
8.3
|
HIGH | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
1.6
|
6.0
|
NIST | |
7.4
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N |
2.8
|
4.0
|
GitHub, Inc. |
CWE ids for CVE-2021-21289
-
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.Assigned by:
- nvd@nist.gov (Primary)
- security-advisories@github.com (Secondary)
References for CVE-2021-21289
-
https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7
Release 2.7.7 / 2021-02-01 · sparklemotion/mechanize · GitHubRelease Notes;Third Party Advisory
-
https://rubygems.org/gems/mechanize/
mechanize | RubyGems.org | your community gem hostProduct;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/
[SECURITY] Fedora 33 Update: rubygem-mechanize-2.7.7-1.fc33 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g
Command Injection Vulnerability · Advisory · sparklemotion/mechanize · GitHubThird Party Advisory
-
https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0
Merge pull request #548 from kyoshidajp/fix_command_injection · sparklemotion/mechanize@66a6a1b · GitHubPatch;Third Party Advisory
-
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/
[SECURITY] Fedora 32 Update: rubygem-mechanize-2.7.7-1.fc32 - package-announce - Fedora Mailing-ListsMailing List;Third Party Advisory
-
https://lists.debian.org/debian-lts-announce/2021/02/msg00021.html
[SECURITY] [DLA 2561-1] ruby-mechanize security updateMailing List;Third Party Advisory
-
https://security.gentoo.org/glsa/202107-17
Mechanize: Command injection (GLSA 202107-17) — Gentoo securityThird Party Advisory
Jump to