Vulnerability Related to Processing of Archive Files Patched in Drupal
Drupal developers on Wednesday announced the release of versions 7.69, 8.7.11 and 8.8.1, which address several vulnerabilities, including a potentially serious file processing issue.
The most serious of the flaws has been assigned a severity rating of critical, but it’s worth noting that Drupal uses the NIST Common Misuse Scoring System to calculate risk and critical is the second highest rating, after highly critical.
The vulnerability impacts Drupal 7.x, 8.7.x and 8.8.x, and it’s related to the Archive_Tar third-party library used by the content management system (CMS). Archive_Tar is a popular tool designed for handling TAR archive files in PHP.
Roughly one month ago, someone advised Archive_Tar developers to add an option that would allow users to ban symlinks, which are files that contain a reference to another file or folder. Symlinks can be exploited by malicious actors to write arbitrary data, which can lead to privilege escalation.
“For applications where uploaded archives are untrusted, it would be useful to have a way to disallow symlinks. This would effectively protect against exploits that involve archives that point to (and eventually override) system paths,” explained Samuel Mortenson, who reported the issue to Archive_Tar developers.
Archive_Tar developers followed Mortenson’s advice and in early December, with the release of version 1.4.9, they added an option to disallow symlinks.
Since Drupal uses Archive_Tar, the CMS’s developers have determined that some configurations are exposed to attacks, which is why they have now updated the library to version 1.4.9.
According to Drupal, websites are at risk if they are configured to allow the uploading of TAR, TAR.GZ, BZ2 or TLZ files, which are then processed.
The other three vulnerabilities patched this week by Drupal affect versions 8.7.x and 8.8.x, and they have all been rated moderately critical, which is the third highest risk level.
One of these flaws can be exploited to cause a denial-of-service (DoS) condition. Accessing install.php can result in cached data becoming corrupted, which can cause a website to become “impaired” until the caches are rebuilt, Drupal developers said.
Another vulnerability has been described as an access bypass issue related to the Media Library module, which apparently does not properly restrict access to media items in certain configurations.
Finally, there is a weakness related to the fact that the file_save_upload() function in Drupal 8 fails to strip the leading and trailing dot from filenames, as Drupal 7 did. This allows an attacker, for example, to upload a specially crafted .htaccess web server configuration file in order to bypass protections provided by the default .htaccess file.