<?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>Middleware-Bypass — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/middleware-bypass/</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/tags/middleware-bypass/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></channel></rss>