<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shady Farouk</title>
    <description>The latest articles on DEV Community by Shady Farouk (@shady_farouk_29a336d2aa9f).</description>
    <link>https://dev.to/shady_farouk_29a336d2aa9f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4285478%2F897fb0dc-df89-4fc5-8865-896e443f9360.png</url>
      <title>DEV Community: Shady Farouk</title>
      <link>https://dev.to/shady_farouk_29a336d2aa9f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shady_farouk_29a336d2aa9f"/>
    <language>en</language>
    <item>
      <title>CSRF is Dead? Only if You Believe the Marketing: Bypassing SameSite in 2026</title>
      <dc:creator>Shady Farouk</dc:creator>
      <pubDate>Sat, 05 Dec 2026 22:04:59 +0000</pubDate>
      <link>https://dev.to/shady_farouk_29a336d2aa9f/csrf-is-dead-only-if-you-believe-the-marketing-bypassing-samesite-in-2026-4g73</link>
      <guid>https://dev.to/shady_farouk_29a336d2aa9f/csrf-is-dead-only-if-you-believe-the-marketing-bypassing-samesite-in-2026-4g73</guid>
      <description>&lt;h1&gt;
  
  
  CSRF is Dead? Only if You Believe the Marketing: Bypassing SameSite in 2026
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Published 2026-12-05 | Bug Bounty Series&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Quick Takeaway
&lt;/h2&gt;

&lt;p&gt;SameSite cookies didn't kill CSRF; they just raised the barrier to entry. If you’re still looking for classic &lt;code&gt;&amp;lt;form&amp;gt;&lt;/code&gt; submissions on modern apps, you’re failing—the real money is in finding GET-based state changes, SameSite=None misconfigurations in microservices, and exploiting top-level navigation quirks that "Lax" cookies still allow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Still Matters in 2026
&lt;/h2&gt;

&lt;p&gt;I remember back in 2020 when Chrome pushed the "Lax by default" update. Half the bug bounty community acted like the sky was falling and CSRF was officially a "won't fix" legacy bug. Fast forward to 2026, and guess what? I’m still pulling five-figure bounties for account takeovers via CSRF. &lt;/p&gt;

&lt;p&gt;Why? Because the web is messy. We’ve moved into an era of massive microservice architectures where developers are constantly fighting with cross-domain authentication. To get that legacy partner widget or that complex OAuth flow working, devs frequently flip the &lt;code&gt;SameSite=None; Secure&lt;/code&gt; switch because they can't be bothered to fix the underlying architecture. &lt;/p&gt;

&lt;p&gt;Moreover, the "Lax" default is a psychological trap. It gives developers a false sense of security. They think, "The browser handles it now," so they stop implementing anti-CSRF tokens. That’s exactly where we strike. If I find a state-changing action that accepts a &lt;code&gt;GET&lt;/code&gt; request, or if I can find an open redirect on the target domain, your &lt;code&gt;SameSite=Lax&lt;/code&gt; protection is basically tissue paper.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Actually Works
&lt;/h2&gt;

