CVE-2026-109786

Arbitrary IP Banning via Username Injection in fail2ban SSHD Filter

Published Oct 13, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
In fail2ban 0.10.5 through 1.1.1 before ddd879d, the sshd filter (config/filter.d/sshd.conf) accepts an "on <token>" suffix after the host address. Because OpenSSH logs the offered username verbatim, a remote unauthenticated attacker can use a username such as "x VICTIM-SOURCE-IP-ADDRESS on" to make fail2ban associate failed login attempts with an arbitrary source IP address and ban it (e.g., to block logins from a legitimate user). The default filter mode is affected.

Analysis

AI-generated

Technical impact

The flaw resides in fail2ban’s SSHD filter configuration, which allows an injected 'on <token>' suffix after the host address field in the username portion of OpenSSH log messages. By submitting an SSH login attempt with a crafted username such as 'x VICTIM-SOURCE-IP-ADDRESS on', an unauthenticated attacker can cause fail2ban to associate failed login attempts with an arbitrary source IP address, leading the service to ban that address. This misattribution results in denial of service for legitimate users and is catalogued as an input handling weakness (CWE‑117).

Affected Systems

The vulnerability affects fail2ban versions 0.10.5 through 1.1.1 that do not include the upstream commit ddd879d22664904ace24e1255ac6571808c58187. All releases in that range, regardless of the SSHD filter mode, are susceptible. The issue is present in the default SSHD filter mode and all affected releases up to 1.1.1 that lack the patch.

Risk and Exploitability

The nominal CVSS score of 5.3 indicates moderate severity. No EPSS score is provided, so the likelihood of exploitation remains uncertain. The vulnerability is not listed in the CISA KEV catalog. An attacker can trigger the flaw remotely by sending loggable SSH login attempts that contain the malicious username, requiring only network access to the SSH port. The exploit does not require elevated privileges or physical access, and the attack vector is straightforward via normal SSH traffic.

Remediation

Vendor Solution

Apply upstream commit ddd879d22664904ace24e1255ac6571808c58187, or upgrade to the first fail2ban release after 1.1.1 that contains it.


Vendor Workaround

Override __on_port_opt and __suff in a local filter.d/sshd.local so that only an optional "port N" may follow the host address, as in the upstream fix: __on_port_opt = (?: port \d+)? and __suff = %(__on_port_opt)s(?: \[preauth\])?\s*. Add the administrator's own addresses to ignoreip.


OpenCVE Recommended Actions

  • Apply the upstream commit ddd879d22664904ace24e1255ac6571808c58187 or upgrade to a fail2ban release that contains the patch.
  • If an upgrade is not immediately possible, create a local filter override at filter.d/sshd.local with __on_port_opt = (?: port \d+)? and __suff = %(__on_port_opt)s(?: \[preauth\])?\s* , and add the administrator’s own IP addresses to the ignoreip list to mitigate the mis‑parsed usernames.
  • Set up monitoring to alert when a new IP is banned by fail2ban, allowing rapid investigation and preventing inadvertent denial of service to legitimate users.

Generated by OpenCVE AI on October 13, 2026 at 03:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Title Arbitrary IP Banning via Username Injection in fail2ban SSHD Filter
Type Values Removed Values Added
Description In fail2ban 0.10.5 through 1.1.1 before ddd879d, the sshd filter (config/filter.d/sshd.conf) accepts an "on <token>" suffix after the host address. Because OpenSSH logs the offered username verbatim, a remote unauthenticated attacker can use a username such as "x VICTIM-SOURCE-IP-ADDRESS on" to make fail2ban associate failed login attempts with an arbitrary source IP address and ban it (e.g., to block logins from a legitimate user). The default filter mode is affected.
First Time appeared Fail2ban
Fail2ban fail2ban
Weaknesses CWE-117
CPEs cpe:2.3:a:fail2ban:fail2ban:*:*:*:*:*:*:*:*
Vendors & Products Fail2ban
Fail2ban fail2ban
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses
  • CWE-117

    Improper Output Neutralization for Logs

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Oct 15, 2026, 3:04 PM
Reserved
Oct 13, 2026, 2:40 AM
Status
Awaiting Analysis
Published
Oct 13, 2026, 3:16 AM
Modified
Oct 16, 2026, 7:55 PM