
NGINX web server project has released security updates to address a zero-day vulnerability that resides in its Lightweight Directory Access Protocol (LDAP) Reference Implementation.
The NGINX LDAP reference implementation uses LDAP to authenticate users of applications that are proxied by the NGINX web server.
NGINX Open Source and NGINX Plus are not affected, states the security advisory published by the company. The advisory states that the LDAP reference implementation is impacted by the vulnerabilities when one of the following conditions apply:
- Command-line parameters are used to configure the Python daemon
- There are unused, optional configuration parameters
- LDAP authentication depends on specific group membership
An attacker could override the configuration parameters by sending specially crafted HTTP request headers and even bypass LDAP authentication.
The Python daemon does not sanitize its inputs. An attacker can use a specially crafted request header to bypass the group membership (memberOf) check and so force LDAP authentication to succeed even if the user being authenticated does not belong to the required groups. To mitigate against this, ensure that the backend daemon that presents the login form strips any special characters from the username field. It must remove the opening and closing parenthesis characters – ( ) – and the equal sign (=), which all have special meaning for LDAP servers. The backend daemon in the LDAP reference implementation will be updated in this way in due course.
NGINX Statement
It is recommended users strip special characters from the username field in the login form and update appropriate configuration parameters with an empty value (“”).
The advisory recommends removing the opening and closing parenthesis characters (“(” and “)”) and the equal sign (“=”), which all have special meaning for the LDAP server