A remote code execution vulnerability exists in PHP's built-in phar stream wrapper when performing file operations on an untrusted phar:// URI.
Some Drupal code (core, contrib, and custom) may be performing file operations on insufficiently validated user input, thereby being exposed to this vulnerability.
This vulnerability is mitigated by the fact that such code paths typically require access to an administrative permission or an atypical configuration.
- If you are using Drupal 8.6.x, upgrade to Drupal 8.6.6.
- If you are using Drupal 8.5.x or earlier, upgrade to Drupal 8.5.9.
- If you are using Drupal 7.x, upgrade to Drupal 7.62.
Versions of Drupal 8 prior to 8.5.x are end-of-life and do not receive security coverage.
This fix introduced a fatal error for some Drush installations when updating a site with Drush. New releases (8.6.7, 8.5.10, and 7.63) have been issued to resolve this regression. See the release notes for additional details.
.phar added to dangerous extensions list
.phar file extension has been added to Drupal's dangerous extensions list, which means that any such file uploaded to a Drupal file field will automatically be converted to a text file (with the
.txt extension) to prevent it from being executed. This is similar to how Drupal handles file uploads with a
phar:// stream wrapper disabled by default for Drupal 7 sites on PHP 5.3.2 and earlier
The replacement stream wrapper is not compatible with PHP versions lower than 5.3.3. Drupal 8 requires a higher PHP version than that, but for Drupal 7 sites using lower PHP versions, the built-in phar stream wrapper has been disabled rather than replaced. Drupal 7 sites using PHP 5.2 (or PHP 5.3.0-5.3.2) that require phar support will need to re-enable the stream wrapper for it; however, note that re-enabling the stream wrapper will re-enable the insecure PHP behavior on those PHP versions.
It is very uncommon to both be running a PHP version lower than 5.3.3 and to need phar support. If you're in that situation, consider upgrading your PHP version instead of restoring insecure phar support.
- Cash Williams of the Drupal Security Team
- Lee Rowlands of the Drupal Security Team
- Samuel Mortenson of the Drupal Security Team
- Jess of the Drupal Security Team
- Alex Pott of the Drupal Security Team
- Ted Bowman
- Michael Hess of the Drupal Security Team
- Alex Bronstein of the Drupal Security Team
- Fabian Franz
Note: Going forward, Drupal core will issue individual security advisories for separate vulnerabilities included in the release, rather than lumping "multiple vulnerabilities" into a single advisory. All advisories released today:
Updating to the latest Drupal core release will apply the fixes for all the above advisories.