Old and potentially devastating hole in Drupal affects one million websites
- 16 October, 2014 10:09
Around one million Drupal-based websites are affected by a serious security flaw that could give attackers complete control their site’s database.
A new version of the widely used open source content management system (CMS) Drupal is available to fix a “highly critical” flaw that leaves host servers running Drupal version 7.x wide open to remote attacks and could allow hackers to force a data dump or delete the site’s database.
The project on Wednesday urged users to update immediately to Drupal core 7.32, which remedies a flaw that has left sites exposed for the past three years until it was discovered by security researcher Stefan Horst of PHP security specialist, SektionEins.
Ironically, the bug was traced back to an API in Drupal 7 that was designed to prevent SQL injection attacks but instead left it open to that type of attack.
SQL injection vulnerabilities are one of the most commonly exploited errors in database-driven websites and easily prevented, according to The Open Web Application Security Project (OWASP). Broadly, they occur when users of a website can issue SQL commands from a public facing input field.
Drupal's efforts appear to have backfired. In an advisory Drupal explains, “Drupal 7 includes a database abstraction API to ensure that queries executed against the database are sanitized to prevent SQL injection attacks.”
“A vulnerability in this API allows an attacker to send specially crafted requests resulting in arbitrary SQL execution. Depending on the content of the requests this can lead to privilege escalation, arbitrary PHP execution, or other attacks.”
The vulnerability affects just under one million websites use some version of Drupal 7, according to Drupal’s statistics.
Making matters worse for Drupal sites, the flaw can be exploited without knowing the user name or password and requires little knowledge of the target site, according Horst.
“With this bug an attacker can gain full control over all Drupal sites (Admin privileges), without knowledge of internals or authentication on the site. He can even execute PHP Code without leaving a trace in any log,” said Horst.
He adds that it lets an attacker “execute arbitrary code with only one HTTP request and no knowledge of the site whatsoever.”
Horst discovered the vulnerability during a source code audit for a customer and says that the bug has lay hidden within the core Drupal framework since early 2011.
In an FAQ on the bug, Drupal says there are no known exploits in use at this time, however it advises admins to update their sites immediately.
“Unlike typical security advisories released for Drupal, the nature of this vulnerability provides a way for an attacker to create an exploit without needing an account or tricking someone into exposing confidential information,” it notes.
Another reason to update is that Horst has promised to release a proof of concept (PoC) but only after enough sites have updated to the new core version.
Drupal recommended that people use the latest release, however notes that there is a patch available at https://www.drupal.org/SA-CORE-2014-005.
This article is brought to you by Enex TestLab, content directors for CSO Australia.