J-Security Center

Title: Fail2Ban Remote Denial of Service Vulnerability

Severity: HIGH

Description:

Fail2Ban is an application designed to monitor authentication-failure messages and block hosts that attempt brute-force attacks against network services.

The application is prone to a remote denial-of-service vulnerability because it fails to properly ensure the source of authentication failure messages for SSH connection attempts.

The application is designed to monitor log entries made by the network services when authentication failures occur. When failures are logged, the application adds the source IP address of attacking computers directly as a firewall rule or inserts the address into the '/etc/hosts.deny' file.

Due to a flaw in the regular expression used to parse SSH log files, attackers attempting to authenticate with usernames containing whitespace characters may add arbitrary IP addresses to firewall or '/etc/hosts.deny' file. User names similar to 'foo from 123.123.123.123' will result in the IP address 123.123.123.123 being denied further network access.

Successfully exploiting this issue allows remote attackers to add arbitrary IP addresses to the block list used by the application. This allows attackers to deny further network access to arbitrary IP addresses, denying service to legitimate users.

Fail2Ban 0.6.1 and prior versions are vulnerable to this issue.

Affected Products:

  • Cyril Jaquier Fail2Ban
  • Cyril Jaquier Fail2Ban 0.6.1
  • Gentoo net-analyzer/fail2ban 0.6.1

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.