Severity:

HIGH RISK

(7.3)

SQL Injection in code-projects CMS delete.php

CVE-2026-0565

Modified

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Confidentiality, Integrity, and Potential Authentication Bypass

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

code-projects Content Management System 1.0 contains a SQL injection vulnerability in /admin/delete.php, where the del parameter is incorporated into database queries without sufficient sanitization.

A remote attacker can manipulate this parameter to interfere with SQL queries, potentially accessing, modifying, or deleting backend data when the vulnerable endpoint is reachable.

Affected context

The vulnerability occurs in the administrative deletion functionality of code-projects CMS 1.0, specifically in /admin/delete.php.

It is present when user-controlled input from the del parameter is passed into SQL statements without proper parameterization or escaping.

The risk is most pronounced in deployments where the admin interface is network-accessible and database accounts used by the application have broad privileges on the underlying schema.

Exploit preconditions

  • Attack surface: HTTP(S) interface of the CMS, targeting the /admin/delete.php endpoint.
  • Required access: Ability to send requests to the admin delete endpoint; in some deployments this may require authenticated admin or elevated user access, while in others it may be exposed more broadly.
  • Trigger point: Supplying crafted values in the del query string or POST body that are incorporated into SQL statements.
  • Why exploitation is possible: The application builds SQL queries using string concatenation or equivalent unsafe interpolation with the del parameter, without using prepared statements or robust input validation, enabling injection of attacker-controlled SQL fragments.

Why this happens

This issue stems from constructing SQL queries by directly embedding unsanitized user input from the del parameter into the query text.

Instead of using parameterized queries or an ORM that separates code from data, the application appears to concatenate the del value into WHERE or DELETE clauses.

This aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command, and also reflects aspects of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, since unsafe data is forwarded to the database without appropriate neutralization.

The core pattern is trusting externally supplied identifiers or record selectors as safe to embed in backend commands.

Potential impact

  • Unauthorized reading of database contents, including potentially sensitive user or configuration data.
  • Modification or deletion of records, such as content entries, user accounts, or logs.
  • Creation of new accounts or escalation of privileges via manipulation of authentication- or role-related tables.
  • Bypassing authentication or access controls if SQL conditions can be altered.
  • Disruption of service availability through destructive operations (e.g., dropping tables) if the database user has sufficient rights.

General mitigation guidance

Mitigation typically focuses on separating SQL code from user-supplied data and constraining what input is allowed to represent:

  • Use parameterized queries or prepared statements for all database operations involving user-controlled parameters such as del.
  • Constrain the del parameter to a strict, expected format (e.g., numeric IDs) using server-side validation and reject any input outside that pattern.
  • Apply centralized query-building helpers or an ORM that discourages ad hoc string concatenation for SQL.
  • Limit database account privileges following least-privilege principles so that the application can perform only the minimal set of operations required.
  • Introduce secure-by-default coding guidelines and frameworks that make unsafe query construction harder or less convenient than safe alternatives.

How teams detect issues like this

Organizations can detect this type of issue using a combination of automated and manual approaches:

  • Static analysis rules targeting dynamic SQL construction, string concatenation into SQL statements, or direct inclusion of request parameters in query strings.
  • Code review checklists that flag any use of raw SQL APIs without bound parameters, especially in administrative endpoints such as /admin/delete.php.
  • Web application scanning and dynamic analysis tools that probe parameters like del for SQL injection behavior and monitor for anomalous database responses.
  • Logging and monitoring of database queries to identify unusual patterns, such as queries containing unexpected operators or concatenated clauses tied to web request parameters.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/Limingqian123/CVE/issues/12
vuldb.comvuldb.com/?ctiid.339377
vuldb.comvuldb.com/?id.339377
vuldb.comvuldb.com/?submit.729227

Frequently asked

questions

Exploitability depends on how the admin endpoint is exposed. If /admin/delete.php is reachable and the application does not enforce strong authentication or access controls, a remote attacker could potentially exploit the flaw. Even with authentication, a compromised or malicious privileged user could leverage the injection.

At minimum, the attacker needs network access to send HTTP requests to /admin/delete.php. In many deployments, this page is intended for authenticated administrators; if access controls are misconfigured or weak, attackers may be able to reach it without legitimate admin credentials.

The most robust fix is to replace any string-built SQL that uses the del parameter with parameterized queries, combined with strict validation that treats del as a constrained identifier (for example, an integer record ID) rather than arbitrary text. This should be applied consistently across all similar endpoints.

Adopt development standards that mandate parameterized queries or ORM-based data access, enforce server-side validation and canonicalization of all user inputs, and integrate security-focused code review and automated scanning into the development lifecycle. Regularly testing high-risk endpoints such as administrative delete or update actions for injection behavior can also help catch regressions early.

Find out what's already
exploitable in your codebase.