CVE-2021-37197
📋 TL;DR
This vulnerability allows SQL injection attacks in Siemens COMOS web components, enabling attackers to execute arbitrary SQL statements. Affected systems include COMOS V10.2 (all versions with web components), V10.3 (versions below V10.3.3.3 with web components), and V10.4 (versions below V10.4.1 with web components).
💻 Affected Systems
- Siemens COMOS
📦 What is this software?
Comos by Siemens
Comos by Siemens
Comos by Siemens
⚠️ Risk & Real-World Impact
Worst Case
Complete database compromise including data theft, data manipulation, privilege escalation, and potential remote code execution through database functions.
Likely Case
Unauthorized data access, data exfiltration, and potential authentication bypass leading to unauthorized system access.
If Mitigated
Limited impact with proper input validation, parameterized queries, and network segmentation preventing database access.
🎯 Exploit Status
SQL injection vulnerabilities typically have low exploitation complexity. No public exploit code has been identified, but SQL injection techniques are well-documented and widely available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: COMOS V10.3.3.3, COMOS V10.4.1, or later versions
Vendor Advisory: https://cert-portal.siemens.com/productcert/pdf/ssa-995338.pdf
Restart Required: Yes
Instructions:
1. Download the appropriate patch from Siemens support portal. 2. Backup COMOS database and configuration. 3. Apply the patch following Siemens installation instructions. 4. Restart COMOS services. 5. Verify the patch was successfully applied.
🔧 Temporary Workarounds
Disable Web Components
windowsRemove or disable COMOS web components if they are not required for operations.
Follow Siemens documentation to disable web components in COMOS configuration
Network Segmentation
allRestrict network access to COMOS web interface using firewall rules.
Add firewall rules to restrict COMOS web port (typically 80/443) to trusted IP addresses only
🧯 If You Can't Patch
- Implement web application firewall (WAF) with SQL injection protection rules
- Enable database logging and monitoring for suspicious SQL queries
🔍 How to Verify
Check if Vulnerable:
Check COMOS version and verify if web components are installed. Versions V10.2 (any), V10.3 (<3.3.3), or V10.4 (<4.1) with web components are vulnerable.
Check Version:
Check COMOS version in administration console or via 'Help > About' in COMOS client
Verify Fix Applied:
Verify COMOS version is V10.3.3.3 or higher, or V10.4.1 or higher. Test web interface for SQL injection vulnerabilities using safe testing methods.
📡 Detection & Monitoring
Log Indicators:
- Unusual database queries from web interface
- SQL error messages in web server logs
- Multiple failed login attempts followed by successful access
Network Indicators:
- SQL injection patterns in HTTP requests to COMOS web interface
- Unusual database connections from web server
SIEM Query:
source="COMOS_Web_Logs" AND (message="SQL" OR message="syntax" OR message="union" OR message="select" OR message="insert")