You are here

U-157: Ruby Mail Gem Directory Traversal and Shell Command Injection Vulnerabilities

April 27, 2012 - 7:00am

Addthis

PROBLEM:

Ruby Mail Gem Directory Traversal and Shell Command Injection Vulnerabilities

PLATFORM:

Mail gem for Ruby 2.x

ABSTRACT:

Some vulnerabilities have been reported in the Mail gem for Ruby, which can be exploited by malicious people to manipulate certain data and compromise a vulnerable system.

Reference Links:

Secunia Advisory SA48970
CVE-2012-2139
CVE-2012-2140

IMPACT ASSESSMENT:

Medium

Discussion:

Input passed via the "to" parameter within the file delivery method is not properly verified before being used and can be exploited to modify arbitrary files via directory traversal attacks. Certain input passed to the sendmail and exim delivery methods is not properly sanitised before being used as a command line argument and can be exploited to inject arbitrary shell commands.

Impact:

Successful exploitation of this vulnerability may allow execution of arbitrary code, but requires an application using the gem to accept untrusted input.

Solution:

The vendor has issued and update version 2.4.4.

Addthis