Description
The User module records which external authentication name belongs to which Drupal account, so that an authentication module can log a visitor in once their provider has identified them.
The column that holds the external name is declared without a binary collation and the lookup compares it with a plain equality query, so on MySQL and MariaDB the comparison ignores letter case and trailing whitespace. A visitor who authenticates at the provider under a name that differs from a registered one only in those respects is therefore logged in as the Drupal account belonging to the other name, even though the provider treats the two as separate identities and every signature and discovery check on the assertion passes. PostgreSQL and SQLite compare such values exactly and are not affected.
This vulnerability is mitigated by the fact that the site must use an external authentication module, that the provider must issue identifiers whose letter case the attacker can vary, which rules out providers that issue numeric or opaque subject identifiers, and that the attacker must be able to obtain such a name at the same provider as the account they wish to reach.
Solution
Install the latest version.
Reported by
Fixed by
- Sven Decabooter (svendecabooter)
- Tag1 D7ES
Coordinated by
- Swan Kalata (akalata) of the Drupal Security Team
- Neil Drumm (drumm) of the Drupal Security Team
- Greg Knaddison (greggles) of the Drupal Security Team
- Juraj Nemec (poker10) of the Drupal Security Team
- Tag1 D7ES