CVE-2024-27685
BaseFortify
Publication date: 2025-06-25
Last updated on: 2025-07-02
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| phpgurukul | student_record_system | 3.20 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-89 | The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
CVE-2024-27685 is a SQL Injection vulnerability in the Student Record System Using PHP and MySQL v3.20. The vulnerability occurs because user inputs ($cshortname, $cfullname, and $cdate) are directly concatenated into an SQL query without proper sanitization or parameterization. This allows a remote attacker to inject malicious SQL code through these variables, potentially gaining unauthorized access to or manipulating sensitive information in the database. The issue is in the add-course.php file where the SQL query is constructed unsafely. [1]
How can this vulnerability impact me? :
This vulnerability can allow a remote attacker to execute arbitrary SQL commands on the database, which may lead to unauthorized access to sensitive student and course information, data leakage, data modification, or deletion. It compromises the confidentiality, integrity, and availability of the database managed by the Student Record System, potentially affecting the entire educational institution's data security. [1]
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This SQL Injection vulnerability can be detected by testing the input fields corresponding to $cshortname, $cfullname, and $cdate variables for SQL injection payloads. You can use tools like sqlmap or manual curl commands to send crafted payloads to the add-course.php endpoint and observe if the system returns database errors or unexpected data. For example, a curl command to test might be: curl -X POST -d "cshortname=' OR '1'='1&cfullname=test&cdate=2024-01-01" http://yourserver/studentrecordms/add-course.php If the response indicates SQL errors or unexpected behavior, the vulnerability is present. [1]
What immediate steps should I take to mitigate this vulnerability?
The immediate mitigation step is to modify the vulnerable code to use parameterized queries with prepared statements. Specifically, replace the direct concatenation of user inputs into SQL queries with mysqli_prepare and mysqli_stmt_bind_param functions. This ensures user inputs are treated as data, preventing SQL injection. Additionally, review and sanitize all user inputs and consider applying web application firewall (WAF) rules to block malicious payloads until the code is fixed. [1]