CVE-2021-46416
📋 TL;DR
This vulnerability allows unauthorized user groups to access restricted functionality in SMA SUNNY TRIPOWER 5.0 inverters due to insecure cookie handling. Attackers can manipulate cookie values to bypass authorization checks and gain elevated privileges. This affects all systems running the vulnerable firmware version.
💻 Affected Systems
- SMA SUNNY TRIPOWER 5.0
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of inverter control systems allowing attackers to modify power generation settings, disrupt operations, or cause physical damage to equipment.
Likely Case
Unauthorized access to monitoring data, configuration settings, and limited control functions by attackers with network access.
If Mitigated
Limited information disclosure or minor configuration changes if proper network segmentation and access controls are implemented.
🎯 Exploit Status
Exploitation requires network access to the inverter's web interface and basic knowledge of cookie manipulation. Public proof-of-concept demonstrates the vulnerability.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check SMA Security Advisory for latest patched version
Vendor Advisory: https://www.sma.de/en/products/solarinverters/sunny-tripower-30-40-50-60.html
Restart Required: Yes
Instructions:
1. Check current firmware version. 2. Download latest firmware from SMA portal. 3. Upload firmware to inverter via web interface. 4. Reboot inverter to apply update.
🔧 Temporary Workarounds
Network Segmentation
allIsolate inverter management interfaces from untrusted networks
Access Control Lists
allRestrict network access to inverter management interfaces to authorized IP addresses only
🧯 If You Can't Patch
- Implement strict network segmentation to isolate inverters from untrusted networks
- Deploy web application firewall rules to detect and block cookie manipulation attempts
🔍 How to Verify
Check if Vulnerable:
Check firmware version in inverter web interface under System Information. If version is 3.10.16.R, system is vulnerable.
Check Version:
Access inverter web interface and navigate to System > Information to view firmware version
Verify Fix Applied:
Verify firmware version has been updated to a version later than 3.10.16.R. Test authentication bypass attempts should fail.
📡 Detection & Monitoring
Log Indicators:
- Multiple failed authentication attempts followed by successful access with unusual user IDs
- Access to restricted URLs without proper authentication logs
Network Indicators:
- HTTP requests with manipulated cookie values
- Unusual access patterns to inverter management interface
SIEM Query:
source="inverter_web_logs" AND (cookie="userid=*" OR url="/admin/*") AND NOT auth_success="true"
🔗 References
- http://packetstormsecurity.com/files/166670/SAM-SUNNY-TRIPOWER-5.0-Insecure-Direct-Object-Reference.html
- https://drive.google.com/drive/folders/1BPULhDC_g__seH_VnQlVtkrKdOLkXdzV?usp=sharing
- https://www.sma.de/en/products/solarinverters/sunny-tripower-30-40-50-60.html
- http://packetstormsecurity.com/files/166670/SAM-SUNNY-TRIPOWER-5.0-Insecure-Direct-Object-Reference.html
- https://drive.google.com/drive/folders/1BPULhDC_g__seH_VnQlVtkrKdOLkXdzV?usp=sharing
- https://www.sma.de/en/products/solarinverters/sunny-tripower-30-40-50-60.html