Vulnerabilities > CVE-2015-9097 - CRLF Injection vulnerability in Mail Project Mail
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
LOW Integrity impact
LOW Availability impact
NONE Summary
The mail gem before 2.5.5 for Ruby (aka A Really Ruby Mail Library) is vulnerable to SMTP command injection via CRLF sequences in a RCPT TO or MAIL FROM command, as demonstrated by CRLF sequences immediately before and after a DATA substring.
Vulnerable Configurations
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Command Delimiters An attack of this type exploits a programs' vulnerabilities that allows an attacker's commands to be concatenated onto a legitimate command with the intent of targeting other resources such as the file system or database. The system that uses a filter or a blacklist input validation, as opposed to whitelist validation is vulnerable to an attacker who predicts delimiters (or combinations of delimiters) not present in the filter or blacklist. As with other injection attacks, the attacker uses the command delimiter payload as an entry point to tunnel through the application and activate additional attacks through SQL queries, shell commands, network scanning, and so on.
- Web Logs Tampering Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to "Log Injection-Tampering-Forging" except that in this case, the attack is targeting the logs of the web server and not the application.
References
- http://openwall.com/lists/oss-security/2015/12/11/3
- http://openwall.com/lists/oss-security/2015/12/11/3
- http://www.mbsd.jp/Whitepaper/smtpi.pdf
- http://www.mbsd.jp/Whitepaper/smtpi.pdf
- https://github.com/mikel/mail/commit/72befdc4dab3e6e288ce226a7da2aa474cf5be83
- https://github.com/mikel/mail/commit/72befdc4dab3e6e288ce226a7da2aa474cf5be83
- https://github.com/mikel/mail/pull/1097
- https://github.com/mikel/mail/pull/1097
- https://github.com/rubysec/ruby-advisory-db/issues/215
- https://github.com/rubysec/ruby-advisory-db/issues/215
- https://hackerone.com/reports/137631
- https://hackerone.com/reports/137631
- https://rubysec.com/advisories/mail-OSVDB-131677
- https://rubysec.com/advisories/mail-OSVDB-131677