CVE-2024-46995
📋 TL;DR
baserCMS versions before 5.1.2 contain a cross-site scripting (XSS) vulnerability in HTTP 400 Bad Request handling. This allows attackers to inject malicious scripts that execute in users' browsers when they encounter a crafted bad request. All baserCMS installations using vulnerable versions are affected.
💻 Affected Systems
- baserCMS
📦 What is this software?
Basercms by Basercms
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, perform actions as authenticated users, deface websites, or redirect users to malicious sites.
Likely Case
Attackers inject malicious scripts to steal user session data or credentials when users encounter crafted bad requests.
If Mitigated
With proper input validation and output encoding, malicious scripts would be neutralized before execution.
🎯 Exploit Status
XSS vulnerabilities typically have low exploitation complexity, though specific details of this vulnerability are not publicly documented.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 5.1.2
Vendor Advisory: https://github.com/baserproject/basercms/security/advisories/GHSA-mr7q-fv7j-jcgv
Restart Required: Yes
Instructions:
1. Backup your baserCMS installation and database. 2. Download baserCMS 5.1.2 from the official repository. 3. Replace existing files with the new version. 4. Clear any caching mechanisms. 5. Restart your web server.
🔧 Temporary Workarounds
Input Validation Filter
allImplement server-side input validation to sanitize all user inputs before processing HTTP 400 responses.
Content Security Policy
allImplement a strict Content Security Policy header to restrict script execution sources.
Add to web server config: Content-Security-Policy: default-src 'self'; script-src 'self'
🧯 If You Can't Patch
- Implement a Web Application Firewall (WAF) with XSS protection rules.
- Disable or restrict access to the vulnerable component if possible.
🔍 How to Verify
Check if Vulnerable:
Check your baserCMS version in the admin panel or by examining the application files.
Check Version:
Check baserCMS admin dashboard or examine /baser/config/version.php file
Verify Fix Applied:
Confirm version is 5.1.2 or later in the admin panel or by checking the application files.
📡 Detection & Monitoring
Log Indicators:
- Unusual HTTP 400 requests with script tags or JavaScript code in parameters
- Multiple failed requests from single IPs with suspicious payloads
Network Indicators:
- HTTP requests containing script tags or JavaScript in query parameters triggering 400 responses
SIEM Query:
source="web_server_logs" AND (status=400 AND (uri="*<script*" OR uri="*javascript:*"))