Skip to content
SQL injection Write-up Intermediate

Drake CMS <= 0.4.11 (guestbook.php) SQL Injection Vulnerability

The guestbook component in Drake CMS 0.4.11 and earlier fails to sanitise the Via HTTP header before using it in a SQL query. A remote attacker can send a crafted Via header to index.php and execute arbitrary SQL commands.

karmainsecurity.com

Published on karmainsecurity.com

SQL injection vulnerability in the guestbook component (components/guestbook/guestbook.php) in Drake CMS 0.4.11 and earlier allows remote attackers to execute arbitrary SQL commands via the Via HTTP header (HTTPVIA) to index.php.

The author, on karmainsecurity.com

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

Impact

A remote attacker could execute arbitrary SQL commands, potentially reading or changing database contents.

What the attacker needed

Network access to index.php; guestbook component present

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.

A website's guestbook page takes a value from an HTTP header called Via and puts it directly into a database command without cleaning it. An attacker can change that header to include extra database instructions, so the database runs the attacker's commands instead of the intended one. This is called SQL injection: tricking a database by hiding commands inside normal input.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.