CVE-2021-21289: high-severity vulnerability in sparklemotion mechanize
Command Injection Vulnerability in Mechanize
Published · Updated
E-mail alert when it lands in KEV, gets a public PoC or its score goes up.
No sign of exploitation. No public exploitation artifact known so far.
Mechanize, a Ruby library for web automation, has a vulnerability where attackers can run system commands if untrusted file names are used with certain file-saving functions. This happens because the library doesn't properly validate file paths before opening them.
Command injection vulnerability (CWE-78) in Mechanize versions 2.0.0–2.7.6 exploitable via unsafe handling of file paths in Kernel.open calls across CookieJar#load, CookieJar#save_as, download, Download#save, File#save, and FileResponse#read_body methods. Attack vector requires attacker-controlled filename input; impact includes arbitrary OS command execution with application privileges.
In the same product, most dangerous first.