Bug 1924219 (CVE-2021-21289) - CVE-2021-21289 rubygem-mechanize: OS command injection via untrusted input to Ruby's Kernel.open method
Summary: CVE-2021-21289 rubygem-mechanize: OS command injection via untrusted input to...
Keywords:
Status: CLOSED WONTFIX
Alias: CVE-2021-21289
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1924220
Blocks: 1924221
TreeView+ depends on / blocked
 
Reported: 2021-02-02 20:09 UTC by Guilherme de Almeida Suckevicz
Modified: 2021-10-28 11:08 UTC (History)
2 users (show)

Fixed In Version: Mechanize 2.7.7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-28 11:08:32 UTC
Embargoed:


Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-02-02 20:09:14 UTC
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.

Reference:
https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g

Comment 1 Guilherme de Almeida Suckevicz 2021-02-02 20:09:30 UTC
Created rubygem-mechanize tracking bugs for this issue:

Affects: fedora-all [bug 1924220]


Note You need to log in before you can comment on or make changes to this bug.