CVE-2024-41356
📋 TL;DR
phpipam 1.6 contains a cross-site scripting vulnerability in the firewall zone network editing interface. This allows attackers to inject malicious scripts that execute in victims' browsers when they visit the vulnerable page. Administrators using phpipam 1.6 for network management are affected.
💻 Affected Systems
- phpipam
📦 What is this software?
Phpipam by Phpipam
⚠️ Risk & Real-World Impact
Worst Case
Administrator session hijacking leading to full application compromise, credential theft, or malware distribution to other users.
Likely Case
Session hijacking of authenticated users, defacement of the application interface, or credential harvesting.
If Mitigated
Limited to interface disruption if input validation and output encoding are properly implemented elsewhere.
🎯 Exploit Status
XSS vulnerabilities are commonly exploited with simple payloads, but this requires authenticated access to the specific interface.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Check GitHub issue #4146 for specific commit/fix version
Vendor Advisory: https://github.com/phpipam/phpipam/issues/4146
Restart Required: No
Instructions:
1. Check GitHub issue #4146 for the specific fix commit. 2. Apply the patch to app/admin/firewall-zones/zones-edit-network.php. 3. Verify proper input validation and output encoding are implemented.
🔧 Temporary Workarounds
Input Validation Filter
allImplement server-side input validation to sanitize user input in the affected file.
Edit app/admin/firewall-zones/zones-edit-network.php to add proper input sanitization
Content Security Policy
allImplement CSP headers to restrict script execution sources.
Add Content-Security-Policy header to web server configuration
🧯 If You Can't Patch
- Restrict access to the firewall zones interface to only necessary administrators
- Implement web application firewall rules to detect and block XSS payloads
🔍 How to Verify
Check if Vulnerable:
Check if running phpipam version 1.6 and review zones-edit-network.php for lack of input sanitization.
Check Version:
Check phpipam version in web interface or configuration files
Verify Fix Applied:
Test the firewall zones editing interface with XSS payloads to ensure they are properly sanitized.
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to zones-edit-network.php with script tags or JavaScript code
- Multiple failed authentication attempts followed by access to firewall zones
Network Indicators:
- HTTP requests containing script tags or JavaScript in parameters to the vulnerable endpoint
SIEM Query:
web.url:*/zones-edit-network.php AND (http.method:POST AND (web.param:*<script* OR web.param:*javascript:*))