Severity:

HIGH RISK

(7.3)

SQL Injection in Login Component chk.php of Project

CVE-2026-9584

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Authentication Bypass and Data Compromise via SQL Injection

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

The login functionality in code-projects Project Management System 1.0 contains a SQL injection flaw in chk.php that allows user-supplied input to be injected into database queries.

A remote attacker can exploit this to bypass authentication or access and manipulate backend data when specially crafted input is processed without proper sanitization.

Affected context

This vulnerability occurs in the login flow of code-projects Project Management System 1.0, specifically in chk.php, where user-provided credentials are processed.

The issue arises when request parameters are directly embedded in SQL statements without sufficient input validation, escaping, or parameterization.

Any deployment that exposes this login interface over a network and relies on a relational database for user authentication may be affected, depending on how the application is configured and protected.

Exploit preconditions

  • Attack surface: Public or internal web interface exposing the login form handled by chk.php.
  • Required access: Network access to the application; no prior authentication is required if the login form is publicly reachable.
  • Trigger point: Submission of crafted username, password, or related parameters to the login endpoint that are concatenated into SQL queries.
  • Why exploitation is possible: The server-side code constructs SQL statements using unsanitized user input (e.g., string concatenation) instead of using parameterized queries or robust input handling, allowing injection of arbitrary SQL fragments.

Why this happens

The underlying issue is improper construction of SQL queries with untrusted data, mapping directly to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Application logic in chk.php appears to take user input from the login form and insert it directly into SQL statements, likely via string concatenation or interpolation, without adequate escaping or parameter binding.

In addition, this behavior reflects CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, where the database is the downstream component consuming crafted data that breaks query syntax and semantics.

This pattern allows attackers to alter query structure, bypass intended logic, and execute unintended operations on the database.

Potential impact

  • Bypass of authentication mechanisms, allowing an attacker to log in as arbitrary users.
  • Unauthorized access to sensitive user data stored in the database.
  • Modification or deletion of application data, including project records and user accounts.
  • Extraction of database schema information that can facilitate further attacks.
  • Potential escalation to full database compromise depending on database user privileges.

General mitigation guidance

Effective mitigation focuses on treating all user input as untrusted and ensuring it cannot change the structure of SQL queries.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database access, especially in authentication and login flows.
  • Applying strict server-side validation and normalization on all input parameters before they reach the data access layer, enforcing expected types, lengths, and formats.
  • Centralizing query construction in a data access layer that enforces safe query-building patterns and discourages ad hoc string concatenation.
  • Applying the principle of least privilege to database accounts so application credentials have only the minimal permissions required for normal operation.
  • Introducing generic error handling that avoids exposing raw database errors to clients, reducing information leakage useful for exploitation.

How teams detect issues like this

Organizations can identify this and similar SQL injection issues using a combination of automated and manual techniques:

  • Static application security testing (SAST) rules that flag dynamic SQL construction, string concatenation with request parameters, and unparameterized queries in PHP code.
  • Code review checklists that require inspection of all authentication-related database calls to ensure parameterization and strict input handling.
  • Web application firewalls (WAFs) configured with signatures or anomaly detection to detect and block common SQL injection patterns in login requests.
  • Dynamic analysis and fuzz testing against login endpoints, attempting structured and malformed inputs to identify anomalous database behavior or error responses.
  • Continuous integration hooks that run security linters or automated review tools on changes involving authentication or database interaction code paths.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/MyMySSS/CVE123/blob/main/cve3/CVE_Submission.md
vuldb.comvuldb.com/submit/817933
vuldb.comvuldb.com/vuln/365640
vuldb.comvuldb.com/vuln/365640/cti

Frequently asked

questions

Yes. An attacker with network access to the login page handled by chk.php can attempt exploitation by submitting crafted input through the standard web interface or scripted HTTP requests.

No prior authentication is typically required because the vulnerable code executes as part of the login process. The attacker only needs the ability to reach the login endpoint.

The most robust fix is to refactor all affected queries to use parameterized statements or prepared queries, ensuring that user input is always treated as data, never as part of the query structure. This should be combined with strict input validation and centralized data access patterns.

Adopt secure coding standards that prohibit dynamic SQL construction with untrusted data, enforce the use of parameterized queries in code reviews, integrate static analysis tools into the development pipeline to flag unsafe patterns, and provide ongoing secure development training focused on injection prevention.

Find out what's already
exploitable in your codebase.