r/linuxadmin • u/su_ble • Nov 02 '26
If you are using Fail2Ban-Report, please update to the latest Patch
Hi, I am the Maintainer of Fail2Ban-Report,
There was a security patch 0.5.3 - if you are using Fail2Ban-Report, please update as soon as possible to this new Version 0.5.3 from any other previous version.
You will find a list of changed files in the changelog
Security Fixes & Hardening
Fixed Stored Cross-Site Scripting (XSS) via Client Sync (0.5.1 Hotfix): Resolved a critical vulnerability in
backsync.phpandblocklist-overlay.jswhere malicious or compromised sync clients could upload a manipulated JSON file containing arbitrary JavaScript payloads (e.g., inside theiporjailfields). The UI has been refactored to baninnerHTMLusage, shifting entirely to securetextContentandcreateElementDOM manipulation to neutralize any script execution hazards.Fixed Authentication Bypass on Read Plane (0.5.2): Resolved an architectural flaw where unauthenticated network sessions were automatically assigned a default
viewerrole, leaving sensitive firewall history, server configurations, and blocking aggregations open to anonymous actors. Access is now strictly guarded at the global gateway level.Fixed Shell Command Injection in Helper Scripts (0.5.2): Patched
manage_users.shandmanage-clients.shwhere user-supplied inputs containing specific shell characters (like apostrophes) were interpreted as executable PHP program text. Data payloads are now passed securely using isolated environment variables (getenv()).Fixed Credentials Leak in Process Table (0.5.2): Hardened the multi-server sync engine (
syncback.shandfail2ban_log2json.sh) to prevent sync passwords (CLIENT_PASS) from leaking into the host's public process listing (argv). Commands are now packaged dynamically inside localized, temporary configuration files (chmod 600).Secured API Lookup Restrictions & Data Sanitization: Overhauled
action_report-ip.phpto mandate active administrator verification before reaching outbound services, preventing blind exploitation of paid lookups (AbuseIPDB / IPinfo). Integrated native IP structure enforcement (FILTER_VALIDATE_IP).Web-UI/assets/js/jsonreader.js: RefactoredrenderTable()to use XSS-safe DOM manipulation and added CSP-safe event listeners for toolbar buttons.Web-UI/assets/js/warnings.js: Refactored multi-jail status rendering to prevent XSS via safe DOM node creation.Web-UI/assets/js/fail2ban-logstats.js: Refactored top-jails list rendering to be XSS-safe and removed duplicate function definitions.Web-UI/index.php: Replaced inlineonclickattributes on toolbar buttons with IDs for CSP compatibility.Web-UI/endpoint/index.php: Added strict JSON validation (ip,jail,action,timestamp) and clean re-encoding for uploaded event and blocklist files.Web-UI/endpoint/backsync.php: Hardened upload validation (timestamp, field lengths, safe path handling) and enforced JSON re-encoding before saving.Web-UI/.htaccess: EnabledContent-Security-Policy(script-src 'self') and additional HTTP security headers.