/

CVE-2026-10704

Severity:

HIGH RISK

(7.3)

SQL Injection (CWE-89) in Pizzafy E-Commerce System Administrative Login

CVE-2026-10704

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 administrative login function in SourceCodester Pizzafy E-Commerce System 1.0 is vulnerable to SQL injection via the Username parameter.

A remote attacker can manipulate this input to interfere with backend SQL queries, potentially bypassing authentication and gaining unauthorized access to the admin control panel.

Affected context

This vulnerability occurs in the administrative control panel login workflow, specifically within the Login function in /admin/admin_class_novo.php.

It is exposed when user-supplied credentials are passed directly into SQL statements without proper parameterization, escaping, or centralized input validation.

Any deployment that exposes the admin login over the network and relies on database-backed authentication is potentially affected, especially if the admin endpoint is reachable from untrusted networks.

Exploit preconditions

  • Attack surface: HTTP(S) interface to the Pizzafy admin login page.
  • Required access: Network access to the administrative login endpoint; no prior authentication is needed.
  • Trigger point: Submission of crafted Username values in the login form or equivalent HTTP requests.
  • Why exploitation is possible: The login code dynamically constructs SQL queries by concatenating the Username input directly into the query string without using parameterized queries or rigorous input handling, enabling the attacker to alter query logic.

Why this happens

The underlying issue is the construction of SQL queries using string concatenation that mixes control and data, a classic pattern described by CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

The Username parameter is treated as trusted and embedded in the SQL statement without parameter binding or robust neutralization, allowing an attacker to inject SQL metacharacters and clauses.

The additional mapping to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component reflects that database statements act as a downstream interpreter for untrusted user input.

Potential impact

  • Bypass of administrative authentication, allowing unauthorized access to the control panel.
  • Access to or modification of sensitive application data stored in the database.
  • Creation, modification, or deletion of user accounts and administrative configurations.
  • Extraction of database contents, including potentially sensitive customer or order information.
  • Potential for database server compromise if chained with other weaknesses (e.g., abuse of stored procedures or extended functions).

General mitigation guidance

Effective mitigation focuses on eliminating direct injection paths and enforcing strict separation between query structure and user data:

  • Use parameterized queries (prepared statements with bound variables) for all database interactions involving user input, especially authentication logic.
  • Centralize input handling and validation for credentials, restricting accepted characters and formats for usernames and similar identifiers.
  • Apply a database abstraction layer or ORM that discourages ad-hoc string-built SQL and encourages safe query construction patterns.
  • Limit database privileges for the application account to the minimum required for normal operation, reducing impact if an injection occurs.
  • Isolate administrative interfaces behind additional access controls (e.g., VPN, IP allowlists) to reduce exposure of critical endpoints.

How teams detect issues like this

Detection typically combines code-centric and runtime perspectives:

  • Static code analysis rules that flag SQL statements where variables are concatenated directly into query strings, particularly within authentication or authorization logic.
  • Manual code review focusing on data access layers and login flows to verify consistent use of parameterized queries and centralized database APIs.
  • Application security testing (DAST) using automated scanners or custom test cases that probe the Username parameter in the admin login for injection behavior.
  • Logging and monitoring for anomalous query patterns, such as frequent syntax errors, atypical predicates, or login attempts containing SQL metacharacters.

Sources

SourceLink
github.comgithub.com/nuiifornet/A033/blob/main/pizzafy-vulnerability.md
vuldb.comvuldb.com/cve/CVE-2026-10704
vuldb.comvuldb.com/submit/831321
vuldb.comvuldb.com/vuln/368017
vuldb.comvuldb.com/vuln/368017/cti
sourcecodester.comsourcecodester.com/

Frequently asked

questions

Yes. The vulnerable login endpoint is accessible over the network, and an attacker can send crafted HTTP requests targeting the Username parameter without prior authentication.

Only network access to the admin login interface is required. No valid credentials are necessary to attempt exploitation, although reaching the admin endpoint may be constrained by deployment-specific network controls.

Refactor the login and related database interactions to use parameterized queries exclusively, removing any direct string concatenation of user input into SQL statements. Combine this with centralized validation for credential fields to enforce strict, predictable input formats.

Adopt secure coding standards that mandate parameterized queries or safe ORM usage, enforce these practices with automated static analysis in the development pipeline, and include targeted security reviews of authentication, administration, and data access code paths during code review and testing.

Find out what's already
exploitable in your codebase.