Ruby on Rails contains a vulnerability that could allow an unauthenticated, remote attacker to execute arbitrary code.
The vulnerability is due to improper implementation of parameter-parsing code in the affected software. An unauthenticated, remote attacker could exploit the vulnerability by submitting crafted XML or YAML (YAML Ain't Markup Language) parameters to the affected software. A successful exploit could allow the attacker to execute arbitrary code in the security context of the vulnerable application. If the vulnerable application holds elevated privileges, the attacker could completely compromise the targeted system.
Functional code that exploits this vulnerability is publicly available as part of the Metasploit Framework.
Ruby on Rails has confirmed the vulnerability in a security announcement and released software updates.
Indicators of Compromise
Ruby on Rails versions prior to 3.2.11, 3.1.10, 3.0.19, and 2.3.15 are vulnerable.
The vulnerability is due to insufficient validation and sanitization of user-supplied input to the parameter-parsing code in the affected software. The vulnerable code could allow a Ruby on Rails application to automatically cast values from strings to certain data types. The type casting code improperly supports certain conversions on user-supplied data which could result in symbol creation and YAML parsing.
An unauthenticated, remote attacker could exploit the vulnerability by submitting crafted parameters to the Ruby on Rails XML request processor. A successful exploit could allow the attacker to instantiate a remote object, which could execute arbitrary Ruby code in the security context of the vulnerable application. If the vulnerable application holds elevated privileges, the attacker could completely compromise the targeted system. Additionally, the attacker may be able to bypass authentication systems, inject arbitrary SQL or cause a targeted application to terminate abnormally, resulting in a denial of service (DoS) condition for legitimate users.
To exploit the vulnerability, the attacker must submit malicious requests to the system. In a typical network configuration, the attacker must have access to trusted, internal networks to submit malicious requests to the system. This access requirement could reduce the likelihood of a successful exploit.
Ruby on Rails reports there is no fix for YAML object injection.Administrators are advised to immediately disable YAML parameter parsing if it has been enabled.
Due to the widespread deployment and usage of Ruby on Rails and the public availability of functional exploit code, Administrators are advised to upgrade or patch affected systems immediately.
Event data from Cisco has detected intrusion prevention system signature activity related to this vulnerability. This activity on May 24th, 2013, could indicate increased attempts to exploit the vulnerability in Ruby on Rails.
Administrators are advised to apply the appropriate updates.
Administrators may consider disabling XML parsing in the vulnerable applications.
Administrators may consider removing YAML and Symbol support from the XML parser if XML parsing functionality is required.
Administrators are advised to immediately disable YAML parameter parsing if it has been enabled. Ruby on Rails reports there is no fix for YAML object injection.
Administrators are advised to monitor affected systems.
Ruby on Rails has released a security announcement and a release announcement at the following links:
THIS DOCUMENT IS PROVIDED ON AN "AS IS" BASIS AND DOES NOT IMPLY ANY KIND OF GUARANTEE OR WARRANTY, INCLUDING THE WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR USE. YOUR USE OF THE INFORMATION ON THE DOCUMENT OR MATERIALS LINKED FROM
THE DOCUMENT IS AT YOUR OWN RISK. CISCO RESERVES THE RIGHT TO CHANGE OR UPDATE ALERTS AT ANY TIME.
A standalone copy or paraphrase of the text of this document that omits the distribution URL is an uncontrolled copy and may lack important information or contain factual errors. The information in this document is intended for end users of Cisco products
Cisco Multivendor Vulnerability Alerts respond to vulnerabilities identified in third-party vendors' products. These alerts contain information compiled from diverse sources and provide comprehensive technical descriptions, objective analytical assessments, workarounds and practical safeguards, and links to vendor advisories and patches.