CVE-2021-46389
📋 TL;DR
CVE-2021-46389 is an integer overflow vulnerability in IIPImage High Resolution Streaming Image Server that allows remote attackers to cause a denial of service or potentially execute arbitrary code by sending malformed HTTP query parameters. This affects all deployments running IIPImage iipsrv.fcgi prior to commit 882925b295a80ec992063deffc2a3b0d803c3195. Organizations using IIPImage for streaming high-resolution images are at risk.
💻 Affected Systems
- IIPImage High Resolution Streaming Image Server
📦 What is this software?
High Resolution Streaming Image Server by High Resolution Streaming Image Server Project
View all CVEs affecting High Resolution Streaming Image Server →
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or installation of persistent backdoors.
Likely Case
Denial of service causing the IIPImage server to crash, disrupting image streaming services.
If Mitigated
Limited impact with proper network segmentation and WAF filtering of malformed requests.
🎯 Exploit Status
The vulnerability requires sending malformed HTTP query parameters, which is relatively straightforward for attackers with knowledge of the flaw.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Commit 882925b295a80ec992063deffc2a3b0d803c3195 or later
Vendor Advisory: https://github.com/ruven/iipsrv/commit/882925b295a80ec992063deffc2a3b0d803c3195
Restart Required: Yes
Instructions:
1. Pull the latest code from the IIPImage GitHub repository
2. Apply commit 882925b295a80ec992063deffc2a3b0d803c3195 or later
3. Recompile and reinstall iipsrv.fcgi
4. Restart the IIPImage service
🔧 Temporary Workarounds
Web Application Firewall (WAF) Filtering
allConfigure WAF rules to block malformed HTTP query parameters targeting IIPImage endpoints
Network Segmentation
allRestrict access to IIPImage servers to only trusted internal networks
🧯 If You Can't Patch
- Deploy a reverse proxy with request validation to filter malicious queries before they reach IIPImage
- Implement strict network access controls to limit which systems can communicate with the IIPImage server
🔍 How to Verify
Check if Vulnerable:
Check the git commit hash of your IIPImage installation. If it's earlier than 882925b295a80ec992063deffc2a3b0d803c3195, you are vulnerable.
Check Version:
cd /path/to/iipsrv && git log --oneline -1
Verify Fix Applied:
Verify that the installed version includes commit 882925b295a80ec992063deffc2a3b0d803c3195 or later by checking git log.
📡 Detection & Monitoring
Log Indicators:
- Unusual HTTP query parameters in access logs
- Server crashes or abnormal termination of iipsrv.fcgi processes
- Error messages related to integer overflow or memory corruption
Network Indicators:
- HTTP requests with unusually long or malformed query strings to IIPImage endpoints
- Multiple rapid requests with varying query parameters
SIEM Query:
source="iipsrv_access.log" AND (uri_path="/iipsrv.fcgi" OR uri_path="/iipsrv") AND query_string MATCHES "[^&]*=[^&]*[^\d\w\-_.~%]"
🔗 References
- https://github.com/ruven/iipsrv/commit/4ed59265fbbd636dc2fbbf325f8ea37ed300a6d9
- https://github.com/ruven/iipsrv/commit/882925b295a80ec992063deffc2a3b0d803c3195
- https://github.com/ruven/iipsrv/commit/4ed59265fbbd636dc2fbbf325f8ea37ed300a6d9
- https://github.com/ruven/iipsrv/commit/882925b295a80ec992063deffc2a3b0d803c3195