&lt;p&gt;To hunt this effectively, you have to understand the nuances of the &lt;code&gt;SameSite&lt;/code&gt; attribute. It’s not binary.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Strict&lt;/strong&gt;: The cookie is only sent if the request originates from the &lt;em&gt;exact&lt;/em&gt; same site. Great, but it breaks usability (e.g., clicking a link from an email won't keep you logged in).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Lax&lt;/strong&gt;: The new default. Cookies aren't sent on "cross-site" subrequests (like images or frames) but &lt;em&gt;are&lt;/em&gt; sent when a user navigates to the URL via a top-level transition (a link click). Crucially, it only works for "safe" HTTP methods like &lt;code&gt;GET&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;None&lt;/strong&gt;: The "Please hack me" setting. Cookies are sent everywhere, provided the connection is HTTPS.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The root cause of 90% of my CSRF finds lately is &lt;strong&gt;Method Swapping&lt;/strong&gt;. A developer builds an API endpoint to update a user's email. They test it with a &lt;code&gt;POST&lt;/code&gt; request and a JSON body. But, because they used a generic framework like Express or an old version of Spring without strict method validation, the backend happily accepts the same parameters via a &lt;code&gt;GET&lt;/code&gt; query string. &lt;/p&gt;

&lt;p&gt;If the backend accepts a &lt;code&gt;GET&lt;/code&gt; for a state-changing action, &lt;code&gt;SameSite=Lax&lt;/code&gt; is bypassed the moment I get a user to click a link.&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding It on Real Targets
&lt;/h2&gt;

&lt;p&gt;Stop running automated scanners. They miss the context. Here’s my personal methodology when I'm hitting a high-value target on HackerOne.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The "Method Flip" Test
&lt;/h3&gt;

&lt;p&gt;Every time you see a &lt;code&gt;POST&lt;/code&gt; request that changes state (updating a profile, adding an SSH key, changing a password), try to send it as a &lt;code&gt;GET&lt;/code&gt;. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Change the method in Burp.&lt;/li&gt;
&lt;li&gt;  Move the parameters to the URL.&lt;/li&gt;
&lt;li&gt;  Check if the server responds with a 200 OK. If it does, and the data changed? You’ve got a live one.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The "SameSite=None" Audit
&lt;/h3&gt;

&lt;p&gt;Fire up Burp Suite and look at the &lt;code&gt;Set-Cookie&lt;/code&gt; headers during login. Are any critical session cookies (JWTs, SIDs) explicitly marked &lt;code&gt;SameSite=None&lt;/code&gt;? &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Commonly found on sites that offer "Embeddable" versions of their app.&lt;/li&gt;
&lt;li&gt;  Check if the site has a "Sandbox" or "Developer" domain. Often the main site is hardened, but the &lt;code&gt;api.target.com&lt;/code&gt; uses &lt;code&gt;None&lt;/code&gt; to support third-party integrations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Tracking Token Leakage
&lt;/h3&gt;

&lt;p&gt;Does the site use an &lt;code&gt;anti-csrf-token&lt;/code&gt;? If so, where is it reflected? If the token is leaked in a &lt;code&gt;GET&lt;/code&gt; request (like a referrer header) or via an XSS-lite (like an HTML injection), the CSRF protection is void.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recon Checklist:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Identify all cookies without the &lt;code&gt;SameSite&lt;/code&gt; attribute (they'll default to Lax, but it’s good to know).&lt;/li&gt;
&lt;li&gt;[ ] Map every endpoint that accepts &lt;code&gt;GET&lt;/code&gt; for sensitive actions.&lt;/li&gt;
&lt;li&gt;[ ] Check for "Toggle" buttons (Dark mode is boring, but "Disable 2FA" is a goldmine).&lt;/li&gt;
&lt;li&gt;[ ] Look for &lt;code&gt;Access-Control-Allow-Origin: *&lt;/code&gt; on API endpoints; it often hints at a loose security posture.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Exploitation Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Technique 1: The GET-to-POST Conversion (Lax Bypass)
&lt;/h3&gt;

&lt;p&gt;If you found a &lt;code&gt;POST&lt;/code&gt; endpoint that also accepts &lt;code&gt;GET&lt;/code&gt;, your payload is a simple link. I like to hide these in "Click here to see your reward" bait.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Payload:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://target.com/settings/update_email?email=hacker@evil.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Claim Reward&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since this is a top-level navigation, the &lt;code&gt;SameSite=Lax&lt;/code&gt; cookies &lt;em&gt;will&lt;/em&gt; be sent. The user clicks, the email changes, the account is yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  Technique 2: The "Lax-plus-POST" 2-Minute Window
&lt;/h3&gt;

&lt;p&gt;This is a bit of a "Deep Magic" trick. For a long time, Chromium had a "Lax + POST" intervention. It treated cookies as &lt;code&gt;Lax&lt;/code&gt;, but for the first 2 minutes after a cookie was set, it would actually allow &lt;code&gt;POST&lt;/code&gt; requests to send those cookies. &lt;/p&gt;

&lt;p&gt;While many browsers have tightened this, you still find legacy environments or specific browser versions (especially on mobile) where this works. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Force the user to re-authenticate (maybe via a fake "Session Expired" popup).&lt;/li&gt;
&lt;li&gt; Immediately trigger a hidden form &lt;code&gt;POST&lt;/code&gt; via JS.&lt;/li&gt;
&lt;li&gt; The browser might include the "Lax" cookies because they are "fresh."&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Technique 3: The Open Redirect Bridge
&lt;/h3&gt;

&lt;p&gt;If the target has an open redirect, you can sometimes use it to "reset" the context of the request.&lt;br&gt;
&lt;code&gt;https://target.com/redirect?url=https://target.com/api/delete_account&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If the API endpoint checks the &lt;code&gt;Referer&lt;/code&gt; header as a defense, the open redirect makes it look like the request came from their own domain. This is a classic "Chain for Impact" move.&lt;/p&gt;


&lt;h2&gt;
  
  
  Bypassing Common Defenses
&lt;/h2&gt;
&lt;h3&gt;
  
  
  1. Bypassing the Origin/Referer Check
&lt;/h3&gt;

&lt;p&gt;Many devs rely on checking the &lt;code&gt;Origin&lt;/code&gt; or &lt;code&gt;Referer&lt;/code&gt; header. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The Null Origin&lt;/strong&gt;: Try making the request from a sandboxed iframe.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;iframe&lt;/span&gt; &lt;span class="na"&gt;sandbox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"allow-scripts allow-forms allow-same-origin"&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"data:text/html,..."&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Sometimes the server sees the origin as &lt;code&gt;null&lt;/code&gt; and has a whitelist that accidentally allows it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The "Double Domain" trick&lt;/strong&gt;: If they check if the referer &lt;em&gt;contains&lt;/em&gt; &lt;code&gt;target.com&lt;/code&gt;, host your exploit on &lt;code&gt;target.com.evil.com&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  2. The Content-Type Shuffle
&lt;/h3&gt;

&lt;p&gt;If the server looks for &lt;code&gt;application/json&lt;/code&gt; to trigger its CSRF protection, try sending &lt;code&gt;text/plain&lt;/code&gt; or &lt;code&gt;application/x-www-form-urlencoded&lt;/code&gt;. If the backend parser is lazy (looking at you, PHP and older Node modules), it might still parse the body even if the &lt;code&gt;Content-Type&lt;/code&gt; is "wrong."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payload for &lt;code&gt;text/plain&lt;/code&gt; JSON:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://target.com/api/update"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"POST"&lt;/span&gt; &lt;span class="na"&gt;enctype&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text/plain"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'{"email":"hacker@evil.com", "ignore":"'&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'"}'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The server sees: &lt;code&gt;{"email":"hacker@evil.com", "ignore":"="}&lt;/code&gt;. That trailing &lt;code&gt;=&lt;/code&gt; is valid JSON structure if handled correctly by the parser.&lt;/p&gt;




&lt;h2&gt;
  
  
  Writing the Report
&lt;/h2&gt;

&lt;p&gt;When you report CSRF in 2026, you have to be loud about the impact. If you just say "I can change the user's nickname," the triager will give you a P4 and $50. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Structure it like this:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Title:&lt;/strong&gt; Full Account Takeover via CSRF (SameSite=Lax Bypass) on /api/user/settings&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Severity:&lt;/strong&gt; High/Critical (depending on the action).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Exploitability:&lt;/strong&gt; "High - Requires single user interaction (click)."&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Impact:&lt;/strong&gt; "By inducing a victim to click a specially crafted link, an attacker can change the email address associated with the account. Since the application does not require the current password for email changes, this leads to a full Account Takeover (ATO) by initiating a password reset."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Proof of Concept:&lt;/strong&gt;&lt;br&gt;
Provide a clean HTML file. Use &lt;code&gt;document.forms[0].submit()&lt;/code&gt; for POSTs, or a simple &lt;code&gt;window.location&lt;/code&gt; for GETs. Make it look professional.&lt;/p&gt;




&lt;h2&gt;
  
  
  Payout Expectations
&lt;/h2&gt;

&lt;p&gt;CSRF payouts have actually &lt;em&gt;increased&lt;/em&gt; because they are harder to find now. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Minor State Change (Username, preferences):&lt;/strong&gt; $500 - $1,500.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Sensitive Action (Delete account, disable MFA):&lt;/strong&gt; $2,500 - $7,000.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Full ATO (Email change, Password change):&lt;/strong&gt; $10,000 - $25,000+ on top-tier programs like Meta, Google, or major FinTechs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find a CSRF on a multi-billion dollar crypto exchange that lets you add a withdrawal address? You're looking at a life-changing bounty.&lt;/p&gt;

&lt;p&gt;The takeaway? Don't listen to the "CSRF is dead" noise. As long as developers are pressured to ship features fast, they will keep making the same mistakes with cookie attributes and method validation. &lt;/p&gt;

&lt;p&gt;Keep digging. The bugs are there.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Happy hunting.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bugbounty</category>
      <category>cybersecurity</category>
      <category>hacking</category>
      <category>pentesting</category>
    </item>
    <item>
      <title>Beyond Lax: Hunting State-Changing CSRF in a SameSite-Default World</title>
      <dc:creator>Shady Farouk</dc:creator>
      <pubDate>Sat, 05 Dec 2026 22:02:58 +0000</pubDate>
      <link>https://dev.to/shady_farouk_29a336d2aa9f/beyond-lax-hunting-state-changing-csrf-in-a-samesite-default-world-jkg</link>
      <guid>https://dev.to/shady_farouk_29a336d2aa9f/beyond-lax-hunting-state-changing-csrf-in-a-samesite-default-world-jkg</guid>
      <description>&lt;h1&gt;
  
  
  Beyond Lax: Hunting State-Changing CSRF in a SameSite-Default World
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;Published 2026-12-05 | Bug Bounty Series&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Quick Takeaway
&lt;/h2&gt;

&lt;p&gt;Contrary to what the "CSRF is dead" crowd will tell you, Cross-Site Request Forgery is still a goldmine in 2026. While &lt;code&gt;SameSite=Lax&lt;/code&gt; by default has killed the "low-hanging fruit" POST attacks, developers still regularly shoot themselves in the foot by using GET for state changes, misconfiguring &lt;code&gt;SameSite=None&lt;/code&gt;, or leaving legacy "Lax + POST" windows open. If you can find a top-level navigation that triggers an action, you've got a P1.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Still Matters in 2026
&lt;/h2&gt;

&lt;p&gt;I remember back in 2016 when CSRF was everywhere. You’d find a profile update page, drop a hidden form in a PoC, and boom—$2,000. Then Google and Apple decided to actually care about security, and &lt;code&gt;SameSite=Lax&lt;/code&gt; became the default browser behavior. &lt;/p&gt;

&lt;p&gt;Fast forward to 2026. The "Privacy Sandbox" and "Related Website Sets" have complicated the cookie landscape, but the core issue remains: &lt;strong&gt;Browsers are built for convenience, not isolation.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Modern frameworks like Next.js or Nuxt often abstract away the cookie handling, leading developers to assume the framework "just handles CSRF." I’ve seen countless "modern" apps where the devs disabled CSRF protection because it interfered with their API design, or they opted for &lt;code&gt;SameSite=None&lt;/code&gt; to support some obscure legacy integration without realizing they just opened the door for me.&lt;/p&gt;

&lt;p&gt;Just last month, I pulled a $6k bounty from a major fintech app because they used a &lt;code&gt;GET&lt;/code&gt; request for a "One-Click Quick Pay" feature. They thought &lt;code&gt;Lax&lt;/code&gt; protected them. It didn't. &lt;/p&gt;




&lt;h2&gt;
  
  
  How It Actually Works
&lt;/h2&gt;

&lt;p&gt;Let’s get technical. The &lt;code&gt;SameSite&lt;/code&gt; attribute controls when cookies are sent with cross-site requests. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Strict:&lt;/strong&gt; Cookies are only sent if the request originates from the same site. It’s the gold standard, but it breaks user experience (e.g., clicking a link from an email won't keep you logged in).&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Lax:&lt;/strong&gt; This is the 2026 default. Cookies aren't sent on "unsafe" cross-site requests (like POST), &lt;strong&gt;but they are sent on top-level navigations using safe HTTP methods (GET).&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;None:&lt;/strong&gt; Cookies are sent everywhere. Requires the &lt;code&gt;Secure&lt;/code&gt; flag.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The root cause of 90% of the CSRF I find today is &lt;strong&gt;State-Changing GETs.&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Think about it: If a developer uses a &lt;code&gt;GET&lt;/code&gt; request to delete a user or change an email address (don't laugh, it happens constantly in "internal" admin panels), &lt;code&gt;SameSite=Lax&lt;/code&gt; does absolutely nothing to stop me. A simple &lt;code&gt;&amp;lt;a href="..."&amp;gt;&lt;/code&gt; or a &lt;code&gt;window.location&lt;/code&gt; redirect is a top-level navigation. The browser says, "Oh, the user clicked a link! I should send their cookies."&lt;/p&gt;

&lt;p&gt;Here is the HTTP reality:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="na"&gt;GET /api/v1/user/delete?id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1337&lt;/span&gt; &lt;span class="no"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mf"&gt;1.1&lt;/span&gt;
&lt;span class="nc"&gt;Host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;victim&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="na"&gt;Cookie: session&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;xyz123&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nc"&gt;SameSite&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;Lax&lt;/span&gt;
&lt;span class="nc"&gt;Referer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//attacker.com/&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser sends that session cookie because it’s a GET request and a top-level navigation. The server sees a valid session, processes the &lt;code&gt;id=1337&lt;/code&gt;, and the account is gone.&lt;/p&gt;




&lt;h2&gt;
  
  
  Finding It on Real Targets
&lt;/h2&gt;

&lt;p&gt;When I start a new program, I don’t just run a scanner. I look for where the logic is fragile. &lt;/p&gt;

&lt;h3&gt;
  
  
  My Hunting Methodology:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;The "Method Swap" Test:&lt;/strong&gt; Take a standard POST request (like updating a profile). Change it to a GET. Does the server still process it? Many REST APIs use generic routers that don't strictly enforce the HTTP verb.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The "Cookie Stripper":&lt;/strong&gt; Use Burp Suite’s "Match and Replace" to remove CSRF tokens from your requests. If the request still succeeds, the token is either not validated or it’s optional.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;The "Lax + POST" Window:&lt;/strong&gt; Chromium (and by extension, Edge/Brave) still has a "Lax + POST" intervention. For the first 2 minutes after a cookie is set, it might be sent on a cross-site POST request if it doesn't have a &lt;code&gt;SameSite&lt;/code&gt; attribute explicitly set. I look for login/refresh flows that set new cookies.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Deep-Link Analysis:&lt;/strong&gt; Check mobile-web integrations. Often, &lt;code&gt;GET&lt;/code&gt; requests used for deep-linking into an app are vulnerable if accessed via a mobile browser.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Recon Checklist:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  [ ] Search for &lt;code&gt;GET&lt;/code&gt; requests with parameters like &lt;code&gt;action=&lt;/code&gt;, &lt;code&gt;delete=&lt;/code&gt;, &lt;code&gt;update=&lt;/code&gt;, or &lt;code&gt;admin=&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;  [ ] Check for &lt;code&gt;SameSite=None&lt;/code&gt; in the &lt;code&gt;Set-Cookie&lt;/code&gt; headers using Burp's "Columns" feature.&lt;/li&gt;
&lt;li&gt;  [ ] Look for &lt;code&gt;X-HTTP-Method-Override&lt;/code&gt; or &lt;code&gt;_method&lt;/code&gt; parameters. Can you turn a POST into a GET?&lt;/li&gt;
&lt;li&gt;  [ ] Identify sensitive actions that don't require a password confirmation (Email change, MFA disable, API key regeneration).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Exploitation Techniques
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The Top-Level Navigation (The Lax Bypass)
&lt;/h3&gt;

&lt;p&gt;If the state-change is a GET, don't use an &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; or an &lt;code&gt;&amp;lt;iframe&amp;gt;&lt;/code&gt;. Those are sub-resource loads, and &lt;code&gt;Lax&lt;/code&gt; &lt;em&gt;will&lt;/em&gt; block the cookies. You need a full window change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="c1"&gt;// Simple, direct, and works on Lax&lt;/span&gt;
  &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;location&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://victim.com/admin/promote?user=attacker&amp;amp;role=admin"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. The Form Submission via Window Open
&lt;/h3&gt;

&lt;p&gt;Sometimes you need to trigger a POST, and the site has &lt;code&gt;SameSite=None&lt;/code&gt; (common in legacy enterprise apps). I like to use a new window to stay stealthy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;win&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"about:blank"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"_blank"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;win&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`
    &amp;lt;form id="f" action="https://victim.com/account/update" method="POST"&amp;gt;
      &amp;lt;input type="hidden" name="email" value="hacker@evil.com"&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;script&amp;gt;document.getElementById('f').submit();&amp;lt;\/script&amp;gt;
  `&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. The "Method Override" Trick
&lt;/h3&gt;

&lt;p&gt;This is a beauty. Some frameworks (like Laravel or Ruby on Rails) allow you to override the POST method using a GET parameter. If the site is protected against POST-CSRF but allows &lt;code&gt;_method=POST&lt;/code&gt; in a GET request, you’ve bypassed &lt;code&gt;Lax&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Payload:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://victim.com/profile?_method=POST&amp;amp;email=pwned@attacker.com"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Click for free BTC&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The browser treats this as a GET (sending &lt;code&gt;Lax&lt;/code&gt; cookies), but the server treats it as a POST. Checkmate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Bypassing Common Defenses
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Empty or Duplicate Tokens
&lt;/h3&gt;

&lt;p&gt;I can't tell you how many times I've bypassed a CSRF token by just sending an empty string: &lt;code&gt;csrf_token=&lt;/code&gt;. Or better yet, try duplicating the parameter: &lt;code&gt;csrf_token=valid&amp;amp;csrf_token=&lt;/code&gt;. The server might validate the first (attacker-controlled) and the app might use the second.&lt;/p&gt;

&lt;h3&gt;
  
  
  The "Same-Site" Subdomain Takeover
&lt;/h3&gt;

&lt;p&gt;If &lt;code&gt;app.target.com&lt;/code&gt; is protected by &lt;code&gt;SameSite=Lax&lt;/code&gt;, but you find a subdomain takeover on &lt;code&gt;dev.app.target.com&lt;/code&gt;, you are now "Same-Site." You can bypass &lt;code&gt;Lax&lt;/code&gt; restrictions because the browser considers &lt;code&gt;*.target.com&lt;/code&gt; to be the same site in many contexts. Use your taken-over subdomain to host the exploit and fire a POST request to the main app. &lt;/p&gt;

&lt;h3&gt;
  
  
  JSON to URL-Encoded
&lt;/h3&gt;

&lt;p&gt;If the API expects JSON (&lt;code&gt;Content-Type: application/json&lt;/code&gt;), CSRF is usually hard because of the Preflight (OPTIONS) request. But check if the server accepts &lt;code&gt;application/x-www-form-urlencoded&lt;/code&gt;. If I can send the same data via a standard HTML form, I can bypass the CORS preflight entirely.&lt;/p&gt;




&lt;h2&gt;
  
  
  Writing the Report
&lt;/h2&gt;

&lt;p&gt;When you write this up, &lt;strong&gt;don't focus on the bug, focus on the impact.&lt;/strong&gt; A "CSRF on /api/settings" is a P3. "Complete Account Takeover via Unprotected Email Change" is a P1.&lt;/p&gt;

&lt;h3&gt;
  
  
  Template:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; &lt;br&gt;
The endpoint &lt;code&gt;[URL]&lt;/code&gt; is vulnerable to CSRF due to the lack of anti-forgery tokens and the use of state-changing GET requests, which bypasses the browser's default &lt;code&gt;SameSite=Lax&lt;/code&gt; protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps to Reproduce:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Log in to &lt;code&gt;victim.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Host the attached &lt;code&gt;exploit.html&lt;/code&gt; on a separate domain.&lt;/li&gt;
&lt;li&gt;Visit &lt;code&gt;exploit.html&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Observe that your email address on &lt;code&gt;victim.com&lt;/code&gt; has been changed without your consent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt;&lt;br&gt;
An attacker can perform an Account Takeover (ATO) by changing the victim's email address. Since the application does not require the current password for this action, the attacker can subsequently trigger a password reset and gain full control of the account.&lt;/p&gt;




&lt;h2&gt;
  
  
  Payout Expectations
&lt;/h2&gt;

&lt;p&gt;CSRF payouts vary wildly, but here’s what I’ve seen on the major platforms (HackerOne/Bugcrowd) lately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;P4 ($100 - $300):&lt;/strong&gt; CSRF on non-sensitive actions (e.g., changing "Newsletter Preferences" or "UI Theme").&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;P3 ($500 - $1,500):&lt;/strong&gt; CSRF on actions that impact data but not account security (e.g., deleting a non-critical resource, adding an item to a cart).&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;P1/P2 ($3,000 - $15,000+):&lt;/strong&gt; Full Account Takeover, changing MFA settings, or unauthorized financial transactions. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you find a CSRF on a major crypto exchange that lets you withdraw funds or change an API key, you’re looking at $20k minimum.&lt;/p&gt;




&lt;p&gt;I've been at this for over a decade. The tech changes, the headers get longer, and the browsers get smarter. But at the end of the day, there's always a developer somewhere who thinks, "I'll just use a GET request here, it's faster." &lt;/p&gt;

&lt;p&gt;Find that developer, and you’ll find your next big bounty.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Happy hunting.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bugbounty</category>
      <category>cybersecurity</category>
      <category>hacking</category>
      <category>pentesting</category>
    </item>
  </channel>
</rss>
