Severity:

HIGH RISK

(7.3)

SQL Injection in Code-Projects CMS

CVE-2026-0546

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Database Compromise

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 search.php, where the Value parameter is incorporated into database queries without proper sanitization.

A remote attacker can manipulate this parameter to interfere with SQL queries, potentially accessing or modifying backend data when the search functionality processes untrusted input.

Affected context

The vulnerability appears in the search functionality of Code-Projects CMS 1.0, specifically within search.php where user-supplied data is used to build SQL queries.

It is most relevant in deployments where the application directly concatenates request parameters (such as Value) into SQL statements and where the database account has broad privileges.

The issue manifests when search requests are accepted from untrusted clients and not normalized, validated, or safely parameterized before reaching the database layer.

Exploit preconditions

  • Attack surface: Public-facing or reachable web endpoint handling search.php.
  • Required access: Ability to send HTTP requests (e.g., GET/POST) to search.php with a controllable Value parameter.
  • Trigger point: Invocation of the vulnerable code path when search.php constructs a SQL query using the Value argument.
  • Why exploitation is possible: The Value parameter is interpolated directly into a SQL statement without robust input validation, escaping, or prepared statements, allowing crafted input to alter the intended query structure.

Why this happens

This vulnerability stems from constructing SQL statements by concatenating untrusted user input into query strings.

Instead of using parameterized queries or prepared statements, the code likely embeds the Value parameter directly inside SQL, which aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The presence of CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component further reflects that data is passed from the web layer to the database without normalizing or constraining it to expected formats, allowing SQL metacharacters to influence execution.

Potential impact

  • Unauthorized reading of database records, including potentially sensitive user or application data
  • Modification or deletion of content stored in the CMS database
  • Bypassing application-level authentication or authorization checks implemented via database queries
  • Extraction of database schema information (e.g., table names and columns) to aid further attacks
  • Potential execution of stacked or extended SQL commands if supported by the database engine

General mitigation guidance

Effective mitigation focuses on treating all search parameters, including Value, as untrusted and strictly constraining how they are used in SQL.

Common defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations, ensuring user input is bound as data, not executable SQL.
  • Applying rigorous server-side validation to search inputs, enforcing expected formats, lengths, and character sets.
  • Centralizing database access through a safe abstraction layer that prohibits ad hoc string-based query construction.
  • Applying least-privilege to the database user account so that even if a query is manipulated, its capabilities are limited.
  • Normalizing and encoding user input before handing it to downstream components when dynamic query elements are unavoidable (e.g., whitelisting column or sort keys and never accepting raw SQL fragments).

How teams detect issues like this

SQL injection issues can be identified through a mix of code-level and runtime analysis:

  • Static analysis rules that flag string concatenation or interpolation used in SQL queries, especially within search.php and related database helper functions.
  • Manual code review focused on database access layers, checking that all parameter handling uses prepared statements and that no raw user input reaches query strings.
  • Web application scanning with security testing tools configured to send SQL-specific payloads to parameters such as Value and monitor for anomalous responses or database error messages.
  • Centralized logging and monitoring that detects unusual query patterns, errors, or spikes in failed queries originating from the search endpoint.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/gtxy114514/CVE/issues/1
vuldb.comvuldb.com/?ctiid.339338
vuldb.comvuldb.com/?id.339338
vuldb.comvuldb.com/?submit.728924

Frequently asked

questions

Yes. As long as search.php is accessible over the network, a remote attacker can send crafted requests with a malicious Value parameter to attempt SQL injection.

No prior authentication is necessarily required unless the search functionality is behind a login; the main requirement is the ability to interact with the vulnerable endpoint and control the Value parameter.

The most robust fix is to replace any string-concatenated queries with parameterized queries or prepared statements, combined with strict server-side validation of all search parameters before they reach the database layer.

Adopt a development standard that prohibits dynamic SQL with untrusted input, enforce use of secure database APIs through code reviews and automated checks, and document secure patterns for building search and filtering features that always treat user input as data, not logic.

Find out what's already
exploitable in your codebase.