CVE-2021-21289
published 2021-02-02CVE-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…
PriorityP348high8.3CVSS 3.1
AVNACHPRNUIRSCCHIHAH
EPSS
3.51%
88.0th percentile
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.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | ruby-mechanize | < ruby-mechanize 2.7.7-1 (bookworm) | ruby-mechanize 2.7.7-1 (bookworm) |
| fedoraproject | fedora | — | — |
| fedoraproject | fedora | — | — |
| mechanize_project | mechanize | >= 2.0 < 2.7.7 | 2.7.7 |
| mechanize_project | mechanize | >= 2.0.0 < 2.7.7 | 2.7.7 |
| sparklemotion | mechanize | — | — |
CVSS provenance
nvdv3.18.3HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
nvdv2.07.6HIGHAV:N/AC:H/Au:N/C:C/I:C/A:C
osv8.3HIGH
vendor_debian7.4HIGH
vendor_redhat7.4HIGH
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
OSV
CVE-2021-21289: Mechanize is an open-source ruby library that makes automated web interaction easy
osv·2021-02-02·CVSS 8.3
CVE-2021-21289 [HIGH] CVE-2021-21289: Mechanize is an open-source ruby library that makes automated web interaction easy
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.
GHSA
Command Injection Vulnerability in Mechanize
ghsa·2021-02-02
CVE-2021-21289 [HIGH] CWE-78 Command Injection Vulnerability in Mechanize
Command Injection Vulnerability in Mechanize
This security advisory has been created for public disclosure of a Command Injection vulnerability that was responsibly reported by @kyoshidajp (Katsuhiko YOSHIDA).
### Impact
Mechanize `>= v2.0`, `< v2.7.7` allows 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`: since v2.0 (see 208e3ed)
- `Mechanize::CookieJar#save_as`: since v2.0 (see 5b776a4)
- `Mechanize#download`: since v2.2 (see dc91667)
- `Mechanize::Download#save` and `#save!` since v2.1 (see 98b2f51, bd62ff0)
- `Mechanize::File#save` and `#save_as`: since v2.1 (see 2bf7519)
- `Mech
OSV
Command Injection Vulnerability in Mechanize
osv·2021-02-02
CVE-2021-21289 [HIGH] Command Injection Vulnerability in Mechanize
Command Injection Vulnerability in Mechanize
This security advisory has been created for public disclosure of a Command Injection vulnerability that was responsibly reported by @kyoshidajp (Katsuhiko YOSHIDA).
### Impact
Mechanize `>= v2.0`, `< v2.7.7` allows 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`: since v2.0 (see 208e3ed)
- `Mechanize::CookieJar#save_as`: since v2.0 (see 5b776a4)
- `Mechanize#download`: since v2.2 (see dc91667)
- `Mechanize::Download#save` and `#save!` since v2.1 (see 98b2f51, bd62ff0)
- `Mechanize::File#save` and `#save_as`: since v2.1 (see 2bf7519)
- `Mech
Red Hat
rubygem-mechanize: OS command injection via untrusted input to Ruby's Kernel.open method
vendor_redhat·2021-02-01·CVSS 7.4
CVE-2021-21289 [HIGH] CWE-78 rubygem-mechanize: OS command injection via untrusted input to Ruby's Kernel.open method
rubygem-mechanize: OS command injection via untrusted input to Ruby's Kernel.open method
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.
Package: mechanize (Red Hat 3scale API Management Platform 2) - Will n
Debian
CVE-2021-21289: ruby-mechanize - Mechanize is an open-source ruby library that makes automated web interaction ea...
vendor_debian·2021·CVSS 7.4
CVE-2021-21289 [HIGH] CVE-2021-21289: ruby-mechanize - Mechanize is an open-source ruby library that makes automated web interaction ea...
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.
Scope: local
bookworm: resolved (fixed in 2.7.7-1)
bullseye: resolved (fixed in 2.7.7-1)
forky: resolved (fixed in 2.7.7-1)
sid: resolved (fixed in 2.7.7-1)
trix
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8ghttps://lists.debian.org/debian-lts-announce/2021/02/msg00021.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/https://rubygems.org/gems/mechanize/https://security.gentoo.org/glsa/202107-17https://github.com/sparklemotion/mechanize/commit/66a6a1bfa653a5f13274a396a5e5441238656aa0https://github.com/sparklemotion/mechanize/releases/tag/v2.7.7https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8ghttps://lists.debian.org/debian-lts-announce/2021/02/msg00021.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/LBVVJUL4P4KCJH4IQTHFZ4ATXY7XXZPV/https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNFZ7ROYS6V4J5L5PRAJUG2AWC7VXR2V/https://rubygems.org/gems/mechanize/https://security.gentoo.org/glsa/202107-17
2021-02-02
Published