CVE-2026-42548

Flight: Reflected XSS via unvalidated JSONP callback in Flight::jsonp()

Published May 13, 2026 CVSS 4.0 · 8.6 High EPSS < 1% KEV · Not listed
Description
Flight is an extensible micro-framework for PHP. Prior to 3.18.1, 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. This vulnerability is fixed in 3.18.1.

Analysis

AI-generated

Technical impact

Flight, an extensible micro‑framework for PHP, contains a reflected cross‑site scripting flaw in its JSONP handling. The implementation concatenates the ?jsonp= query value directly into a JavaScript response without validating that it is a legal identifier, allowing an attacker to inject arbitrary code that executes in the context of the receiving browser. This can lead to session hijacking, credential theft, defacement, or other client‑side compromise. The weakness is classified as CWE‑79, reflected XSS.

Affected Systems

The flaw affects the FlightPHP core micro‑framework for PHP. All versions released before 3.18.1 are vulnerable; fixes are included in release 3.18.1 and later. Users of older releases must verify their current version and plan a corrective change accordingly.

Risk and Exploitability

The CVSS score of 8.6 indicates a high severity vulnerability that can be exploited remotely. EPSS data is not available and the flaw is not listed in the KEV catalog, but the lack of protection allows an attacker to craft a URL with an arbitrary callback name (e.g., ?jsonp=alert(1)) that will run in any victim’s browser. Since no authentication is required and the payload can be embedded in a link, the exploitation path is trivially achievable for malicious actors or automated scanners.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Flight::core version 3.18.1 or later.
  • If an upgrade is not possible, sanitize the JSONP callback parameter so it contains only a valid JavaScript identifier, or disable JSONP support entirely on vulnerable endpoints.
  • Deploy a Web Application Firewall or enforce a Content Security Policy that blocks unexpected script execution from JSONP responses.

Generated by OpenCVE AI on May 13, 2026 at 21:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-fcx8-ph5r-mxr4 Flight has reflected XSS through an unvalidated JSONP callback in Flight::jsonp()
History
Type Values Removed Values Added
First Time appeared Flightphp
Flightphp core
Vendors & Products Flightphp
Flightphp core
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Flight is an extensible micro-framework for PHP. Prior to 3.18.1, 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. This vulnerability is fixed in 3.18.1.
Title Flight: Reflected XSS via unvalidated JSONP callback in Flight::jsonp()
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 8.6, 'vector': '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 14, 2026, 12:32 PM
Reserved
Apr 28, 2026, 4:56 PM
Status
Deferred
Published
May 13, 2026, 8:16 PM
Modified
Oct 26, 2026, 2:10 PM