Vulnerabilities > CVE-2015-3224 - Improper Access Control vulnerability in Rubyonrails web Console 2.1.2
Attack vector
NETWORK Attack complexity
MEDIUM Privileges required
NONE Confidentiality impact
NONE Integrity impact
PARTIAL Availability impact
NONE Summary
request.rb in Web Console before 2.1.3, as used with Ruby on Rails 3.x and 4.x, does not properly restrict the use of X-Forwarded-For headers in determining a client's IP address, which allows remote attackers to bypass the whitelisted_ips protection mechanism via a crafted request.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 1 |
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Embedding Scripts within Scripts An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
- Signature Spoofing by Key Theft An attacker obtains an authoritative or reputable signer's private signature key by theft and then uses this key to forge signatures from the original signer to mislead a victim into performing actions that benefit the attacker.
Exploit-Db
id | EDB-ID:41689 |
last seen | 2018-11-30 |
modified | 2015-06-16 |
published | 2015-06-16 |
reporter | Exploit-DB |
source | https://www.exploit-db.com/download/41689 |
title | Ruby on Rails 4.0.x/4.1.x/4.2.x (Web Console v2) - Whitelist Bypass Code Execution (Metasploit) |
Metasploit
description | This module exploits an IP whitelist bypass vulnerability in the developer web console included with Ruby on Rails 4.0.x and 4.1.x. This module will also achieve code execution on Rails 4.2.x if the attack is launched from a whitelisted IP range. |
id | MSF:EXPLOIT/MULTI/HTTP/RAILS_WEB_CONSOLE_V2_CODE_EXEC |
last seen | 2020-06-10 |
modified | 2017-07-24 |
published | 2016-05-02 |
references | |
reporter | Rapid7 |
source | https://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/multi/http/rails_web_console_v2_code_exec.rb |
title | Ruby on Rails Web Console (v2) Whitelist Bypass Code Execution |
Nessus
NASL family Fedora Local Security Checks NASL id FEDORA_2015-10128.NASL description Security fix for CVE-2015-3224. Please note that since the security fix was not really backportable, I opted in for rebase. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-06-05 modified 2015-06-30 plugin id 84452 published 2015-06-30 reporter This script is Copyright (C) 2015-2020 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/84452 title Fedora 22 : rubygem-web-console-2.1.3-1.fc22 (2015-10128) NASL family FreeBSD Local Security Checks NASL id FREEBSD_PKG_EB8A89788DD549CE87F449667B2166DD.NASL description Ruby on Rails blog : Rails 3.2.22, 4.1.11 and 4.2.2 have been released, along with web console and jquery-rails plugins and Rack 1.5.4 and 1.6.2. last seen 2020-06-01 modified 2020-06-02 plugin id 84255 published 2015-06-18 reporter This script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/84255 title FreeBSD : rubygem-rails -- multiple vulnerabilities (eb8a8978-8dd5-49ce-87f4-49667b2166dd)
Seebug
bulletinFamily | exploit |
description | IP whitelist bypass in Web Console There is a remote code execution vulnerability in Web Console. This vulnerability has been assigned the CVE identifier CVE-2015-3224. Versions Affected: All Not affected: Environments inaccessible from remote IPs, or without Web Console enabled Fixed Versions: 2.1.3 ### Impact Specially crafted remote requests can spoof their origin, bypassing the IP whitelist, in any environment where Web Console is enabled (development and test, by default). Users whose application is only accessible from localhost (as is the default behaviour in Rails 4.2) are not affected, unless a local proxy is involved. All affected users should either upgrade or use one of the work arounds immediately. ### Releases The 2.1.3 release is available at the normal locations. ### Workarounds To work around this issue, turn off web-console in all environments, by removing/commenting it from the application's Gemfile. ### Credits This vulnerability was reported by both joernchen of Phenoelit and Ben Murphy. Thanks to each of them for reporting the issue to us and verifying the fix. ### 参考 * https://groups.google.com/forum/#!topic/rubyonrails-security/lzmz9_ijUFw |
id | SSV:90640 |
last seen | 2017-11-19 |
modified | 2016-01-27 |
published | 2016-01-27 |
reporter | Root |
title | Ruby on Rails Web Console IP 白名单安全模式绕过 |
References
- http://lists.fedoraproject.org/pipermail/package-announce/2015-June/160881.html
- http://openwall.com/lists/oss-security/2015/06/16/18
- http://www.securityfocus.com/bid/75237
- https://github.com/rails/web-console/blob/master/CHANGELOG.markdown
- https://groups.google.com/forum/message/raw?msg=rubyonrails-security/lzmz9_ijUFw/HBMPi4zp5NAJ