Severity:

HIGH RISK

(7.3)

SQL Injection in SearchResultOneway.php of Simple Flight

CVE-2026-3735

Analyzed

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

Simple Flight Ticket Booking System 1.0 contains a SQL injection vulnerability in the SearchResultOneway.php component, where the from parameter is incorporated into database queries without proper sanitization.

A remote attacker can manipulate this parameter to inject arbitrary SQL, potentially accessing or modifying booking data and other sensitive information.

Affected context

The vulnerability occurs within the web-based Simple Flight Ticket Booking System 1.0, specifically in functionality handled by SearchResultOneway.php.

It manifests when user-supplied input in the from parameter is used to construct SQL queries, likely as part of the one-way flight search feature.

The issue is present when the application relies on dynamic query building without enforcing strong server-side validation, parameterization, or output encoding for this parameter.

Exploit preconditions

  • Attack surface: Public-facing web interface for flight search (HTTP request to SearchResultOneway.php).
  • Required access: Network access to the application; no authenticated session may be required if the search function is public.
  • Trigger point: Submission of a crafted from parameter value in a request that reaches SearchResultOneway.php and is interpolated into SQL.
  • Why exploitation is possible: The application appears to concatenate the from parameter directly into SQL statements without using prepared statements or robust input handling, enabling injection of attacker-controlled SQL fragments.

Why this happens

The underlying issue is unsafe construction of SQL queries that directly embed user input, aligning with CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Instead of binding the from parameter as a typed parameter in a prepared statement, the code likely concatenates raw request data into query strings, trusting that the input is a simple location or airport name.

This dynamic query-building pattern, combined with a lack of input neutralization and schema-aware validation, enables attackers to alter the intended query logic and execute arbitrary SQL commands under the application's database privileges.

The presence of CWE-74: Improper Neutralization of Special Elements in Output reflects the broader failure to correctly handle special characters in data incorporated into structured contexts, in this case SQL statements.

Potential impact

  • Retrieval of sensitive passenger or booking information stored in the database.
  • Modification or deletion of flight bookings and related records.
  • Creation of fraudulent bookings or manipulation of pricing or availability data.
  • Bypass of application-level access controls enforced at the query layer.
  • Potential compromise of application integrity and availability through destructive SQL (e.g., dropping or truncating tables).

General mitigation guidance

Mitigation should focus on eliminating direct string concatenation of user input into SQL queries and enforcing strict handling of structured data:

  • Use parameterized queries or prepared statements for all database access paths that incorporate user-supplied values, including search parameters like from.
  • Apply allowlist-based validation on search inputs, constraining values to expected formats (e.g., airport codes, city names) and rejecting malformed or unexpected patterns.
  • Centralize database access through a data access layer that enforces safe query construction patterns by default.
  • Limit database privileges for the application account to only the operations strictly required (e.g., avoid granting schema-altering permissions).
  • Implement consistent encoding and neutralization rules when embedding user data into structured contexts such as SQL, logs, or other outputs.

How teams detect issues like this

Detection efforts can combine code-level inspection with runtime testing:

  • Use static analysis tools configured with rules targeting dynamic SQL construction and concatenation of request parameters, especially in SearchResultOneway.php and related search logic.
  • During code review, flag any occurrence of raw $_GET/$_POST/$_REQUEST variables or similar inputs being used directly in query strings.
  • Implement security testing (including automated DAST) that submits tampered from values to identify potential injection behaviors and unexpected error responses.
  • Add logging for anomalous query patterns and input values, and monitor database logs for suspicious queries that include SQL meta-characters or unexpected constructs.

Sources

SourceLink
code-projects.orgcode-projects.org/
github.comgithub.com/6Justdododo6/CVE/issues/10
vuldb.comvuldb.com/?ctiid.349713
vuldb.comvuldb.com/?id.349713
vuldb.comvuldb.com/?submit.767396

Frequently asked

questions

Yes. An attacker who can send HTTP requests to the Simple Flight Ticket Booking System's search endpoint that uses SearchResultOneway.php can attempt to exploit the SQL injection remotely.

Typically, only network access to the vulnerable endpoint is required. If the search function is exposed without authentication, no valid user account is necessary to launch an attack.

The most robust fix is to refactor all affected queries to use parameterized queries or prepared statements, combined with strict validation of the from parameter against known patterns or allowed values, eliminating any direct concatenation of user input in SQL.

Adopt a development standard that prohibits dynamic SQL string building with user input, mandate the use of safe database access APIs, integrate security-focused code review and static analysis into the CI pipeline, and provide developer training on injection-resistant coding practices.

Find out what's already
exploitable in your codebase.