Skip to main content

Flight PHP CVE-2026-42550

HIGH
SQL Injection (CWE-89)
2026-05-06 https://github.com/flightphp/core GHSA-xwqr-rcqg-22mr
8.8
CVSS 3.1 · Vendor: https://github.com/flightphp/core
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Authenticated access to registration/data endpoint
  2. Delivery
    Craft JSON payload with malicious array keys
  3. Exploit
    POST request triggers SimplePdo::insert()
  4. Install
    Malicious key concatenated into SQL column identifier
  5. C2
    SQL comment truncates intended query
  6. Execute
    Injected SQL executes with controlled values
  7. Impact
    Administrative account created or sensitive data modified

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Application must use Flight PHP framework version < 3.18.1 with SimplePdo database helpers. The vulnerable code pattern requires the application to forward user-controlled associative arrays to SimplePdo::insert(), update(), or delete() methods-specifically, passing request payload data shapes without prior column name validation. The documented and common pattern $db->insert('users', $request->data->getData()) on signup/registration endpoints is the primary exposure. Remote network access to the vulnerable endpoint is required (AV:N). Attacker must have low-privilege authenticated access (PR:L), such as the ability to create a user account or submit data modification requests. No user interaction is required (UI:N). Applications hardcoding column names in static arrays before calling SimplePdo methods are NOT vulnerable-the attack surface is limited to dynamic data-shape forwarding. The $where parameter injection in update() and delete() methods is exploitable with any user input reaching those parameters. Default Flight PHP installations with SimplePdo usage are vulnerable; no special configuration disables the flaw. Exploitation is not limited by platform (SQLite, MySQL, PostgreSQL all affected as the vulnerability is pre-PDO at the query construction layer).

Impact

Real-world risk is HIGH for applications using the documented pattern of forwarding request payloads to SimplePdo methods. CVSS 8.8 (AV:N/AC:L/PR:L/UI:N) indicates network-accessible exploitation with low complexity requiring only low-privilege authentication. No EPSS or KEV data provided, suggesting no confirmed mass exploitation yet, but the GitHub advisory with working proof-of-concept and commit diff confirms both vulnerability and patch. Attack complexity is genuinely low: a single crafted JSON request with malicious object keys achieves privilege escalation. The common framework pattern $db->insert('users', $request->data->getData()) on signup endpoints creates an instant administrative backdoor-high business impact despite requiring authenticated access. Scope is unchanged (S:U) but confidentiality, integrity, and availability impacts are all high (C:H/I:H/A:H) due to full database control post-exploitation. The availability of a clear remediation path (upgrade to 3.18.1) and the specificity of affected code paths (three methods in one class) make this actionable. The primary risk qualifier is whether applications actually pass user-controlled array shapes to these helpers; codebases using static column lists are not vulnerable, but the framework documentation encourages the vulnerable pattern. SSVC: exploitation is public (POC exists), automatable (single HTTP request), technical impact is total (arbitrary SQL execution). Priority for Flight PHP deployments with user registration or data modification endpoints.

Exploit ScenarioDerived

An attacker registers a new user account on a Flight PHP application whose signup endpoint calls $db->insert('users', $request->data->getData()). The attacker crafts a JSON POST request with the body {"name, is_admin) VALUES (?, 1);-- ": "attacker_injected"}. The SimplePdo::insert() method extracts array keys as column names, generating INSERT INTO users (name, is_admin) VALUES (?, 1);-- ) VALUES (?). The SQL comment (--) truncates the remainder, leaving INSERT INTO users (name, is_admin) VALUES (?, 1) with a single placeholder bound to 'attacker_injected'. The database inserts a row with name='attacker_injected' and is_admin=1, granting immediate administrative privileges. The attacker logs in as the newly created admin user and accesses restricted functionality, exfiltrates sensitive data, or modifies other users' privileges. The proof-of-concept demonstrated this live on SQLite with observable database state changes.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 06, 2026

SQL injection in Flight PHP framework's SimplePdo database helpers allows privilege escalation through crafted array keys. Applications forwarding user-controlled request data shapes to insert(), update(), or delete() methods enable remote authenticated attackers to inject arbitrary SQL, create administrative accounts, modify sensitive columns, or exfiltrate data. Vendor-released patch in version 3.18.1 validates identifiers with safe-identifier regex. Publicly available proof-of-concept demonstrates privilege escalation via malicious JSON request keys. Researcher @Rootingg discovered and reported through GitHub Security Advisory GHSA-xwqr-rcqg-22mr.

RemediationAI

Upgrade flightphp/core to version 3.18.1 or later immediately. Update composer.json to require 'flightphp/core: ^3.18.1' and run composer update. The patch (commit b8dd23aaa828cb289fa3c84e75b2a3717cab50b0) introduces requireSafeIdentifier() validation for table names and column identifiers before SQL interpolation, blocking injection attempts. Verify the upgrade by checking vendor/flightphp/core/flight/database/SimplePdo.php contains the new requireSafeIdentifier() method. For environments unable to upgrade immediately, implement strict input validation before calling SimplePdo methods: whitelist allowed column names, reject any $data array keys not matching [A-Za-z_][A-Za-z0-9_]*, and sanitize $where clauses (though the framework documents $where as raw SQL, treat it as untrusted input). Alternatively, replace SimplePdo calls with direct parameterized PDO queries using quoted identifiers via PDO::quote() or a safe identifier-quoting function, though this requires code changes. Advisory and patch details available at https://github.com/flightphp/core/security/advisories/GHSA-xwqr-rcqg-22mr and https://github.com/flightphp/core/commit/b8dd23aaa828cb289fa3c84e75b2a3717cab50b0.

