Skip to content
SQL injection Write-up Intermediate

MercuryBoard <= 1.1.5 (func/login.php) SQL Injection Vulnerability

MercuryBoard 1.1.5 and earlier passes the User-Agent HTTP header into SQL in func/login.php without sanitising it. A remote attacker could send a crafted User-Agent header to run arbitrary SQL commands against the forum database.

karmainsecurity.com

Published on karmainsecurity.com

SQL injection vulnerability in func/login.php in MercuryBoard 1.1.5 and earlier allows remote attackers to execute arbitrary SQL commands via the User-Agent HTTP header ($SERVER[‘HTTPUSERAGENT’]).

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

Root cause

Likely the login code concatenates the raw User-Agent header value into an SQL query without escaping or parameterising it.

Impact

A remote attacker could execute arbitrary SQL commands, potentially reading or altering forum data; the text gives no further detail on limits.

What the attacker needed

Network access to the forum; no account needed

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 forum script builds a database query using text taken straight from the browser's User-Agent header, which the visitor controls. Because that text is not cleaned, an attacker can slip in database commands of their own. This lets them read or change data the forum stores, such as user records.

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.