Encrypt – Moderately Critical – Weak Encryption – SA-CONTRIB-2015-166

Description

This module enables you to encrypt data within Drupal using a user-configurable encryption method and key provider.

The module did not sufficiently validate good configurations and api usage resulting in multiple potential weaknesses depending on module usage. The default encryption method could theoretically leak the key for known plaintexts. This vulnerability is mitigated by the fact that an attacker would need to have access to the encrypted data which is generally not possible without a breach of the database.

The default key provider uses the Drupal private key, which means that it could potentially be leaked which puts other elements of the site at risk. This vulnerability is mitigated by requiring the default combination of encryption method and key provider for the Drupal private key to be potentially leaked. Users of the module are likely to employ a key of their own creation, rather than use the Drupal private key.

Another encryption method included with the module uses a cipher that can leak structural information about the plaintext. This vulnerability is mitigated by the fact that it would only affect encryptions of large quantities of data, such as files and data of shorter lengths would not be affected.

The default key created by the module is generated by a MD5 hash, which is not as strong as using truly random bytes of data.

CVE identifier(s) issued

  • A CVE identifier will be requested, and added upon issuance, in accordance with Drupal Security Team processes.

Versions affected

  • Encrypt 7.x-2.x versions prior to 7.x-2.2.

Drupal core is not affected. If you do not use the contributed Encrypt module, there is nothing you need to do.

Solution

Install the latest version:

Once installed, review your settings and alter it to use a key provider and encryption method that is not deprecated. If data was encrypted with a deprecated key provider or encryption method then you should also re-encrypt all that data.

Also see the Encrypt project page.

Reported by

Fixed by

Coordinated by

Contact and More Information

The Drupal security team can be reached at security at drupal.org or via the contact form at https://www.drupal.org/contact.

Learn more about the Drupal Security team and their policies, writing secure code for Drupal, and securing your site.

Follow the Drupal Security Team on Twitter at https://twitter.com/drupalsecurity

Drupal version: 

Leave a Reply