Drupal 7.31 Pre Auth SQL Injection Vulnerability
Drupal's prepared statement expansion mishandled array keys, allowing an attacker to inject SQL through a placeholder name. This could let an unauthenticated attacker gain admin access and execute PHP code.
sektioneins.de
Published on sektioneins.de
A vulnerability in Drupals handling of SQL queries allows SQL injection and remote code execution.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the function that expands array placeholders used attacker-controlled array keys directly in the SQL query without proper validation.
Impact
An unauthenticated attacker could gain full control over all Drupal sites, including admin privileges and remote code execution, with a single HTTP request.
What the attacker needed
No authentication required; knowledge of the vulnerable parameter
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
Drupal builds database queries using placeholders, like fill-in-the-blanks, so user input cannot change the query's structure. A bug in how it filled in those blanks let an attacker sneak extra SQL commands into the query. That could give them control of the database and even the website.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.