Student Record System SQL Injection Vulnerability

Vulnerability

A SQL injection vulnerability has been identified in the Student Record System using PHP and MySQL, version 3.20. The issue arises in the add-course.php file, where user-supplied variables are directly inserted into an SQL query without proper sanitization. This flaw allows remote attackers to inject malicious SQL payloads, potentially leading to unauthorized access or manipulation of sensitive database information.

Impact

Exploitation of this vulnerability allows for SQL injection, enabling attackers to interfere with the application's database queries. This could result in unauthorized data access, data manipulation, or in some cases, executing administrative operations on the database.

Reproduction

To reproduce this vulnerability, log into the application as an admin and navigate to the 'Add Course' section. Enter a course short name, full name, and date. Include a crafted payload in one or more of these fields to exploit the SQL injection vulnerability. Once the form is submitted, the injected SQL code will be executed by the database, demonstrating the vulnerability.

Remediation

The vulnerability can be remediated by using parameterized queries. Instead of directly concatenating user input into SQL statements, the application should use prepared statements to bind parameters. This approach ensures that user input is treated as data rather than executable code, effectively preventing SQL injection attacks.

Added: Jun 25, 2025, 3:24 PM
Updated: Jun 25, 2025, 3:24 PM

Vulnerability Rating

Custom Algorithm
spread
0.8
impact
2.5
exploitability
9.5
remediation
0.0
relevance
0.2
threat
6.4
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.