CVE-2025-45311

8.8 HIGH

📋 TL;DR

This CVE describes a privilege escalation vulnerability in fail2ban-client v0.11.2 where users with limited sudo privileges can execute arbitrary commands as root. The vulnerability is disputed because fail2ban's intended functionality allows root operations for triggered rules. Systems using fail2ban with sudo configurations granting limited fail2ban-client access are affected.

💻 Affected Systems

Products:
  • fail2ban
Versions: v0.11.2 (specifically mentioned), potentially other versions with similar sudo configurations
Operating Systems: Linux, Unix-like systems
Default Config Vulnerable: ✅ No
Notes: Requires sudo configuration granting users access to fail2ban-client. Not vulnerable in default installations without custom sudo rules.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers with sudo access to fail2ban-client could execute arbitrary commands as root, leading to complete system compromise, data theft, or persistent backdoors.

🟠

Likely Case

Privileged users with sudo fail2ban-client access could abuse legitimate functionality to perform unauthorized root operations.

🟢

If Mitigated

With proper sudo restrictions and monitoring, impact is limited to authorized administrative actions within fail2ban's intended scope.

🌐 Internet-Facing: LOW - Exploitation requires existing local user access with sudo privileges.
🏢 Internal Only: MEDIUM - Internal users with sudo fail2ban-client access could escalate privileges.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires existing sudo privileges for fail2ban-client. Public discussion and technical details available in references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: N/A

Vendor Advisory: https://github.com/fail2ban/fail2ban/issues/4110

Restart Required: No

Instructions:

No official patch as this is disputed behavior. Review and restrict sudo configurations instead.

🔧 Temporary Workarounds

Restrict sudo fail2ban-client access

linux

Limit sudo permissions for fail2ban-client to specific commands or remove unnecessary sudo access

sudo visudo
# Review and modify /etc/sudoers to restrict fail2ban-client commands

Implement sudo command restrictions

linux

Use sudo command whitelisting to prevent arbitrary command execution

# Example: user ALL=(root) NOPASSWD: /usr/bin/fail2ban-client status
# Avoid: user ALL=(root) NOPASSWD: /usr/bin/fail2ban-client

🧯 If You Can't Patch

  • Review all sudo configurations granting fail2ban-client access and restrict to minimum necessary commands
  • Implement strict monitoring and logging of sudo fail2ban-client executions

🔍 How to Verify

Check if Vulnerable:

Check sudoers file for fail2ban-client permissions: sudo grep -r fail2ban-client /etc/sudoers*

Check Version:

fail2ban-client --version

Verify Fix Applied:

Verify sudo configurations restrict fail2ban-client to specific commands only

📡 Detection & Monitoring

Log Indicators:

  • Unusual fail2ban-client executions in sudo logs
  • Multiple fail2ban-client commands from non-admin users

Network Indicators:

  • N/A - local privilege escalation

SIEM Query:

source="sudo" AND "fail2ban-client" AND NOT user IN ("admin1", "admin2")

🔗 References

📤 Share & Export