Vulnerabilities > CVE-2015-3224 - Improper Access Control vulnerability in Rubyonrails web Console 2.1.2

047910
CVSS 4.3 - MEDIUM
Attack vector
NETWORK
Attack complexity
MEDIUM
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
NONE
network
rubyonrails
CWE-284
nessus
exploit available
metasploit

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
Rubyonrails
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

idEDB-ID:41689
last seen2018-11-30
modified2015-06-16
published2015-06-16
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/41689
titleRuby on Rails 4.0.x/4.1.x/4.2.x (Web Console v2) - Whitelist Bypass Code Execution (Metasploit)

Metasploit

descriptionThis 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.
idMSF:EXPLOIT/MULTI/HTTP/RAILS_WEB_CONSOLE_V2_CODE_EXEC
last seen2020-06-10
modified2017-07-24
published2016-05-02
references
reporterRapid7
sourcehttps://github.com/rapid7/metasploit-framework/blob/master//modules/exploits/multi/http/rails_web_console_v2_code_exec.rb
titleRuby on Rails Web Console (v2) Whitelist Bypass Code Execution

Nessus

  • NASL familyFedora Local Security Checks
    NASL idFEDORA_2015-10128.NASL
    descriptionSecurity 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 seen2020-06-05
    modified2015-06-30
    plugin id84452
    published2015-06-30
    reporterThis script is Copyright (C) 2015-2020 Tenable Network Security, Inc.
    sourcehttps://www.tenable.com/plugins/nessus/84452
    titleFedora 22 : rubygem-web-console-2.1.3-1.fc22 (2015-10128)
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_EB8A89788DD549CE87F449667B2166DD.NASL
    descriptionRuby 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 seen2020-06-01
    modified2020-06-02
    plugin id84255
    published2015-06-18
    reporterThis script is Copyright (C) 2015-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/84255
    titleFreeBSD : rubygem-rails -- multiple vulnerabilities (eb8a8978-8dd5-49ce-87f4-49667b2166dd)

Seebug

bulletinFamilyexploit
descriptionIP 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
idSSV:90640
last seen2017-11-19
modified2016-01-27
published2016-01-27
reporterRoot
titleRuby on Rails Web Console IP 白名单安全模式绕过