An emergency update has been released for the Apache HTTP server 2.4.50, which addresses an actively exploited 0-day vulnerability (CVE-2021-41773) that allows access to files outside the site's root directory. This vulnerability can be exploited to upload arbitrary system files and source code of web scripts that are readable by the user under which the HTTP server is running. Developers were notified about the issue on September 17 but could only release the update today after cases of vulnerability exploitation were observed online.
The danger posed by the vulnerability is somewhat mitigated by the fact that the issue only affects the recently released version 2.4.49 and does not impact earlier releases. In stable branches of conservative server distributions, version 2.4.49 has not yet been used (Debian, RHEL, Ubuntu, SUSE), but the issue has affected continuously updated distributions such as Fedora, Arch Linux, and Gentoo, as well as FreeBSD ports.
The vulnerability is caused by an error introduced during the code revision for normalizing paths in URIs, which caused the encoded ‘’ dot character in paths not to normalize if it was preceded by another dot. As a result, it was possible to inject unfiltered characters ‘..\/’ into the resulting path by specifying the sequence ‘.\/’ in the request. For example, a request like ‘https://example.com/cgi-bin/././././etc/passwd’ or ‘https://example.com/cgi-bin/.////etc/hosts’ allowed access to the content of the file ‘/etc/passwd’.
The issue does not manifest if access to directories is explicitly denied using the configuration setting ‘require all denied’. For partial protection, you can specify in the configuration file: require all denied
Version Apache httpd 2.4.50 also addresses another vulnerability (CVE-2021-41524) affecting the module that implements the HTTP/2 protocol. This vulnerability allowed the sending of a specially crafted request to initiate a null pointer dereference and crash the process. This vulnerability also only appears in version 2.4.49. As a workaround for protection, you can disable support for the HTTP/2 protocol.
Source: opennet.ru
