Severity:

HIGH RISK

(7.3)

SQL Injection in Projectworlds Car Rental /book_car.php

CVE-2026-5634

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-74, CWE-89

Impact:

Data Exposure and Modification 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

Projectworlds Car Rental Project 1.0 contains a SQL injection flaw in the book_car.php parameter handler, where the fname argument is incorporated into database queries without proper safeguards.

A remote attacker can manipulate this parameter to interfere with SQL query structure, potentially extracting or modifying data and impacting application integrity, especially given that public exploit code is available.

Affected context

The vulnerability occurs in the Projectworlds Car Rental Project 1.0 application within the book_car.php booking flow.

It is exposed when user-controlled input (specifically the fname parameter) is passed from HTTP requests into SQL queries through the parameter handler without adequate input validation, encoding, or use of parameterized statements.

Environments where the web application has direct access to production databases and error details are exposed to clients are at increased risk of impactful exploitation.

Exploit preconditions

  • Attack surface: Public or internal web interface that processes requests to /book_car.php.
  • Required access: Network-level access to the web server; no prior authentication may be required depending on how booking is implemented.
  • Trigger point: Supplying crafted values for the fname parameter in HTTP requests so that they are incorporated into SQL statements.
  • Why exploitation is possible: The parameter handler concatenates or interpolates raw user input into SQL queries without using prepared statements or proper escaping, allowing attackers to alter query logic.

Why this happens

This issue stems from constructing SQL queries by directly embedding user input from the fname parameter into query strings.

Instead of treating input as data, the application blends it with SQL control syntax, which aligns with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

The reference to CWE-74 highlights that untrusted input is not safely neutralized before being used in a downstream interpreter (the SQL engine), representing a classic injection flaw in the parameter handling logic.

Potential impact

  • Unauthorized reading of sensitive customer or booking information from the database.
  • Modification or deletion of rental records, customer profiles, or transactional data.
  • Creation of new accounts or elevation of privileges within the application data model.
  • Disruption of application functionality through tampered or corrupted records.
  • Potential pivot to server-level compromise if database functions or stacked queries are accessible.

General mitigation guidance

Effective mitigation focuses on treating all external input as untrusted and separating query logic from data.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all database operations involving user-controlled input.
  • Applying strict server-side validation for fields like fname, enforcing expected character sets and length limits.
  • Centralizing database access in a data access layer that prohibits dynamic query concatenation.
  • Enforcing least-privilege on the database account used by the application, limiting its ability to perform destructive or administrative operations.
  • Implementing generic error handling so database errors are not exposed to clients, reducing the feedback available to attackers.

How teams detect issues like this

High-level detection strategies can include:

  • Static analysis rules that flag dynamic SQL construction patterns and direct string concatenation with request parameters (e.g., $_GET, $_POST, or equivalent).
  • Targeted code reviews focusing on the parameter handler and booking-related scripts such as book_car.php, checking for prepared statement usage and validation routines.
  • Web application firewall (WAF) policies tuned to detect anomalous or injection-like patterns in parameters such as fname.
  • Security testing (SAST/DAST) as part of CI/CD pipelines to automatically identify SQL injection patterns and regression issues in future changes.

Sources

SourceLink
github.comgithub.com/eqiya17/collection-of-vulnerabilities/issues/12
vuldb.comvuldb.com/submit/785863
vuldb.comvuldb.com/vuln/355422
vuldb.comvuldb.com/vuln/355422/cti

Frequently asked

questions

The issue is remotely exploitable wherever /book_car.php is reachable over the network, and public exploit code increases the likelihood of automated or opportunistic attacks.

Not necessarily; if the booking function is accessible to unauthenticated users, the attack can be executed without login. If booking is gated behind authentication, only users with access to that functionality can attempt exploitation.

Refactor database interactions to use parameterized queries or prepared statements exclusively, and ensure the parameter handler never concatenates raw input into SQL statements.

Adopt a secure coding standard that bans dynamic SQL concatenation, enforce input validation for all user-supplied fields, and integrate automated security testing and code reviews focused on injection risks into the development lifecycle.

Find out what's already
exploitable in your codebase.