Severity:

HIGH RISK

(7.3)

SQL Injection in Online Product Reservation System User

CVE-2026-0583

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Authentication Bypass and Data Exposure

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 Online Product Reservation System 1.0 contains a SQL injection vulnerability in the user login functionality, where the emailadd parameter is incorporated into database queries without proper sanitization.

A remote attacker can manipulate this parameter to interfere with the underlying SQL query, potentially bypassing authentication or accessing other users' data when the application is deployed with a vulnerable configuration.

Affected context

This vulnerability occurs in the app/user/login.php script within the User Login component of Online Product Reservation System 1.0.

It is relevant when user-supplied email addresses (emailadd parameter) are passed directly into SQL statements, typically during login checks, without adequate input validation, query parameterization, or output encoding.

The risk is highest when the application connects to a production database with real customer data and the database account used by the application has broad privileges (such as read/write on user tables).

Exploit preconditions

  • Attack surface: Public-facing or reachable login endpoint at app/user/login.php.
  • Required access: Network access to the web application; no prior authentication required to reach the login form.
  • Trigger point: Submission of a crafted emailadd value (via POST or GET) to the login endpoint.
  • Why exploitation is possible: The emailadd parameter is concatenated into an SQL query or otherwise interpreted by the database engine without strict parameter binding or robust input handling, allowing attacker-controlled SQL syntax to alter query behavior.

Why this happens

The underlying issue maps to 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.

The login code likely constructs SQL statements through string concatenation or interpolation, directly embedding the emailadd user input into the query.

Because special SQL characters such as quotes and operators are not consistently neutralized and the code does not rely on prepared statements with bound parameters, the database treats parts of the user input as executable SQL.

This design pattern creates a channel where untrusted input can shape the structure of the query rather than being treated purely as data.

Potential impact

  • Authentication bypass by forging login checks or forcing a successful match without valid credentials.
  • Unauthorized access to user account data stored in the database.
  • Exposure or enumeration of user records via manipulated SELECT queries.
  • Modification or deletion of data if the database account has write or administrative privileges.
  • Potential pivoting to other application functions that rely on the same compromised database account.

General mitigation guidance

Mitigation typically centers on treating all user input as untrusted and ensuring it cannot change query structure.

Common defensive patterns include:

  • Using parameterized queries (prepared statements with bound parameters) for all database interactions, especially in authentication flows.
  • Applying strict server-side validation and normalization for login fields such as email addresses (e.g., limiting to expected character sets and formats).
  • Centralizing database access logic so that query construction follows a consistent, safe pattern rather than ad-hoc string concatenation.
  • Restricting database privileges for the application account to the minimum necessary, reducing the impact if an injection occurs.
  • Separating authentication logic from raw SQL where possible (e.g., using ORM abstractions that encourage safe parameter binding).

How teams detect issues like this

Organizations can identify this class of vulnerability through both automated and manual review:

  • Static analysis: Configure SAST rules to flag dynamic SQL string building that incorporates $_GET, $_POST, or other request variables without parameter binding in PHP code, especially in authentication handlers.
  • Code review: Examine login and user-related database calls for string concatenation, inline variables in SQL strings, and inconsistent input validation or escaping.
  • Dynamic testing: Use web application scanners or manual testing with crafted payloads against login endpoints to detect anomalous responses that suggest query manipulation.
  • Security governance: Enforce development guidelines and CI checks that disallow raw SQL string concatenation in favor of prepared statements and vetted database access layers.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/foeCat/CVE/blob/main/OnlineProductReservation_PHP/sqli_login.php.md
github.comgithub.com/foeCat/CVE/blob/main/OnlineProductReservation_PHP/sqli_login.php.md#poc
vuldb.comvuldb.com/?ctiid.339475
vuldb.comvuldb.com/?id.339475
vuldb.comvuldb.com/?submit.731093

Frequently asked

questions

Yes. The vulnerable login endpoint can be reached over the network, and an attacker can submit crafted emailadd values to exploit the SQL injection without needing prior access.

Typically no. The flaw is present in the login flow itself, so the attacker only needs the ability to reach the login form or endpoint and send crafted HTTP requests.

Refactor the affected login code to use prepared statements with bound parameters for all SQL queries, combined with strict server-side validation of email and password fields, ensuring that user input never directly controls query structure.

Adopt a secure-by-default database access layer that enforces parameterization, establish coding standards that forbid string-built SQL, integrate static and dynamic security testing into the CI/CD pipeline, and perform targeted security reviews on authentication and input-handling code paths.

Find out what's already
exploitable in your codebase.