Affected Packages

composer flightphp/core fix: 3.18.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in composer

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Flight PHP is a lightweight PHP micro-framework. The vulnerability exists in the SimplePdo database abstraction layer (flight/database/SimplePdo.php), a convenience wrapper over PHP's PDO. CWE-89 (SQL Injection) occurs because SimplePdo::insert(), update(), and delete() concatenate the $table parameter and all keys from the $data associative array directly into SQL strings using sprintf() and implode() without identifier quoting or validation. While placeholder binding protects VALUES, the column identifiers derived from array_keys($data) remain unquoted. PHP associative arrays allow arbitrary string keys, so user input shapes like {'malicious; DROP TABLE--': 'value'} pass through JSON deserialization into array keys, then directly into column positions in INSERT/UPDATE statements. The $where parameter in update() and delete() is documented as raw SQL but lacks guardrails. The patch introduces requireSafeIdentifier() enforcing the safe pattern ^[A-Za-z_][A-Za-z0-9_]*$ before interpolation, typical of SQL identifier validation but absent in the original design. CPE pkg:composer/flightphp_core indicates Composer/Packagist distribution.

Know when PHP gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/flightphp/core) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Primary rating from Vendor (https://github.com/flightphp/core) · only source for this CVE.

CVSS VectorVendor: https://github.com/flightphp/core

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

SimplePdo::insert(), SimplePdo::update(), and SimplePdo::delete() build SQL statements by concatenating the $table argument and the keys of the $data array directly into the query, with no identifier quoting and no validation. When an application forwards user-controlled data shapes to these helpers - a common and documented pattern, e.g. $db->insert('users', $request->data->getData()) - an attacker can inject arbitrary SQL by crafting malicious array keys.

Affected code

flight/database/SimplePdo.php:

php
// insert (≈ 320-373)
$sql = sprintf(
    "INSERT INTO %s (%s) VALUES (%s)",
    $table,                            // raw concat
    implode(', ', $columns),           // raw array_keys($data)
    implode(', ', $placeholders)
);

// update (≈ 397-409)
$sets[] = "$column = ?";               // $column = user-controlled key
$sql = sprintf(
    "UPDATE %s SET %s WHERE %s",
    $table,                            // raw
    implode(', ', $sets),
    $where
);

// delete (≈ 427-429)
$sql = "DELETE FROM $table WHERE $where";

No identifier-quoting helper exists; neither $table nor the data keys are validated against a safe-identifier pattern.

Proof of concept

A controller does:

php
$db->insert('users', $request->data->getData());

The attacker sends the JSON body:

json
{"name, is_admin) VALUES (?, 1);-- ": "attacker_injected"}

Generated SQL:

sql
INSERT INTO users (name, is_admin) VALUES (?, 1);-- ) VALUES (?)

After the -- comment, the effective statement INSERT INTO users (name, is_admin) VALUES (?, 1) binds the single placeholder 'attacker_injected', yielding a row with is_admin = 1.

Reproduced live on an in-memory sqlite database (testproj/sqli_live2.php):

id=1  name=alice              is_admin=0
id=2  name=attacker_injected  is_admin=1   <-- injected insert

UPDATE injection via the $where parameter was also reproduced: $db->update('users', ['is_admin' => 1], "id = 1 OR 1=1") flips admin on every row.

Impact

  • Privilege escalation on any signup / register endpoint that forwards request data to insert() (attacker creates an administrative account in a single request).
  • Arbitrary column write through update() keys.
  • Data destruction and exfiltration through the $where parameter (DELETE FROM users WHERE 1=1, UNION-based exfil, etc.).

Patch (fixed in 3.18.1, commit b8dd23a)

A new requireSafeIdentifier() helper validates table names and column names against ^[A-Za-z_][A-Za-z0-9_]*$ before they are interpolated into the SQL string. The $where parameter remains raw SQL as documented - parameterized values passed alongside it continue to be bound safely.

Credit

Discovered by @Rootingg.

Executive ViewAI

Why It Matters

Flight PHP framework versions prior to 3.18.1 contain a SQL injection vulnerability in database helpers that allows authenticated users to escalate privileges, create administrative accounts, or exfiltrate sensitive data through crafted request parameters. Organizations running affected Flight versions with user-controlled input passed to database operations face immediate risk of unauthorized account creation and data compromise.

Business Impact: High
Compensating Controls

Apply vendor patch to Flight PHP framework version 3.18.1 or later. If immediate patching is not possible: (1) restrict database operation methods to authenticated users with minimal required privileges, (2) implement database activity monitoring to detect anomalous SQL patterns, (3) enforce strict parameterized queries and disable dynamic identifier construction, (4) apply Web Application Firewall (WAF) rules to block SQL injection patterns in request keys, and (5) conduct immediate code review of all database helper usage to identify vulnerable code paths.

Threat Intelligence Overview

EPSS Score
0.0%
Top 85% exploitable
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

Affected Products (CPE)CVE.org

pkg:composer/flightphp_core

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it

CVE-2012-1823 CRITICAL POC
9.8 May 11

sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy