Skip to main content
COSMICBYTEZLABS
NewsSecurityHOWTOsToolsStudyTraining
ProjectsChecklistsAI RankingsNewsletterStatusTagsAbout
Subscribe

Press Enter to search or Esc to close

News
Security
HOWTOs
Tools
Study
Training
Projects
Checklists
AI Rankings
Newsletter
Status
Tags
About
RSS Feed
Reading List
Subscribe

Stay in the Loop

Get the latest security alerts, tutorials, and tech insights delivered to your inbox.

Subscribe NowFree forever. No spam.
COSMICBYTEZLABS

Your trusted source for IT intelligence, cybersecurity insights, and hands-on technical guides.

448+ Articles
114+ Guides

CONTENT

  • Latest News
  • Security Alerts
  • HOWTOs
  • Projects
  • Exam Prep

RESOURCES

  • Search
  • Browse Tags
  • Newsletter Archive
  • Reading List
  • RSS Feed

COMPANY

  • About Us
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CosmicBytez Labs. All rights reserved.

System Status: Operational
  1. Home
  2. Security
  3. CVE-2026-5018: SQL Injection in code-projects Simple Food Order System (Register)
CVE-2026-5018: SQL Injection in code-projects Simple Food Order System (Register)
SECURITYHIGHCVE-2026-5018

CVE-2026-5018: SQL Injection in code-projects Simple Food Order System (Register)

A remotely exploitable SQL injection vulnerability exists in code-projects Simple Food Order System 1.0, where the Name parameter in register-router.php is passed unsanitized into SQL queries, enabling remote database compromise.

Dylan H.

Security Team

March 29, 2026
4 min read

Affected Products

  • code-projects Simple Food Order System 1.0

CVE-2026-5018: SQL Injection in Simple Food Order System Registration Handler

A SQL injection vulnerability tracked as CVE-2026-5018 has been disclosed in code-projects Simple Food Order System 1.0. The flaw exists in the /register-router.php file, where the Name parameter is passed directly into a SQL query without sanitization. This is remotely exploitable and rated CVSS v3.1 7.3 (High) under CWE-89.

Unlike many SQL injection vulnerabilities limited to authenticated admin paths, this flaw resides in the registration flow — a publicly accessible endpoint — which significantly increases the attack surface and ease of exploitation.


Vulnerability Overview

AttributeValue
CVE IDCVE-2026-5018
CVSS Score7.3 (High)
CWE ClassificationCWE-89 — SQL Injection
Affected Softwarecode-projects Simple Food Order System 1.0
Vulnerable File/register-router.php
Vulnerable ParameterName
Attack VectorNetwork (Remote)
Authentication RequiredNone (unauthenticated endpoint)
Exploit PublishedYes — public exploit available
Patch AvailableNone confirmed

Technical Details

Affected Component

The vulnerability exists in the user registration module. The /register-router.php file accepts a Name POST parameter and constructs a SQL INSERT or SELECT query by directly concatenating the user-supplied value — no prepared statements or input escaping is applied.

Exploitation Mechanism

An attacker can send a crafted registration request with a malicious Name value:

POST /register-router.php
Name=attacker' OR '1'='1
Name=attacker'; DROP TABLE users;--
Name=attacker' UNION SELECT username,password,NULL FROM admin--

Because the registration endpoint is typically unauthenticated, this vulnerability is exploitable without any prior account access. Potential impacts include:

  • Unauthenticated database access — no login required to exploit
  • Full data extraction — all database tables exposed via UNION injection
  • Account creation bypass — injection could manipulate registration logic
  • Credential theft — admin and customer passwords extractable from the database
  • Destructive queries — DROP TABLE and truncation attacks possible depending on DB permissions

Attack Flow

1. Attacker identifies a publicly accessible Simple Food Order System instance

2. Attacker submits registration form with injected Name parameter

3. Unsanitized Name value is embedded in SQL query on the server

4. SQL engine executes the injected query against the backend database

5. Attacker retrieves query results or manipulates database state

6. Full database contents — including admin credentials — become accessible

Affected Software Context

code-projects is a widely used repository of PHP web applications distributed for educational purposes. The Simple Food Order System 1.0 is among their more commonly deployed applications. The registration endpoint being vulnerable is particularly concerning: it exposes the SQL injection to any unauthenticated visitor, requiring no privileges to exploit.

This follows a pattern seen across multiple code-projects releases where registration and login handlers directly concatenate user input into database queries, a fundamental PHP security anti-pattern that has been well-understood for over two decades.


Remediation

Immediate Steps

  1. Take the registration endpoint offline if internet-accessible — disable or restrict /register-router.php until patched
  2. Deploy WAF rules targeting SQL injection patterns in POST body parameters
  3. Implement prepared statements — this is a code-level fix, not configurable at runtime
  4. Audit existing user accounts — injected registrations may have created unauthorized accounts
  5. Rotate all credentials — database passwords and application secrets should be considered compromised

Code-Level Fix

// Vulnerable pattern
$query = "INSERT INTO users (name) VALUES ('" . $_POST['Name'] . "')";
 
// Secure pattern (PDO prepared statement)
$stmt = $pdo->prepare("INSERT INTO users (name) VALUES (?)");
$stmt->execute([$_POST['Name']]);

Impact Assessment

Impact AreaDescription
Unauthenticated AccessRegistration endpoint requires no login — exploit requires no credentials
Data ExposureFull database readable via UNION injection
Account ManipulationRegistration logic can be bypassed or manipulated
Credential TheftAll stored usernames and passwords extractable
Data DestructionDepending on DB permissions, DROP/TRUNCATE attacks possible

Key Takeaways

  1. CVE-2026-5018 is a CVSS 7.3 SQL injection in code-projects Simple Food Order System 1.0, in the unauthenticated registration handler
  2. The Name POST parameter in /register-router.php is not sanitized, enabling remote database access with no credentials required
  3. Public exploit available — exploitation requires minimal attacker skill
  4. No official patch — immediate restriction of the registration endpoint is essential
  5. Registration endpoints are high-value SQLi targets due to their unauthenticated, public-facing nature

Sources

  • CVE-2026-5018 — NIST NVD
#CVE-2026-5018#SQL Injection#code-projects#PHP#CWE-89#Vulnerability#Web Security

Related Articles

CVE-2026-5017: SQL Injection in code-projects Simple Food Order System (Tickets)

A remotely exploitable SQL injection vulnerability has been disclosed in code-projects Simple Food Order System 1.0, affecting the /all-tickets.php file via the Status parameter, enabling unauthenticated database access.

4 min read

CVE-2026-5019: SQL Injection in code-projects Simple Food Order System (Orders)

A SQL injection vulnerability has been disclosed in code-projects Simple Food Order System 1.0, where the Status parameter in all-orders.php enables remote attackers to execute arbitrary SQL and access the backend database.

4 min read

CVE-2026-5033: SQL Injection in code-projects Accounting System (Customer View)

A remotely exploitable SQL injection vulnerability has been disclosed in code-projects Accounting System 1.0, where the cos_id parameter in view_costumer.php enables unauthenticated attackers to access the full database.

5 min read
Back to all Security Alerts