Severity:

HIGH RISK

(7.3)

SQL Injection in QueryMine SMS admin/deletecourse.php

CVE-2026-6490

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Database Compromise and Data Integrity Loss

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

QueryMine SMS contains a SQL injection flaw in the admin/deletecourse.php endpoint, where the ID parameter from a GET request is used unsafely in database queries.

A remote attacker can exploit this by sending crafted HTTP requests, potentially manipulating or exfiltrating data, and affecting the integrity of the underlying database.

Affected context

The vulnerability occurs in the administrative course deletion functionality exposed by admin/deletecourse.php in QueryMine SMS.

It is triggered when the application processes the ID parameter from a GET request and incorporates it into SQL statements without sufficient neutralization.

This typically affects deployments where the admin interface is reachable over the network and database accounts used by the application have permissions to modify or query sensitive tables.

Exploit preconditions

  • Attack surface: HTTP interface for the admin/deletecourse.php endpoint.
  • Required access: Network access to the web application; exploitation does not inherently require valid authentication if the endpoint is exposed and insufficiently access-controlled.
  • Trigger point: Handling of the ID GET parameter by the deletecourse functionality, which is passed into a SQL query.
  • Why exploitation is possible: The parameter value is not properly validated, sanitized, or bound using parameterized queries, allowing attacker-controlled input to alter the structure of SQL commands.

Why this happens

This issue stems from directly embedding untrusted input into SQL statements without adequate input neutralization or use of parameterized queries.

In the affected code path, the ID GET parameter is likely concatenated into a query string, allowing an attacker to inject additional SQL fragments.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), and is related to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, where unsafe data is passed into a downstream SQL interpreter.

Potential impact

  • Unauthorized reading of database records, including potentially sensitive user or course data.
  • Modification or deletion of course-related records or other tables accessible to the database account.
  • Creation of new accounts or escalation of privileges within the application if associated data is stored in the same database.
  • Potential disruption of application functionality through tampering with structural or configuration tables.
  • In some configurations, pivoting to other attacks such as extracting password hashes that may be reusable elsewhere.

General mitigation guidance

Effective mitigation focuses on eliminating unsafe SQL construction patterns and constraining the privileges of database operations.

Recommended defensive approaches include:

  • Replacing string-concatenated SQL with parameterized queries or prepared statements for all user-supplied values, including IDs.
  • Applying strict server-side validation and type checking on all request parameters, ensuring ID fields are constrained to expected formats (e.g., numeric or UUID).
  • Implementing a centralized data access layer that enforces safe query patterns and rejects ad hoc dynamic SQL.
  • Limiting database user privileges so that the application account can access only the schemas and operations it strictly needs, reducing impact if injection occurs.
  • Enforcing strong authentication and authorization around administrative endpoints such as deletecourse functionality, reducing who can reach these code paths.

How teams detect issues like this

Detection generally requires a combination of code-centric and behavior-centric techniques:

  • Static analysis rules targeting direct concatenation of request parameters (e.g., $_GET, $_POST, request.query) into SQL strings in PHP or the relevant language.
  • Code review checklists that flag any administrative action (like deletion) that uses user input in SQL without bound parameters or rigorous validation.
  • Web application firewall (WAF) or reverse proxy rules that monitor for and optionally block common SQL injection patterns in request parameters, especially for ID fields.
  • Runtime monitoring of database queries for anomalous patterns (e.g., stacked queries, tautologies, or unexpected UNION operations) associated with requests to admin/deletecourse.php.
  • Integration of automated security testing tools (DAST and SAST) into CI/CD pipelines to continuously scan for SQL injection sinks in newly introduced or modified code.

Sources

SourceLink
github.comgithub.com/duckpigdog/CVE/blob/main/QueryMine_sms%20PHP%20Project%20Deployment%20Document%20(Windows%20Local)-1.md
vuldb.comvuldb.com/submit/786912
vuldb.comvuldb.com/vuln/358034
vuldb.comvuldb.com/vuln/358034/cti

Frequently asked

questions

Yes. An attacker with network access to the affected QueryMine SMS instance can send crafted HTTP GET requests to the vulnerable endpoint, making exploitation possible over the network.

Not necessarily. If the admin/deletecourse.php endpoint is accessible without strict authentication and authorization, an unauthenticated attacker could attempt exploitation. If it is properly restricted, an attacker would first need to obtain valid credentials or otherwise bypass access controls.

The safest pattern is to refactor database access so that all user-controlled inputs are passed via parameterized queries or prepared statements, combined with strict server-side validation of the ID parameter and removal of any dynamic SQL that interpolates raw request data.

Establish and enforce a development standard that prohibits direct concatenation of user input into SQL, centralize database access through vetted helper functions or ORM layers, apply principle-of-least-privilege to database accounts, and integrate automated security testing and code review practices that specifically look for injection sinks.

Find out what's already
exploitable in your codebase.