CVE-2026-36874
SQL Injection in Sourcecodester Basic Library System v
Publication date: 2026-04-13
Last updated on: 2026-04-14
Assigner: MITRE
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| razormist | basic_library_system | 1.0 |
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-2026-36874 is an SQL injection vulnerability found in Sourcecodester Basic Library System v1.0, specifically in the file /librarysystem/load_student.php.
The vulnerability occurs because the student_id parameter in the URL query string is not properly sanitized or validated before being used in a SQL query.
An attacker can exploit this by sending a specially crafted HTTP GET request with malicious SQL code in the student_id parameter, which can manipulate the database query.
For example, using a UNION-based SQL injection payload, an attacker can retrieve sensitive information such as the current database name.
This happens because the application directly uses the student_id parameter in the SQL query without proper parameterization or input sanitization.
How can this vulnerability impact me? :
This SQL injection vulnerability can lead to unauthorized disclosure of sensitive data stored in the database.
Attackers can exploit the vulnerability to extract information such as database names, and potentially other sensitive records depending on the database contents.
Beyond data leakage, the vulnerability may allow further exploitation, such as modifying or deleting data, depending on the database permissions and application logic.
Overall, this can compromise the confidentiality, integrity, and availability of the system's data.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by sending crafted HTTP GET requests to the vulnerable endpoint `/librarysystem/load_student.php` with a specially crafted `student_id` parameter containing SQL injection payloads.
For example, you can test the vulnerability by issuing a request like:
- GET /librarysystem/load_student.php?student_id=-101054' union select 1,2,database(),4,5,6,7--+ HTTP/1.1
If the response contains database information or unexpected data, it indicates the presence of the SQL injection vulnerability.
You can use tools like curl or Burp Suite to send such requests and analyze responses.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
The SQL injection vulnerability in Sourcecodester Basic Library System v1.0 allows unauthorized disclosure of sensitive database information by exploiting improper sanitization of the student_id parameter.
Such unauthorized data disclosure can lead to violations of data protection regulations like GDPR and HIPAA, which mandate the protection of personal and sensitive information from unauthorized access.
Therefore, this vulnerability poses a risk to compliance with these common standards and regulations by potentially exposing confidential user data.
What immediate steps should I take to mitigate this vulnerability?
To mitigate the SQL injection vulnerability in /librarysystem/load_student.php, immediate steps include:
- Implement proper input validation and sanitization on the student_id parameter to prevent malicious SQL code injection.
- Use prepared statements or parameterized queries instead of directly embedding user input into SQL queries.
- Restrict database permissions to limit the impact of a potential SQL injection attack.
- Monitor and log suspicious requests to /librarysystem/load_student.php to detect exploitation attempts.
- If possible, apply patches or updates from the vendor or source to fix the vulnerability.