Skip to content
Online Examination System Issues 7

Online Examination System Issues 7

github.com • October 18, 2026

SQL injection in exammanger.php subject parameter allows unauthenticated database extraction

exammanger.php concatenates the POST parameter subject into select top_id,top_title from topics where sub_id=... without any escaping and without requiring a session. A UNION payload extracts arbitrary rows of any table into the response - demonstrated by dumping the users table with its password hashes.

Commit: e6208e630b14657999bbfe4c9912302d2a1e2449 (master)

SQL Injection (CWE-89)

exammanger.php is a data-only AJAX endpoint with no authentication, and the subject parameter is concatenated into the numeric part of the WHERE clause without quoting, casting or validation. The query result is then echoed back in the response body, which makes the injection directly readable (in-band).

Deploy the application at a test host ( in this reproduction) per readme.txt . (This endpoint works on plain PHP 7.4 as well; the application otherwise targets PHP 5.x.)

Normal request returns the topic options for subject 1:

UNION payload extracts the users table (username, MD5 password, user level) without any cookie:

Unauthenticated, in-band SQL injection: arbitrary tables of the application database can be dumped directly from the HTTP response (demonstrated with the users table containing password hashes).

The default database user is root ( include/constants.php ), so the injected statements run with maximum database privileges (limited in practice by the filesystem permissions and the DB configuration).

CVSS Score (self-assessed)

CVSS 3.1: 7.5 High - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Network vector, low complexity, no privileges or interaction, high confidentiality impact through arbitrary data extraction; no integrity or availability impact demonstrated with the default configuration.

Extracted Entities

Attack Types (1)

CWE Weaknesses (1)

Platforms (1)