<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vigneshkumaroffsec on Medium]]></title>
        <description><![CDATA[Stories by Vigneshkumaroffsec on Medium]]></description>
        <link>https://medium.com/@vigneshkumaroffsec?source=rss-07ee411d0b6f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*B_-Cr5lngPqleYPrcOSuOQ.jpeg</url>
            <title>Stories by Vigneshkumaroffsec on Medium</title>
            <link>https://medium.com/@vigneshkumaroffsec?source=rss-07ee411d0b6f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 05:30:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@vigneshkumaroffsec/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Logged Out by a Link: How a GET Logout Becomes CSRF]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/logged-out-by-a-link-how-a-get-logout-becomes-csrf-ae45c984a5e5?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae45c984a5e5</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 02:12:03 GMT</pubDate>
            <atom:updated>2026-12-03T02:12:12.989Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A logout you can trigger with a plain link isn’t a convenience, it’s a vulnerability. One </em><em>GET /logout let me end another user&#39;s session just by getting their browser to load a URL. No password, no token, no access to their account. Here&#39;s how logout CSRF works, why it still ships in 2026, and how to fix it. Anonymized, from an authorized test.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*reCs4oguIeL7353oFrr6zQ.png" /></figure><p>Most people think of CSRF as “an attacker makes you transfer money” or “an attacker changes your email.” But CSRF is simpler and broader than that: it’s <strong>making a victim’s browser send a request they didn’t intend</strong>, using the authentication the browser already carries. Any state-changing action reachable that way is in scope, and that includes the humble logout button.</p><p>I was testing a lending back-office app and found its logout was a plain GET. That one detail means anyone can log anyone else out, with nothing but a link. It&#39;s a low-severity bug on its own, but it&#39;s a textbook example of a rule developers break constantly, and a useful lesson in why that rule exists. Everything here is anonymized; treat it as something to check on systems <strong>you own or are authorized to assess.</strong></p><h3>A 30-second refresher on CSRF</h3><p>Browsers attach your cookies automatically to <strong>every</strong> request to a site, including requests made by <em>other</em> sites. If you’re logged in to bank.example and visit evil.example, a hidden form or image on the evil page can fire a request to bank.example, and your browser helpfully includes your session cookie. The bank sees an authenticated request and can&#39;t tell it wasn&#39;t you.</p><p><strong>Cross-Site Request Forgery (CSRF)</strong> abuses exactly that: the server trusts the cookie, the cookie rides along automatically, and the attacker supplies the request. The defense is to require proof the request was <em>intentional</em> and came from your own site, something the attacker’s page can’t forge.</p><h3>The bug: logout on GET</h3><p>The app exposed logout like this:</p><pre>GET /logout</pre><p>Visit that URL while authenticated and your session ends. Convenient for a logout link, and fatal for security, because <strong>a GET request is the easiest thing in the world to trigger from somewhere else.</strong> A browser will fire a GET from:</p><ul><li>a link the victim clicks,</li><li>an &lt;img src=&quot;https://app.example/logout&quot;&gt; on any page, which loads automatically,</li><li>an iframe, a redirect, a prefetch, a link in an email that a client preloads.</li></ul><p>So an attacker just needs the victim’s browser to render one piece of attacker-controlled content, a forum post, a chat message, an email, a malicious or compromised page, and the embedded request to /logout fires with the victim&#39;s own session cookie attached. The server sees a valid authenticated request and ends the session.</p><pre>Victim is logged in to the app<br>        |<br>Victim loads any page containing &lt;img src=&quot;.../logout&quot;&gt;<br>        |<br>Browser sends GET /logout  (with the victim&#39;s cookie, automatically)<br>        |<br>Server terminates the victim&#39;s session<br>        |<br>Victim is bounced to the login screen</pre><p>No credentials. No token theft. No access to the victim’s account. Just a link, or a page with an image tag on it.</p><h3>Why a “just logout” bug still matters</h3><p>It’s tempting to dismiss this. The attacker can’t read data, can’t act as the victim, can’t take the account, and that’s why it’s correctly rated <strong>Low</strong>. But low isn’t nothing:</p><ul><li><strong>Disruption of time-sensitive work.</strong> In a lending back office, staff are mid-application, mid-approval, mid-disbursement. Repeated forced logouts interrupt real financial workflows and can cause lost work.</li><li><strong>Denial of service, in effect.</strong> An attacker who can keep re-triggering logout (an auto-refreshing page with the image tag) can make the app nearly unusable for a targeted user.</li><li><strong>Setup for social engineering.</strong> An unexpected logout followed by a convincing “please sign in again” page is a classic phishing primer. Force the logout, then present the fake login.</li><li><strong>A tell about the codebase.</strong> If logout changes state on GET with no CSRF protection, other state-changing actions may too. It’s often the first loose thread.</li></ul><p>Low-severity findings are still findings, and they’re cheap to fix.</p><h3>The fix: intention, verified on the server</h3><p>The root cause is that a <strong>state-changing action</strong> was exposed as a <strong>GET</strong> with <strong>no CSRF protection</strong>. Fix all three.</p><h3>1. Don’t change state on GET</h3><p>This is the old rule and it still holds: GET is for reading, and must be safe and idempotent. Anything that changes server state, logout included, belongs on POST (or PUT/DELETE):</p><pre>POST /logout</pre><p>That alone kills the &lt;img src&gt; and link-click vectors, because browsers don&#39;t send those as POST.</p><h3>2. Require a CSRF token</h3><p>Make the logout request carry a secret the attacker’s page can’t know or read, issued by your site and validated on the server:</p><pre>POST /logout<br>X-CSRF-Token: &lt;token bound to the user&#39;s session&gt;</pre><p>Reject any logout request without a valid token. Modern frameworks ship this; turn it on for logout too, not just for the “important” forms.</p><h3>3. Defense in depth</h3><ul><li><strong>SameSite cookies.</strong> Set session cookies to SameSite=Lax (or Strict), so the browser won&#39;t attach them to most cross-site requests in the first place. This blunts CSRF broadly; treat it as a backstop, not the only control.</li><li><strong>Validate </strong><strong>Origin / </strong><strong>Referer.</strong> For state-changing requests, confirm they came from your own origin.</li><li><strong>Scope the logout.</strong> Make sure logout only ever invalidates the <strong>requesting</strong> user’s own session, never anyone else’s.</li></ul><h3>4. Prove the fix</h3><pre>Test 1 — Normal logout (click the button): session ends.      ✅ expected<br>Test 2 — Direct GET /logout: does NOT end the session.         ✅ expected<br>Test 3 — Cross-site request / &lt;img&gt; to logout: has no effect.  ✅ expected</pre><p>If a cross-origin GET can still end the session, it isn’t fixed.</p><h3>A quick checklist</h3><ul><li>Logout is a POST, never a GET.</li><li>Logout requires a valid, session-bound CSRF token.</li><li>Session cookies are SameSite=Lax or Strict.</li><li>Origin/Referer are validated on state-changing requests.</li><li>Logout invalidates only the requesting user’s own session.</li><li>No other state-changing action is reachable via GET without CSRF protection.</li></ul><h3>Final thoughts</h3><p>Logout CSRF is a small bug with a big lesson: <strong>GET must never change state.</strong> The moment a side effect hides behind a GET, the whole web’s automatic-cookie behavior becomes the attacker’s trigger, and a link is enough. The fix costs almost nothing, a verb change and a token, and the habit it enforces, verify intent on the server for anything that changes state, is the same habit that prevents the serious CSRF bugs too.</p><p>If you build or test a web app, grep your routes for state changes behind GET. Logout, delete, toggle, subscribe, disable. Each one is a link away from being someone else&#39;s button.</p><h3>Want this tested on your own app?</h3><p>I do focused application and API security testing, CSRF and broken access control, authentication flows, business-logic abuse, and the chains between them, with a clear report and fixes your team can act on. If you’d like your app assessed, reach out and let’s talk scope. <strong>Authorized testing only</strong>, on systems you own.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>This write-up is fully anonymized — no target, host, token or real identifier is included — and describes testing performed under authorization. The techniques are shared for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae45c984a5e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One Number Away From Every Account: A BOLA That Let a Sales User Reset Anyone’s Password]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/one-number-away-from-every-account-a-bola-that-let-a-sales-user-reset-anyones-password-aa3e8bccbc31?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa3e8bccbc31</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 02:03:36 GMT</pubDate>
            <atom:updated>2026-12-02T02:03:36.995Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I logged in with the weakest account the lending platform had. Then I changed one value in a password-reset request — not my password, not my token, just an ID — and the server reset a different user’s password for me. Point it at an admin and you own the platform. Here’s the full anatomy of the bug, the chains it opens, what it costs a business, and exactly how to fix it. Anonymized, from an authorized test.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PLbN7hDfTbzmw2mhvaXT1Q.png" /></figure><p>Every app knows <strong>who</strong> you are. The good ones also check <strong>what you’re allowed to do</strong> — and, the part everyone forgets, <strong>which specific thing</strong> you’re allowed to do it to. That last check is where this bug lives.</p><p>I was testing a lending platform with a <strong>Sales account</strong>, the lowest-privileged role they had. A Sales user should be able to change exactly one password: their own. I found I could change <strong>anyone’s</strong>. One parameter, one valid token that was genuinely mine, and the server handed me control of other accounts, up to and including administrators.</p><p>This is <strong>Broken Object Level Authorization (BOLA)</strong> — also called IDOR — and it has sat at <strong>number one on the OWASP API Security Top 10</strong> for years because it is this easy and this damaging. Everything below is anonymized: no host, no token, no real ID. Treat it as something to test on systems <strong>you own or are authorized to assess.</strong></p><h3>The bug, exactly</h3><p>The password-change endpoint looked completely ordinary:</p><pre>POST /v1/auth/change-password<br>Authorization: Bearer &lt;my own, valid Sales JWT&gt;<br>Content-Type: application/json<br>{<br>  &quot;user_id&quot;: &quot;&lt;my-user-id&gt;&quot;,<br>  &quot;password&quot;: &quot;&lt;new-password&gt;&quot;<br>}</pre><p>Nothing suspicious. I’m authenticated with my own token, I pass my own user_id, I set my own password. Works.</p><p>But the request <strong>tells the server which account to act on</strong>, in the body, as user_id. So the obvious question: what if I keep my token and change only that ID?</p><pre>{<br>  &quot;user_id&quot;: &quot;&lt;a DIFFERENT user&#39;s id&gt;&quot;,<br>  &quot;password&quot;: &quot;Pwned123!&quot;<br>}</pre><p>The server accepted it and changed <strong>that</strong> account’s password to the value I chose.</p><p>Read what just happened. The server verified my token was valid — authentication passed, correctly. Then it took the user_id <strong>from my request</strong> and acted on it, without ever asking: <em>is the user behind this token allowed to change the password of this account?</em> It conflated &quot;you are authenticated&quot; with &quot;you are authorized to touch this object.&quot; Those are not the same question, and the gap between them is the entire vulnerability.</p><h3>Why it’s BOLA and not just “IDOR”</h3><p>IDOR is the symptom: a direct reference to an object (user_id) that you can tamper with. BOLA is the precise cause: the <strong>object-level authorization check is missing</strong>. Same bug, and the fix is defined by the second name — add the missing per-object check (CWE-639: Authorization Bypass Through User-Controlled Key, with CWE-862: Missing Authorization alongside it if the Sales role should never reach this function at all).</p><h3>From “changed a password” to “own the platform”: the chains</h3><p>A single BOLA is already High. What makes this one critical is how it links to the other weaknesses in the same app. Bugs don’t live alone; attackers chain them.</p><h3>Chain 1 — Password change → account takeover</h3><p>The most direct path. Changing a password you don’t own is only useful if you can then log in. You can:</p><pre>1. Send change-password with user_id = victim, password = known value<br>2. Go to the normal login page<br>3. Log in as the victim with the password you just set<br>4. You are now inside their account, with their role and their data</pre><p>That’s <strong>full horizontal takeover</strong> of any user whose ID you can name, and <strong>vertical escalation</strong> the moment that ID belongs to a manager or admin. Set the admin’s password, log in as admin, and every tenant control is yours.</p><h3>Chain 2 — Enumerate IDs → harvest targets → mass takeover</h3><p>On the same platform, a second BOLA on the employee endpoint (GET /v1/employee/{id}) returned <strong>other</strong> users&#39; records, and the IDs were <strong>sequential</strong>. So an attacker doesn&#39;t even need to guess:</p><pre>1. Walk /v1/employee/178905, 178906, 178907 ... collecting user IDs and roles<br>2. Spot the high-value accounts (admin, manager, finance)<br>3. Feed each id into the change-password BOLA<br>4. Take over the accounts that matter, not just random ones</pre><p>The enumeration bug tells you <strong>who</strong> to hit; the password bug lets you hit them. Separately: medium and high. Together: a repeatable script for compromising the whole directory.</p><h3>Chain 3 — Weak throttling makes the chain quiet</h3><p>The app’s rate limiting stopped bursts but not paced traffic — a ~2-second delay between requests sailed past it. That means the enumeration in Chain 2 can run slow and low, under the radar, with no lockout and no 429. The missing object check is the open door; the weak limiter means no one hears you walking through it a thousand times.</p><p>The picture that matters to a defender:</p><pre>Sequential IDs  -&gt;  Employee IDOR (who exists, who&#39;s admin)<br>                         |<br>                         v<br>                 Change-password BOLA (set their password)<br>                         |<br>                         v<br>                 Login as them  -&gt;  Admin takeover<br>                         ^<br>                         |<br>   Weak rate limiting  --+  (makes it scalable and silent)</pre><h3>What this actually costs the business</h3><p>It’s easy to read “password change bug” and file it under IT. On a lending platform, this is a boardroom problem.</p><ul><li><strong>Account takeover of customers and staff.</strong> An attacker operating as a loan officer or admin can view and alter applications, approvals, limits and disbursements. That’s not data exposure, it’s the ability to <strong>move money and decisions</strong>.</li><li><strong>Mass PII and financial-data breach.</strong> Lending back offices hold identity documents, income, bank details, credit data. Chained with the enumeration bug, an attacker can reach records across the user base.</li><li><strong>Fraud and direct financial loss.</strong> Control of a privileged account can mean approving fraudulent loans, redirecting disbursements, or manipulating records, losses that land on the lender’s balance sheet.</li><li><strong>Regulatory and legal exposure.</strong> Financial platforms sit under data-protection and financial-conduct regimes (in India, the DPDP Act and RBI expectations; elsewhere GDPR, PCI-style obligations). A breach of this class can mean mandatory notification, investigations and penalties.</li><li><strong>Reputational damage and customer loss.</strong> “A junior salesperson could reset the admin’s password” is the kind of sentence that ends up in the press and in churn numbers. Trust is the product for a lender.</li><li><strong>Insider risk, not just external.</strong> Because the attack works from a <strong>legitimate low-privileged account</strong>, every disgruntled or phished Sales login is a path to admin. The threat model includes your own staff and anyone who phishes one of them.</li></ul><p><strong>Risk rating: High, trending Critical.</strong> By itself, a High-severity account-takeover primitive. Chained with the enumeration and throttling weaknesses on the same platform, the realistic outcome is full administrative compromise and a mass data breach, which is Critical business risk. The only thing that would pull it back down is a hard, separate control on the login itself, such as mandatory MFA that the attacker’s new password can’t satisfy, and that should be verified, not assumed.</p><h3>How to fix it</h3><p>The rule is one line: <strong>authorization is a function of the authenticated user, the required permission, and the specific target object — checked on the server, on every request.</strong> Everything below follows from that.</p><h3>1. Add the object-level check (the actual fix)</h3><p>On every call, before acting, the server must answer “may <em>this</em> user act on <em>this</em> object?”:</p><pre># pseudocode, enforced server-side<br>caller   = user_from_verified_jwt(request)        # never from the body<br>target   = request.body[&quot;user_id&quot;]<br>if caller.id == target:<br>    allow()                                       # changing your own password<br>elif caller.role in ROLES_ALLOWED_TO_RESET_OTHERS and permitted(caller, target):<br>    allow()                                       # e.g. an admin, within policy<br>else:<br>    deny(403)                                      # everything else</pre><p>The non-negotiable part: the identity you authorize against comes from the <strong>verified token</strong>, never from a field in the request the client controls.</p><h3>2. Don’t let the body choose the victim</h3><p>For “change my own password,” the account should be derived from the session/token server-side, and the endpoint shouldn’t accept a user_id at all. Administrative resets belong on a <strong>separate, explicitly authorized</strong> endpoint (POST /admin/users/{id}/reset-password) guarded by an admin check, so the privileged path is visible and testable instead of hidden inside a user-facing API.</p><h3>3. Enforce role-based access, and deny privileged targets</h3><p>Define, on the backend, who may reset whose password: a Sales user, only their own; an admin, only within policy; and <strong>no lower-privileged role may ever target an admin or manager account.</strong> Put this in <strong>centralized authorization middleware</strong> shared by every account-management endpoint, so one audited place enforces it instead of a check copy-pasted (and forgotten) per route.</p><h3>4. Make the whole class safe, not just this endpoint</h3><p>This same missing check almost always exists on sibling objects — profiles, documents, applications, the employee endpoint in Chain 2. Audit every route that takes an id and apply the same object-level authorization. Enforce <strong>tenant isolation</strong> server-side too (don&#39;t trust a client-supplied tenant header).</p><h3>5. Defense in depth</h3><ul><li><strong>Step-up verification</strong> for sensitive changes: require the current password or an MFA challenge to set a new one, so a stolen or reset password alone isn’t enough.</li><li><strong>Re-issue the session</strong> after a password change and invalidate old tokens.</li><li><strong>Log every password change</strong> with initiating user, target user, timestamp and result, and alert on “user A changed user B’s password” where A ≠ B.</li><li><strong>Rate-limit per user and per token</strong>, against sustained traffic, so enumeration-driven abuse is throttled even when another check is weak.</li></ul><h3>6. Prove the fix</h3><p>A fix is only real if you can’t reproduce the bug. The decisive retest:</p><pre>Sales JWT  +  another user&#39;s user_id  +  change-password  -&gt;  403 Forbidden<br>(the target&#39;s password is unchanged)</pre><p>Plus: Sales changing their own password still works; Sales targeting a Manager/Admin is denied; an unauthenticated request is 401.</p><h3>A quick checklist</h3><ul><li>The password-change endpoint authorizes the target object, not just the token.</li><li>The acting identity comes from the verified JWT/session, never from the request body.</li><li>“Change my own password” takes no client-supplied user_id; admin resets are a separate, guarded endpoint.</li><li>No low-privileged role can target a privileged account.</li><li>The same object-level check covers every /{id} route, with tenant isolation enforced server-side.</li><li>Sensitive changes need step-up (current password or MFA); sessions are re-issued after a change.</li><li>Every password change is logged and alerted on when actor ≠ target.</li><li>Retest proves: Sales JWT + someone else’s id → 403.</li></ul><h3>Final thoughts</h3><p>This wasn’t a clever exploit. It was a missing if on the server — the single check that asks &quot;is this allowed, against this object?&quot; The app asked &quot;are you logged in?&quot;, got a yes, and stopped there. That one skipped question turned the lowest seat in the building into a master key.</p><p>Broken object-level authorization is the most common serious bug in modern APIs precisely because the happy path works without the check. Your own-password change works. Your own-profile view works. Nobody notices the missing guard until someone keeps the token and changes the id. So that’s the test, and it takes thirty seconds: keep your token, change one id, and see what the server gives you.</p><h3>Want this tested on your own app?</h3><p>If you run a platform where roles and money meet — lending, fintech, SaaS, marketplaces — this is exactly the class of bug worth finding before someone else does. I do focused application and API security testing: BOLA/IDOR and broken authorization, authentication flows, business-logic abuse, and the chains between them, with a clear report and fixes your engineers can act on.</p><p>If you’d like your app assessed, reach out and let’s talk scope. <strong>Authorized testing only</strong> — with your written permission, on systems you own.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>This write-up is fully anonymized — no target, host, token or real identifier is included — and describes testing performed under authorization. The techniques are shared for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa3e8bccbc31" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rate Limit That a Two-Second Pause Defeats]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/the-rate-limit-that-a-two-second-pause-defeats-ee22905ad755?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee22905ad755</guid>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 02:21:03 GMT</pubDate>
            <atom:updated>2026-12-01T02:21:03.377Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The API returned a proud set of rate-limit headers and a 429 when I hammered it. Then I added a two-second pause between requests, and the 429 never came back. One hundred requests, all processed. Here’s why “we have rate limiting” and “we are rate limited” are different sentences, how pacing slips through, and how to build a limiter that actually holds. Anonymized, from an authorized test.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lzVnl831n-yZlvmsWEKULg.png" /></figure><p>Rate limiting is the control that stands between “an attacker can try” and “an attacker can try a million times.” It’s what makes brute force, credential stuffing and ID enumeration impractical. So when an app advertises a limit but doesn’t really enforce it, the damage isn’t the limiter, it’s everything the limiter was supposed to make too slow to bother with.</p><p>On a lending platform I was testing, the API looked well protected. It even told me its limits in the response headers. But the enforcement only caught one shape of abuse, bursts, and missed the one that matters for quiet, patient attacks. Everything here is anonymized; treat it as something to check on systems <strong>you own or are authorized to assess.</strong></p><h3>What the app showed me</h3><p>Every response carried rate-limit headers:</p><pre>X-RateLimit-Limit: 1000<br>X-RateLimit-Remaining: 992<br>X-RateLimit-Reset: 32</pre><p>And it meant it, sort of. When I sent requests rapidly, in a burst, the API started returning:</p><pre>HTTP/1.1 429 Too Many Requests</pre><p>Good sign. Rate limiting exists. Most testers would note “limiter present” and move on. The interesting question is never “is there a limit,” it’s “<strong>what shape of traffic does the limit actually catch?</strong>”</p><h3>The bypass: just slow down</h3><p>I changed one thing: a pause of about two seconds between requests. No proxies, no rotating IPs, no distributed botnet, no header tricks. Same account, same token, same endpoint, just paced.</p><pre>Request 1  →  wait ~2s  →  Request 2  →  wait ~2s  →  Request 3  →  ...</pre><p>The 429 never came. I sent <strong>100 sequential requests</strong> this way and every one was processed and answered normally. The limiter that stopped a burst cold did nothing against steady, spaced traffic. The advertised &quot;1000&quot; and the real behavior had drifted apart.</p><p>That’s the whole finding: the control exists, but its effective enforcement differs from what it advertises, and an attacker who simply paces their requests runs as long as they like.</p><h3>Why a limiter does this</h3><p>This pattern almost always comes from one of a few implementation choices:</p><ul><li><strong>Short fixed windows.</strong> If the limiter counts requests in a tiny window and resets, a request every couple of seconds never fills any single window. You stay under the threshold forever.</li><li><strong>Token-bucket refill that’s too generous.</strong> A bucket that refills steadily can be kept non-empty indefinitely if you consume slowly enough, so it never trips.</li><li><strong>Headers that don’t match the limiter.</strong> The X-RateLimit-* values are set in one place and the real throttling logic lives in another; they disagree, and the headers become decoration.</li><li><strong>Wrong scope.</strong> Limiting per-IP but not per-user/per-token, or applying the limit inconsistently across routes or across load-balanced instances, so the effective ceiling is far higher than advertised.</li></ul><p>The fix depends on which of these it is, but the symptom, paced traffic walks through, is the same.</p><h3>Why “just rate limiting” is actually serious</h3><p>On its own this is <strong>Medium</strong>: it’s a weakened control, not a direct breach. Its real severity comes from what it stops stopping, especially when it sits next to other bugs.</p><ul><li><strong>ID / object enumeration.</strong> If an endpoint exposes sequential identifiers, or has a broken object-level authorization (IDOR/BOLA) bug, a working rate limit is often the last thing making mass enumeration impractical. Remove it and an attacker can walk the entire ID space, slowly and silently, with no lockout and no 429.</li><li><strong>Credential stuffing and brute force.</strong> Paced login or OTP attempts that never trip the limiter turn “a few tries” into “as many as needed.”</li><li><strong>Bulk data harvesting.</strong> Any endpoint that returns records becomes a scraping target when the throttle doesn’t bite.</li><li><strong>Resource exhaustion and cost.</strong> Expensive operations (reports, searches, exports) can be driven continuously, raising load and cloud bills.</li></ul><p>The chain that matters most:</p><pre>Broken object-level authorization (can read others&#39; records)<br>                 +<br>Sequential / guessable IDs (know what to ask for)<br>                 +<br>Rate limit that paced traffic bypasses (no brake on asking)<br>                 =<br>Quiet, large-scale unauthorized data harvesting</pre><p>The rate-limit weakness doesn’t cause the breach, it removes the speed bump that kept the other bug from scaling. That’s why it’s worth fixing even when it looks minor in isolation.</p><h3>How to fix it</h3><p>The goal: the effective limit matches the stated policy, for every client, across all traffic shapes.</p><h3>1. Pick an algorithm that resists pacing</h3><p>Use a <strong>sliding-window</strong> (or a correctly tuned token-bucket) limiter rather than a short fixed window, so steady low-rate traffic still accumulates toward the limit over the real policy window instead of resetting out from under it.</p><h3>2. Limit on the right key</h3><p>Apply limits <strong>per user and per token</strong>, not only per IP (one user can change IPs; many users can share one). For sensitive actions, layer limits: per account <em>and</em> per IP <em>and</em> global.</p><h3>3. Make the headers tell the truth</h3><p>The X-RateLimit-* values must come from the <strong>same</strong> limiter that enforces the policy, so what you advertise is what you enforce. On a block, return 429 with an honest Retry-After.</p><h3>4. Tighten the sensitive endpoints</h3><p>Login, OTP, password reset, search, export and any object-lookup endpoint deserve stricter, purpose-built limits, slower and lower than general API traffic.</p><h3>5. Enforce it everywhere, together</h3><p>If you run multiple application instances behind a load balancer, make sure the limiter state is <strong>shared</strong> (e.g. a central store), so an attacker can’t get N× the limit by spreading requests across backends.</p><h3>6. Watch for the pattern this test used</h3><p>Alert on <strong>sustained, evenly paced</strong> request streams from one account or token, not just on bursts. The attack here was invisible to burst-only detection precisely because it looked calm.</p><h3>7. Prove the fix</h3><pre>Test 1 — Burst:  limit reached → 429.                              ✅<br>Test 2 — ~2s pacing:  the defined limit still trips over its window. ✅<br>Test 3 — Sustained run:  log count, status, and the RateLimit headers over time.<br>Test 4 — Multi-instance:  the limit holds across load-balanced backends.</pre><p>If paced traffic still runs forever, the policy isn’t really enforced.</p><h3>A quick checklist</h3><ul><li>The limiter is sliding-window or a correctly tuned token-bucket, not a short fixed window.</li><li>Limits are keyed per user and per token, not only per IP.</li><li>X-RateLimit-* headers come from the same limiter that enforces the policy.</li><li>Blocks return 429 with an accurate Retry-After.</li><li>Login, OTP, reset, search, export and ID-lookup endpoints have stricter limits.</li><li>Limiter state is shared across load-balanced instances.</li><li>Detection alerts on sustained paced traffic, not just bursts.</li><li>Retest proves paced requests still hit the defined limit.</li></ul><h3>Final thoughts</h3><p>A rate limit you can defeat with sleep 2 is a sign on the door, not a lock. The dangerous part isn&#39;t the limiter itself, it&#39;s that rate limiting is the control quietly holding back a whole category of attacks, brute force, stuffing, enumeration, scraping, and when it only catches bursts, all of those become practical again at the patient pace that real attackers prefer.</p><p>If you build or test an API, don’t stop at “there’s a 429.” Slow down and keep going. The limit that stops a flood often does nothing against a steady drip, and a steady drip is exactly how the serious abuse is carried out.</p><h3>Want this tested on your own app?</h3><p>I do focused application and API security testing, rate-limiting and resource-abuse, broken access control, authentication flows, and the chains between them, with a clear report and fixes your team can act on. If you’d like your app assessed, reach out and let’s talk scope. <strong>Authorized testing only</strong>, on systems you own.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>This write-up is fully anonymized — no target, host, token or real identifier is included — and describes testing performed under authorization. The techniques are shared for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee22905ad755" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Sales Login and Five Ways In: Breaking Auth on a Lending Platform]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/a-sales-login-and-five-ways-in-breaking-auth-on-a-lending-platform-23acc1e74c0b?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/23acc1e74c0b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Mon, 30 Nov 2026 01:12:09 GMT</pubDate>
            <atom:updated>2026-11-30T01:12:09.940Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I started with the lowest-privileged account the app had — a Sales user. By the end I could change any user’s password and log in as them, read employee records that weren’t mine, and walk past a forced password change. Five findings, one disease: the server trusted the client. Everything here is anonymized, from an authorized bug bounty test.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zPz2vnieSPdzDAVtKBSIbQ.png" /></figure><p>Lending platforms are a good place to look, because they run on roles. Sales, employees, managers, admins, each supposed to see and do only their slice. The whole security model rests on one question being answered correctly on every request: <em>is this user allowed to do this, to this object?</em></p><p>I tested one with the weakest account they’d give me, a Sales/employee login. Over the assessment I found five authentication and authorization bugs. One of them, on its own, was full account takeover of any user including admins. The rest ranged from annoying to serious. What ties them together is the lesson, so I’ll walk each one and then name the single root cause they share.</p><p>All details are anonymized. Hosts, tokens, tenant names and real IDs are removed. This was an authorized test; treat everything here as something to check in systems <strong>you own or are authorized to assess.</strong></p><h3>The five at a glance</h3><p># Finding Class Severity 1 Change any user’s password via user_id IDOR / BOLA <strong>High</strong> 2 Read other employees&#39; records via employee_id IDOR / BOLA <strong>High</strong> 3 Forced password change skipped with a client cookie Client-side enforcement Medium 4 Rate limit bypassed by pacing requests Resource throttling Medium 5 Forced logout of any user Logout CSRF Low</p><p>Let’s take the worst one first.</p><h3>1. Change anyone’s password (IDOR / BOLA — High)</h3><p>This is the one that turns a Sales login into a master key.</p><p>The password-change API looked normal:</p><pre>POST /v1/auth/change-password<br>Authorization: Bearer &lt;my own valid Sales JWT&gt;<br>Content-Type: application/json<br>{ &quot;user_id&quot;: &quot;&lt;my-user-id&gt;&quot;, &quot;password&quot;: &quot;&lt;new-password&gt;&quot; }</pre><p>The request carries a user_id in the body. The obvious test: keep <strong>my</strong> token, change the user_id to <strong>someone else&#39;s</strong>.</p><pre>{ &quot;user_id&quot;: &quot;&lt;another-user-id&gt;&quot;, &quot;password&quot;: &quot;Attacker123!&quot; }</pre><p>The server accepted it and changed that account’s password. No check that my token was allowed to act on that user. I was authenticated, so the server assumed I was authorized, which is a different question entirely.</p><p>The impact writes itself: pick any user_id, set a password you know, log in as them. If an admin&#39;s user_id can be targeted, you set the admin&#39;s password and become admin. That&#39;s <strong>account takeover of arbitrary users</strong> from the lowest-privileged seat in the building. This is <strong>Broken Object Level Authorization (BOLA)</strong>, the number-one API risk for a reason (CWE-639).</p><p><strong>The fix:</strong> authorization is a function of three things, not one, authenticated user <strong>+</strong> required permission <strong>+</strong> the specific target object. On every call the server must check: is <em>this</em> user allowed to change the password of <em>this</em> user_id? A Sales user changing their own password is fine; a Sales user targeting anyone else gets 403 Forbidden. Put it in shared middleware for every account-management endpoint, log who changed whose password, and require extra verification (MFA/step-up) for privileged resets. Never derive authorization from a value in the request body.</p><h3>2. Read other employees’ records (IDOR / BOLA — High)</h3><p>Same disease, different endpoint. The employee lookup took the object ID straight from the path:</p><pre>GET /v1/employee/178905<br>Authorization: Bearer &lt;my own valid Sales JWT&gt;</pre><p>Change the trailing number:</p><pre>GET /v1/employee/178906</pre><p>…and it returned a different employee’s record, one I had no business seeing. The IDs were sequential, so this isn’t a one-off peek, it’s a door to <strong>every</strong> employee record by counting up: names, contact details, roles, organizational data. A horizontal authorization bypass that scales to the whole directory.</p><p><strong>The fix:</strong> the same object-level check, on every read. Does this user’s role permit access to <em>this</em> employee object, in <em>this</em> tenant? Enforce tenant isolation on the server, not from a client-supplied header. Unpredictable IDs (UUIDs) raise the bar for enumeration but are <strong>not</strong> a substitute for the authorization check, they just make a missing check harder to exploit, not safe.</p><h3>3. The forced password change you can skip with a cookie (Client-side enforcement — Medium)</h3><p>When a password hit its retention age, the app did the right thing on screen: it redirected to a mandatory “change your password” page, current password, new, confirm. Good policy.</p><p>Then I looked at the cookies:</p><pre>password_changed=true</pre><p>The app was deciding whether the user still owed a password change by reading a cookie the user controls. I changed it:</p><pre>password_changed=true   -&gt;   false</pre><p>Refreshed, and the app concluded I’d already changed my password and let me straight through. The mandatory control was mandatory only if you didn’t open DevTools.</p><p><strong>The fix:</strong> the “must change password” decision belongs to server-side account state (last_password_changed_at, password_expiry_at, password_change_required), checked on every protected request, not a cookie or any client value. A client flag is fine for <em>rendering</em> the right screen, as long as flipping it changes nothing, because the server still blocks every other endpoint until the change is recorded. This is CWE-602, client-side enforcement of server-side security, and it&#39;s the signature bug of fast-shipped, vibe-coded apps: the screens look production-ready, but the backend never enforced what the UI was pretending to.</p><h3>4. Rate limiting that a two-second pause defeats (Resource throttling — Medium)</h3><p>The API advertised a rate limit and even returned the headers:</p><pre>X-RateLimit-Limit: 1000<br>X-RateLimit-Remaining: 992<br>X-RateLimit-Reset: 32</pre><p>Hammer it in a burst and you got 429 Too Many Requests, so throttling existed. But put a ~2-second pause between requests and the 429 never came. I sent 100 sequential requests, paced, and every one was processed. The limiter stopped bursts but not sustained, patient traffic.</p><p>On its own, medium. Combined with finding #2, it’s the fuel: slow, steady enumeration of sequential employee_ids stays under the burst threshold and quietly walks the whole directory. Weak throttling doesn&#39;t cause the IDOR, it removes the last practical brake on abusing it.</p><p><strong>The fix:</strong> define the real policy (requests per window) and enforce it per user and per token, not just per IP and not just against bursts. A correctly configured sliding-window or token-bucket limiter should reject sustained overage with 429 and an honest Retry-After. Make the advertised headers match the real limiter, apply stricter limits to sensitive endpoints, and confirm the limit holds across load-balanced instances.</p><h3>5. Log anyone out with a link (Logout CSRF — Low)</h3><p>The smallest one, but a clean example. Logout was a plain GET:</p><pre>GET /logout</pre><p>Any page the victim visits can make their browser fire a GET (an image tag, a link, a redirect). So a link, or an embedded resource, pointed at /logout terminates the victim&#39;s session using their own browser&#39;s auth context, no credentials, no token needed. It&#39;s not account takeover, the impact is forced logout and disruption, but during a time-sensitive workflow in a lending back office, repeated forced logouts are more than a nuisance.</p><p><strong>The fix:</strong> state-changing actions don’t belong on GET. Make logout a POST with a CSRF token, validate Origin/Referer, set SameSite cookies as defense in depth, and make sure logout only ever ends the requesting user&#39;s own session. The rule is old and still broken everywhere: <strong>GET must not change state.</strong></p><h3>The one root cause</h3><p>Five findings, one sentence underneath all of them: <strong>the server trusted the client to be honest about identity, authorization, or state.</strong></p><ul><li>Password change and employee read trusted a client-supplied <strong>object id</strong> (user_id, employee_id) instead of checking permission against it.</li><li>The forced password change trusted a client <strong>cookie</strong> instead of server-side account state.</li><li>Logout trusted a cross-site <strong>GET</strong> instead of a verified intentional request.</li><li>The rate limiter trusted that abuse would always look like a <strong>burst</strong>.</li></ul><p>A valid JWT answers “who are you,” and the app kept treating that as if it also answered “and what are you allowed to do to this specific thing.” Those are two different questions, and the second one has to be asked on the server, on every request, against the actual target object. Authentication is the ticket in the door; authorization is checking the ticket at every room. This app checked it once at the entrance and left the rooms open.</p><h3>A quick checklist</h3><ul><li>Every object-level action (/user/{id}, /employee/{id}, body user_id) checks that <em>this</em> user may act on <em>this</em> object, server-side, every time.</li><li>Authorization is user <strong>+</strong> permission <strong>+</strong> target object, never just “has a valid token.”</li><li>Mandatory steps (password change, MFA, KYC) are enforced from server state; flipping a cookie or flag changes nothing.</li><li>Rate limits are enforced per user and per token, against sustained traffic, not only bursts.</li><li>State-changing operations use POST with CSRF protection; GET never changes state.</li><li>Tenant isolation is enforced server-side, not from a client header.</li><li>Sensitive IDs are unpredictable, as a complement to authorization, not a replacement.</li></ul><h3>Final thoughts</h3><p>None of these bugs were clever. There was no exotic payload, no memory corruption, no race. Each was a missing if on the server, the check that should have asked &quot;is this allowed?&quot; and didn&#39;t. That&#39;s what makes broken authorization the most common serious finding in modern apps, and the most preventable: it isn&#39;t hard to write, it&#39;s just easy to forget, because the happy path works perfectly without it.</p><p>If you build or test an API, do one thing this week: take your lowest-privileged account, keep its token, and change one id in a request, in the URL, in the body, in a cookie. If the server gives you something that account shouldn’t have, you’ve found the same bug I did, five times.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>This write-up is fully anonymized — no target, host, token or real identifier is included — and describes testing performed under authorization. The techniques are shared for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23acc1e74c0b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Password Reset Poisoning Explained: How the Host Header Hands Over Your Account]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/password-reset-poisoning-explained-how-the-host-header-hands-over-your-account-403f542c7f77?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/403f542c7f77</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Sun, 29 Nov 2026 04:42:52 GMT</pubDate>
            <atom:updated>2026-11-29T04:42:52.658Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An attacker never touches your account. They ask the site to reset your password, change one header, and the site mails you a reset link that points at their server. Here’s how Host header password reset poisoning works, how to test it, and how to shut it down. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GrLRUYtK6bhjFUKc6aob7w.png" /></figure><p>Password reset is the one flow every app has and almost nobody hardens. It takes an email address you don’t own, generates a secret token, and emails a link. The whole thing rests on one assumption: that the link in the email points at the real site.</p><p><strong>Password reset poisoning</strong> breaks that assumption with a single changed header. The site itself sends the victim a genuine reset email, with a valid token, on a link that leads to the attacker. First documented by James Kettle in 2013, it’s still a live finding in bug bounty today. This guide covers how it works, the variants, how to test it, and the fix, all for systems <strong>you own or are explicitly authorized to test.</strong></p><h3>How a normal reset works</h3><ol><li>You submit your username or email.</li><li>The server confirms the account exists and generates a <strong>temporary, unique, high-entropy token</strong> tied to your account.</li><li>It emails you a link like <a href="https://normal-website.com/reset?token=0a1b2c3d4e5f...">https://normal-website.com/reset?token=0a1b2c3d4e5f...</a></li><li>You click, the server validates the token, identifies your account, you set a new password, and the token is destroyed.</li></ol><p>The token is good security. The weak point is step 3: <strong>how does the server decide the domain to put in that link?</strong> Many apps build it from the Host header of the incoming request, and the Host header is attacker-controlled.</p><h3>The attack, step by step</h3><ol><li>The attacker knows the victim’s email (victim@example.com). They submit a password reset request <strong>for the victim</strong>, intercept it in a proxy, and change the Host header to a domain they control:</li></ol><pre>POST /reset-password HTTP/1.1<br>Host: evil-user.net<br>...<br>email=victim@example.com</pre><ol><li>The server looks up the victim, generates a <strong>real, valid token for the victim’s account</strong>, and builds the reset link using the Host value it was handed. It emails the victim:</li></ol><pre>https://evil-user.net/reset?token=&lt;valid token for victim&gt;</pre><ol><li>The victim gets a genuine email from the real service. If they click the link, their browser sends the token to the attacker’s server. The attacker just reads it from their access logs.</li><li>The attacker opens the <strong>real</strong> site’s reset page with the stolen token, sets a new password, and logs in as the victim.</li></ol><p>Notice who did what. The attacker never saw the victim’s inbox and never touched their account. The site generated the token, the site sent the email, and the victim clicked a link from a service they trust.</p><h3>The honest part: it needs a click</h3><p>This is where the clickbait version oversells it. The token lands in the victim’s inbox, not the attacker’s, so <strong>something has to fetch the attacker’s link.</strong> Usually that’s the victim clicking it. But it doesn’t have to be a human: PortSwigger notes the link can be “fetched in some other way, for example, by an antivirus scanner” or a link-preview bot that follows URLs in email automatically.</p><p>Attackers raise the click rate with context: a fake “we detected a login from a new device” or “your account was in a breach, reset now” message that makes the real reset email look expected. So treat it as one-click account takeover, not zero-click. That’s still critical.</p><h3>When the plain Host swap gets blocked</h3><p>Real apps often validate the Host header or sit behind a proxy that rewrites it. These are the variants that get past that. Test them only against a target you&#39;re authorized to assess.</p><ul><li><strong>X-Forwarded-Host (the common one).</strong> Many frameworks trust X-Forwarded-Host over Host when it&#39;s present, and proxies add it by default. Leave Host correct and inject the override:</li></ul><pre>Host: vulnerable-website.com<br>X-Forwarded-Host: evil-user.net</pre><ul><li><strong>Other override headers.</strong> If X-Forwarded-Host is filtered, try X-Host, X-Forwarded-Server, X-HTTP-Host-Override, and Forwarded. Burp&#39;s Param Miner (&quot;guess headers&quot;) enumerates which ones the stack actually reads.</li><li><strong>Duplicate Host headers.</strong> Send two. The front-end and back-end may disagree on which one wins, so one routes the request and the other poisons the link:</li></ul><pre>Host: vulnerable-website.com<br>Host: evil-user.net</pre><ul><li><strong>Absolute URL in the request line.</strong> Some servers take the request-line host, others the Host header:</li></ul><pre>POST https://vulnerable-website.com/reset-password HTTP/1.1<br>Host: evil-user.net</pre><ul><li><strong>Injected port or indented header.</strong> Append a non-numeric port (vulnerable-website.com:evil-user.net) to slip past a validator that only checks the hostname, or indent a second Host: line with a leading space so the two systems parse it differently.</li><li><strong>Dangling markup, when you can’t move the link.</strong> Even if the link domain is locked down, if the Host value gets reflected into the email body you may be able to inject HTML. Email clients don&#39;t run JavaScript, but a <strong>dangling markup</strong> payload (an unclosed img tag that swallows the rest of the email into a URL) can still exfiltrate the token.</li></ul><h3>How to test it</h3><ol><li><strong>Find the reset flow</strong> and capture the reset request in your proxy.</li><li><strong>Swap the Host.</strong> Change Host to a domain or collaborator endpoint you control (Burp Collaborator, interactsh). Send the request.</li><li><strong>Watch where the token goes.</strong> Trigger the reset for a test account you own, then check: does the email link point at your domain? Does your collaborator log a hit when the link is opened? A logged token is proof.</li><li><strong>If it’s filtered, work the variants</strong> above, one at a time: X-Forwarded-Host first, then the other override headers, then duplicate Host, absolute URL, and port tricks.</li><li><strong>Prove impact safely.</strong> Show that a valid token for your own test account was delivered to your server. Don’t harvest other users’ tokens.</li><li><strong>Report it</strong> with the exact request, the poisoned link or collaborator hit, and the account-takeover impact.</li></ol><h3>The fix</h3><p>The root cause is simple: <strong>the server trusts the Host header to build a security-critical URL.</strong> Stop doing that.</p><ul><li><strong>Don’t build reset links from the Host header.</strong> Store the canonical domain in configuration and use that fixed value for every link the app generates. PortSwigger says this alone “would eliminate the threat of password reset poisoning.”</li><li><strong>Prefer relative URLs</strong> wherever a link doesn’t need to be absolute, so there’s no host to inject.</li><li><strong>Whitelist allowed hosts.</strong> Validate Host against a list of known-good domains and reject or redirect anything else (Django&#39;s ALLOWED_HOSTS is the model).</li><li><strong>Don’t honor override headers.</strong> Strip X-Forwarded-Host and friends unless you genuinely need them, and remember proxies may add them by default.</li><li><strong>Validate at the edge too.</strong> Whitelist permitted domains at the load balancer or reverse proxy, and don’t host internal-only vhosts beside public content.</li></ul><h3>Common mistakes to avoid</h3><ul><li>Testing reset flows on sites you don’t own or aren’t authorized to assess.</li><li>Trying only the raw Host swap and stopping when it&#39;s blocked, instead of working X-Forwarded-Host and the other variants.</li><li>Assuming it’s zero-click. The victim (or an automated fetcher) still has to open the link.</li><li>Fixing it by validating the Host string while still building the link from it. Use a configured domain instead.</li><li>Stripping X-Forwarded-Host in the app but leaving the proxy to re-add it.</li></ul><h3>A quick checklist</h3><ul><li>You’re testing only reset flows you’re authorized to assess.</li><li>The reset request is captured and the Host value is traced into the email link.</li><li>Plain Host, X-Forwarded-Host, other override headers, duplicate Host, absolute URL, and port tricks are all tried.</li><li>Impact is proven with a token for your own test account, not harvested from real users.</li><li>On the fix side: reset links come from a configured domain, not the request.</li><li>Override headers are stripped; allowed hosts are whitelisted in the app and at the proxy.</li></ul><h3>Final thoughts</h3><p>Password reset poisoning is dangerous because it turns the application into the attacker’s delivery system. The email is real, the token is real, the sender is the service the victim trusts, and the only thing wrong is the domain, which the victim will never inspect. You can’t patch this with a smarter token. You patch it by deciding, in configuration, the one domain your app is allowed to put in a reset link, and never letting an incoming header change it.</p><p>If you build or test authentication, do one thing this week: send yourself a password reset, intercept it, change the Host header, and see where the link in your inbox points. If it followed your header, so will an attacker.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=403f542c7f77" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSRF Attacks Explained: How to Make a Server Fetch What You Can’t]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/ssrf-attacks-explained-how-to-make-a-server-fetch-what-you-cant-1d33eeb7436b?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d33eeb7436b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Sat, 28 Nov 2026 02:52:49 GMT</pubDate>
            <atom:updated>2026-11-28T02:52:49.358Z</atom:updated>
            <content:encoded><![CDATA[<p><em>If an app will fetch a URL you give it, it can be turned into your proxy into the internal network — and in the cloud, into your keys. Here’s how SSRF works, where it hides, how to test it, and how to shut it down. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6CSMydlZFwFp_WPz2v4Akw.png" /></figure><p>Here’s a feature in almost every app: “give us a URL and we’ll fetch it.” Import from a link, generate a preview, convert a document, call a webhook. Useful — and quietly dangerous. Because the <em>server</em> makes that request, not your browser, and the server can reach places you can’t: internal admin panels, databases, and in the cloud, the <strong>metadata endpoint that hands out credentials.</strong></p><p>That’s <strong>Server-Side Request Forgery (SSRF)</strong> — OWASP API #7 and a perennial high-severity bug bounty finding. This guide covers how it works, its types, where it hides, how to test it, and the fixes — all for systems <strong>you own or are explicitly authorized to test.</strong></p><h3>What SSRF actually is</h3><p>SSRF is when an attacker can make a server send a request to a destination of the attacker’s choosing. The app was built to fetch <em>some</em> URLs (an image, a webhook); SSRF is when you can point that fetch at a URL it was never meant to reach.</p><p>Why that’s powerful: the server sits <em>inside</em> the network. A request from your browser to http://10.0.0.5/admin or http://169.254.169.254/ goes nowhere — you can&#39;t route there. But a request made <em>by the server</em>, on your behalf, can. You&#39;ve borrowed the server&#39;s network position. That&#39;s the whole attack.</p><h3>Why it’s so high-impact</h3><ul><li><strong>Cloud metadata.</strong> Most cloud servers expose an internal metadata service at 169.254.169.254. On a misconfigured (or IMDSv1) instance, hitting the right path returns <strong>temporary IAM credentials</strong> — and now you have the server&#39;s cloud permissions.</li><li><strong>Internal services.</strong> Admin panels, databases, caches, dashboards and internal APIs that are “safe” because they’re not internet-facing are suddenly reachable through the server.</li><li><strong>Network mapping.</strong> Timing and error differences let you port-scan the internal network from the outside.</li><li><strong>Chain to RCE.</strong> An internal service reachable via SSRF (an unauthenticated Redis, a management API) can escalate to full code execution.</li></ul><p>An SSRF often <em>is</em> the breach, not a step toward one.</p><h3>The types of SSRF</h3><ul><li><strong>Basic / in-band SSRF.</strong> The response to your injected request comes back to you — you see the internal page or the metadata directly. The easy case.</li><li><strong>Blind SSRF.</strong> The server makes the request but you get <em>no</em> response in the app. You confirm it out-of-band: point it at a server you control and watch for the incoming connection, or infer from timing. Lower signal, still exploitable (metadata exfil, internal actions).</li><li><strong>Semi-blind.</strong> You get indirect feedback — an error message, a status code, a response-time difference — that leaks whether the internal request succeeded.</li></ul><h3>Where SSRF hides</h3><p>Any feature where the server fetches something is a candidate:</p><ul><li><strong>URL parameters</strong> — ?url=, ?image=, ?src=, ?feed=, ?callback=, ?webhook=, ?proxy=, ?dest=, ?redirect=.</li><li><strong>Webhooks</strong> — “send events to this URL.” You supply the URL; the server calls it.</li><li><strong>Document / image processors</strong> — PDF generators, thumbnail makers, “import from URL,” HTML-to-PDF, screenshot services (these fetch resources server-side).</li><li><strong>File imports</strong> — “import your profile picture from a URL,” “fetch this RSS/XML feed.”</li><li><strong>Link previews / unfurlers</strong> — paste a link, the server fetches it to render a preview.</li><li><strong>SSO / OAuth / integrations</strong> — server-to-server callbacks and metadata fetches.</li><li><strong>XML parsers</strong> — XXE can be turned into SSRF via external entities.</li></ul><p>If a value you control ends up as a URL the server requests, test it.</p><h3>How to find and test SSRF</h3><p><strong>1. Find the fetch.</strong> Identify any input that becomes a server-side request — a URL field, a webhook, an import. Map every one through your proxy.</p><p><strong>2. Prove the server makes the request (works even blind).</strong> Point the input at a server <em>you</em> control — Burp Collaborator, interactsh, or your own logging endpoint — and watch for the incoming hit:</p><pre>url=https://your-collaborator-id.oastify.com/ssrf-test</pre><p>If your listener logs a request from the target’s IP, the server is fetching your URL. That alone confirms SSRF, blind or not.</p><p><strong>3. Pivot to internal targets.</strong> Now aim it inward and see what comes back (or what the timing/errors reveal):</p><pre>http://127.0.0.1/            http://localhost:8080/<br>http://169.254.169.254/      # cloud metadata service<br>http://10.0.0.1/  http://192.168.0.1/   # internal ranges</pre><p><strong>4. Read cloud metadata (the big one).</strong> On a vulnerable cloud instance, the metadata path returns role credentials. The existence of the finding is proven by reaching the metadata root; demonstrating impact responsibly means showing you can reach it — not harvesting and using live keys.</p><p><strong>5. Beat the filters.</strong> If the app blocks “internal” URLs, these commonly bypass naive checks (test against your own authorized target only):</p><ul><li>Alternate IP encodings for 127.0.0.1: decimal (2130706433), octal, hex, 0, 0.0.0.0, [::1], 127.1.</li><li>A hostname <em>you</em> control that resolves to an internal IP, or <strong>DNS rebinding</strong> (resolves public on check, internal on use).</li><li>An open <strong>redirect</strong>: the allowed URL 302-redirects to the internal target, and a server that follows redirects walks right in.</li><li>Confusing parsers with @, #, extra slashes, or URL-encoded characters.</li></ul><p><strong>6. Report it.</strong> The exact request, proof the server fetched your URL (the collaborator hit), the internal target reached, the realistic impact (metadata/internal service), and the fix. Only against systems you’re authorized to test.</p><h3>The fix</h3><p>The goal: the server must only ever fetch destinations it’s <em>supposed</em> to.</p><ul><li><strong>Allow-list the destinations.</strong> Don’t try to blocklist “bad” URLs — maintain a list of the exact hosts/domains the feature legitimately needs, and reject everything else.</li><li><strong>Resolve, then validate.</strong> Resolve the hostname to an IP and <strong>reject private, loopback, and link-local ranges — including </strong><strong>169.254.169.254 — after resolution</strong>, not by string-matching the URL (which bypasses trivially).</li><li><strong>Disable or re-check redirects.</strong> Don’t blindly follow redirects; if you must, re-validate every hop against the allow-list.</li><li><strong>Lock down the metadata service.</strong> Use <strong>IMDSv2</strong> (session-token-based), which defeats the simple SSRF-to-credentials path.</li><li><strong>Segment egress.</strong> The app server shouldn’t be able to reach internal services or the whole internet — restrict outbound at the network level.</li><li><strong>Don’t reflect raw responses.</strong> Returning the fetched content to the user turns blind SSRF into in-band; return only what’s needed.</li></ul><h3>Common Mistakes to Avoid</h3><ul><li>Testing against systems you don’t own or aren’t authorized to assess.</li><li>Only testing obvious ?url= fields and missing webhooks, PDF/image generators, and import features.</li><li>Giving up when there’s no response — blind SSRF is confirmed out-of-band, not in the page.</li><li>Blocklisting URL strings instead of resolving the host and checking the IP range.</li><li>Following redirects without re-validating them (the #1 SSRF filter bypass).</li><li>Leaving the cloud metadata service on IMDSv1.</li><li>Returning the fetched response to the user, upgrading blind to in-band for an attacker.</li></ul><h3>A Quick SSRF Checklist</h3><ul><li>You’re testing only features and targets you’re authorized to assess.</li><li>Every server-side fetch is mapped — URL params, webhooks, importers, processors, previews.</li><li>Each is tested against a collaborator/OOB endpoint to confirm the server makes the request.</li><li>Internal targets and 169.254.169.254 are tested for reachability (impact proven, not abused).</li><li>On the fix side: destinations are allow-listed, not blocklisted.</li><li>Hostnames are resolved and private/loopback/link-local IPs rejected <em>after</em> resolution.</li><li>Redirects are disabled or re-validated per hop.</li><li>The metadata service runs IMDSv2; outbound egress is segmented.</li><li>Fetched responses aren’t reflected back to users.</li></ul><h3>Final Thoughts</h3><p>SSRF is dangerous for one structural reason: it borrows the server’s trust. Everything the server is allowed to reach, an attacker with SSRF can reach <em>through</em> it — and in the cloud, what the server can reach includes the keys to its own account. The fix isn’t a cleverer URL filter; it’s deciding, explicitly, the short list of places the server is allowed to go, and enforcing that after DNS resolution, redirects and all.</p><p>If you build or test anything that fetches a URL, do one thing this week: point it at a server you control and see if the request shows up. If it does, point it at 169.254.169.254 on your own instance. What comes back tells you whether your server is a door into your own network.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d33eeb7436b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSRF Attacks Explained: How a Logged-In User Gets Tricked Into Acting]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/csrf-attacks-explained-how-a-logged-in-user-gets-tricked-into-acting-9bd80bf36b2c?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9bd80bf36b2c</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[csrf-attack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 01:52:06 GMT</pubDate>
            <atom:updated>2026-11-27T01:52:06.645Z</atom:updated>
            <content:encoded><![CDATA[<p><em>The browser sends your session cookie automatically — even when the request comes from an attacker’s page. That’s CSRF, and it can change a victim’s email and take their account. Here’s how it works, how to test it, and how to stop it. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*alIx-Coq_A58QKHiHzl59A.png" /></figure><p>Here’s a quirk of how browsers work: when your browser sends a request to a site, it <strong>automatically attaches that site’s cookies</strong> — including your session cookie — no matter <em>where</em> the request came from. Click a link, submit a form, load an image: if it points at a site you’re logged into, your session rides along.</p><p>Cross-Site Request Forgery (CSRF) abuses exactly that. An attacker’s page makes your browser fire a <em>state-changing</em> request at a site you’re logged into, your session cookie goes with it, and the server — seeing a valid session — performs the action <strong>as you</strong>. Change your email, reset your password, transfer money, add an admin. This guide covers how it works, its variations, how to test it, and the fixes — all for systems <strong>you own or are explicitly authorized to test.</strong></p><h3>What CSRF actually is</h3><p>CSRF works when three things are true:</p><ol><li>There’s a <strong>state-changing action</strong> (change email, transfer funds, delete something).</li><li>The server authenticates it <strong>only via the session cookie</strong>, which browsers send automatically.</li><li>The request’s parameters are <strong>predictable</strong> — the attacker knows what to send.</li></ol><p>If all three hold, an attacker can build a page that, when a logged-in victim merely visits it, silently sends the request to the target site with the victim’s cookie attached. The server can’t tell the difference between “the user clicked this in our app” and “the user’s browser was tricked into sending it.” It’s not a code-execution bug — it’s a <em>confused-deputy</em> bug: the browser is the deputy, trusted because of the cookie, not because of intent.</p><h3>Why it’s high-impact</h3><p>The severity is entirely about <em>which</em> action you can forge:</p><ul><li><strong>Change email or password</strong> → the attacker now owns the account (<strong>account takeover</strong>).</li><li><strong>Add an attacker’s email/MFA device</strong> → persistent access.</li><li><strong>Transfer funds / make a purchase</strong> → direct financial loss.</li><li><strong>Change security settings, add an admin, delete data</strong> → whatever the app lets a user do.</li></ul><p>A CSRF on a password-change endpoint is a full account takeover delivered by a single page visit.</p><h3>The variations</h3><ul><li><strong>GET-based CSRF.</strong> The action is a GET request (/transfer?to=x&amp;amount=100). Trivial — the attacker just needs the victim to load a URL or an &lt;img&gt; that points at it.</li><li><strong>POST-based CSRF.</strong> The action is a POST. The attacker hosts a hidden HTML form that <strong>auto-submits</strong> with JavaScript when the page loads.</li><li><strong>Login CSRF.</strong> The attacker forces the victim to log into the <em>attacker’s</em> account, so the victim’s activity is recorded under it.</li><li><strong>JSON / content-type CSRF.</strong> APIs that accept JSON <em>and</em> don’t check content-type or token can still be CSRF-able; often paired with permissive CORS.</li><li><strong>Token-present-but-broken.</strong> A CSRF token exists but isn’t actually validated, isn’t tied to the session, or is predictable — all still exploitable.</li></ul><h3>Where CSRF hides</h3><p>Any state-changing endpoint that relies on the cookie alone:</p><ul><li><strong>Account settings</strong> — change email, password, phone, MFA, security questions.</li><li><strong>Money movement</strong> — transfers, payments, withdrawals, adding a payee.</li><li><strong>Admin actions</strong> — add/remove users, change roles, change config.</li><li><strong>Content</strong> — post, delete, edit, change privacy.</li><li><strong>Any “do X” POST</strong> where the only thing proving intent is the session.</li></ul><h3>How to find and test CSRF</h3><p><strong>1. Find the state-changing requests.</strong> Through a proxy, list the POST/PUT/DELETE (and state-changing GET) actions — especially the sensitive ones (email/password change).</p><p><strong>2. Check for a token — and whether it actually matters.</strong> Look at the request for an anti-CSRF token. Then test it properly:</p><ul><li><strong>Remove</strong> the token entirely — does the request still succeed? (No validation.)</li><li><strong>Change</strong> it to a wrong/another user’s token — accepted? (Not tied to the session.)</li><li>Use <strong>another account’s</strong> valid token — accepted? (Not per-user.)</li><li>Swap the method (POST→GET) or drop the content-type — does it bypass the check?</li></ul><p><strong>3. Build a cross-site proof.</strong> For a POST, host a minimal auto-submitting form on a different origin and load it while logged into the target (your own test account):</p><pre>&lt;form action=&quot;https://target.example/account/email&quot; method=&quot;POST&quot;&gt;<br>  &lt;input name=&quot;email&quot; value=&quot;attacker@evil.test&quot;&gt;<br>&lt;/form&gt;<br>&lt;script&gt;document.forms[0].submit()&lt;/script&gt;</pre><p>If your test account’s email changes just from loading that page, it’s CSRF.</p><p><strong>4. Check the defenses that would’ve stopped it.</strong> Inspect the session cookie’s <strong>SameSite</strong> attribute (Lax/Strict blocks most cross-site sends) and whether the server validates <strong>Origin/Referer</strong>. Their absence is why the bug works.</p><p><strong>5. Report it</strong> with the vulnerable action, the cross-site PoC, the impact (e.g., account takeover via email change), and the fix. Only on systems and accounts you’re authorized to use.</p><h3>The fix</h3><ul><li><strong>Anti-CSRF tokens (synchronizer pattern).</strong> Issue an unpredictable token, tied to the user’s session, required on every state-changing request, and <strong>actually validated</strong> server-side. This is the primary defense.</li><li><strong>SameSite cookies.</strong> Set session cookies to SameSite=Lax (or Strict for sensitive apps) so the browser won&#39;t auto-send them on cross-site requests. A strong modern baseline — but pair it with tokens, don&#39;t rely on it alone.</li><li><strong>Validate </strong><strong>Origin / </strong><strong>Referer</strong> on state-changing requests as a secondary check.</li><li><strong>Re-authenticate for critical actions</strong> — require the current password (or a fresh MFA) to change email/password or move money, so a forged request alone isn’t enough.</li><li><strong>Never use </strong><strong>GET for state changes</strong> — GET requests are the easiest to forge.</li></ul><h3>Common Mistakes to Avoid</h3><ul><li>Testing actions or accounts you aren’t authorized to assess.</li><li>Assuming “there’s a token, so it’s safe” without testing whether it’s validated, per-session, and unpredictable.</li><li>Only testing form POSTs and ignoring JSON APIs with weak content-type/CORS checks.</li><li>Missing the highest-impact targets (email/password change = account takeover).</li><li>On the defense side: relying on SameSite alone, or on Referer checks that are easy to strip.</li><li>Using GET for anything that changes state.</li><li>Tokens that are global/static instead of tied to the user’s session.</li></ul><h3>A Quick CSRF Checklist</h3><ul><li>You’re testing only actions and accounts you’re authorized to assess.</li><li>Every state-changing endpoint is listed, sensitive ones first.</li><li>Each tested with the token removed, altered, and swapped from another account.</li><li>A cross-site auto-submit PoC confirms the action runs with the victim’s session.</li><li>SameSite on session cookies and Origin/Referer validation are checked.</li><li>On the fix: unpredictable, per-session, validated CSRF tokens on all state changes.</li><li>SameSite=Lax/Strict set; critical actions require re-authentication.</li><li>No state changes over GET.</li></ul><h3>Final Thoughts</h3><p>CSRF endures because the browser’s helpfulness — auto-attaching cookies — is exactly what the attack abuses, and the server can’t see intent, only the cookie. The fix is to make intent <em>provable</em>: a per-session token the attacker can’t guess, cookies the browser won’t send cross-site, and a re-check before anything that really matters. None of it is complicated; it just has to be <em>present</em> on every state-changing request, not most of them.</p><p>If you build or test web apps, do one thing this week: take your most sensitive action — the email or password change — remove the CSRF token, and replay it. If it still works, a single page visit is all that stands between a logged-in user and a stolen account.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9bd80bf36b2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[XSS Attacks Explained: The Types, the Contexts, and How to Find Them]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/xss-attacks-explained-the-types-the-contexts-and-how-to-find-them-65f73849da5e?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/65f73849da5e</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[red-team]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Thu, 26 Nov 2026 01:55:56 GMT</pubDate>
            <atom:updated>2026-11-26T01:55:56.390Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Get your JavaScript to run in someone else’s browser and you can act as them — steal their session, their data, their account. Here’s how XSS works, its types, the contexts that decide the payload, and the fixes. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b3ZZp_WQvz0BPKv5Yd_2hA.png" /></figure><p>Cross-Site Scripting is the bug that keeps topping web vulnerability lists, two decades after it was named — because it’s simple, everywhere, and high-impact. The idea: you get a web app to include <em>your</em> JavaScript in a page, and when another user loads that page, your script runs <strong>in their browser, in the app’s context.</strong> From there you can read their session, act as them, and take over their account.</p><p>This guide covers what XSS is, its three types, the contexts that decide which payload works, how to find it, and the fixes — all for systems <strong>you own or are explicitly authorized to test.</strong></p><h3>What XSS actually is</h3><p>A web page is HTML and JavaScript. When an app takes something you typed — a comment, a search term, a profile field — and drops it into a page <em>without properly encoding it</em>, your input stops being data and becomes part of the page’s code. Add &lt;script&gt; (or an event handler, or a javascript: URL) and the browser runs it.</p><p>The critical consequence: that script runs with the <strong>victim’s</strong> session and the <strong>app’s</strong> origin. It can read cookies (if not HttpOnly), make authenticated requests as the victim, read the page, log keystrokes, and exfiltrate data — anything the user could do, your script can do, silently.</p><h3>The three types of XSS</h3><ul><li><strong>Reflected XSS.</strong> Your payload is in the request (a URL parameter, a form field) and the server reflects it straight back into the response. It fires when a victim opens a crafted link. One victim per link, but trivial to deliver via phishing.</li><li><strong>Stored XSS.</strong> Your payload is <strong>saved</strong> by the app — in a comment, a profile, a support ticket, a product review — and runs for <strong>everyone</strong> who views that content. The most dangerous type: no link needed, and it can hit admins and spread like a worm.</li><li><strong>DOM-based XSS.</strong> The vulnerability is entirely in the <strong>client-side JavaScript</strong> — the server never sees the payload. Unsafe JS takes a value from a <em>source</em> (like location.hash) and writes it to a dangerous <em>sink</em> (like innerHTML or eval), executing it in the browser.</li></ul><p>Knowing the type tells you how to deliver and confirm it; knowing the <em>context</em> tells you what payload to use.</p><h3>Context is everything</h3><p>The same input lands in different places in the page, and each place needs a different payload. This is the part beginners miss. Where does your input appear?</p><ul><li><strong>HTML body</strong> — between tags. A classic &lt;script&gt; or &lt;img src=x onerror=...&gt; works.</li><li><strong>HTML attribute</strong> — inside value=&quot;...&quot;. You first break out of the attribute (&quot;&gt;), then inject.</li><li><strong>JavaScript context</strong> — inside a &lt;script&gt; block or an inline handler. You break out of the string/statement (&#39;; or &lt;/script&gt;) and write JS directly.</li><li><strong>URL context</strong> — inside an href/src. A javascript: URL can execute.</li><li><strong>CSS / other</strong> — rarer, but style contexts have their own injection paths.</li></ul><p>Figuring out the context — and what characters are and aren’t encoded there — is the whole craft. The payload that fires in an HTML body does nothing inside a JS string, and vice versa.</p><h3>Where XSS hides</h3><p>Anywhere user input reaches the page:</p><ul><li><strong>Search boxes</strong> that echo “results for: <em>your term</em>.”</li><li><strong>Comments, reviews, posts, messages</strong> (stored).</li><li><strong>Profile fields</strong> — name, bio, website, location.</li><li><strong>URL parameters</strong> reflected into the page (reflected/DOM).</li><li><strong>Error messages</strong> that echo the bad input.</li><li><strong>HTTP headers</strong> reflected into pages (Referer, User-Agent).</li><li><strong>File names</strong> shown in an upload list.</li><li><strong>Markdown / rich text / SVG</strong> that renders HTML.</li><li><strong>JSON data</strong> rendered into the DOM by client-side JS (prime DOM-XSS territory).</li></ul><h3>How to find and test XSS</h3><p><strong>1. Inject a unique probe.</strong> Put a harmless, searchable marker into every input — something like xss7391 — and find everywhere it appears in the response or the DOM.</p><p><strong>2. Identify the context.</strong> For each reflection, look at <em>where</em> it landed: HTML body, an attribute, a script block, a URL. That decides your payload.</p><p><strong>3. Test whether special characters survive.</strong> Try the characters you’d need to break out — &lt; &gt; &quot; &#39; / — and see which are encoded. If &lt; becomes &amp;lt;, that context is encoding HTML; if it passes through raw, it&#39;s injectable.</p><p><strong>4. Build a context-appropriate proof.</strong> Start with a benign, unmistakable proof of execution rather than anything harmful — the point is to <em>demonstrate</em> script runs, not to attack users:</p><pre>HTML body:        &lt;img src=x onerror=alert(document.domain)&gt;<br>Attribute:        &quot;&gt;&lt;img src=x onerror=alert(document.domain)&gt;<br>JS string:        &#39;;alert(document.domain)//<br>URL:              javascript:alert(document.domain)</pre><p>alert(document.domain) is the convention because it proves execution <em>and</em> the origin it runs in — enough for a report, without touching anyone&#39;s data.</p><p><strong>5. For stored XSS</strong>, inject the payload, then load the page as another test account to confirm it fires for other users. For <strong>DOM XSS</strong>, trace the JavaScript from source (location, document.referrer, postMessage) to sink (innerHTML, document.write, eval, setAttribute) in the browser&#39;s dev tools.</p><p><strong>6. Report it</strong> with the exact input, the URL/page, the context, a benign proof-of-execution payload, the realistic impact (session/account takeover), and the fix. Only on systems you’re authorized to test, and never with a payload that touches real users’ data.</p><h3>The impact (why it’s rated high)</h3><ul><li><strong>Session/cookie theft</strong> → account takeover (unless cookies are HttpOnly).</li><li><strong>Acting as the victim</strong> — making authenticated requests, changing their settings, stealing their CSRF token.</li><li><strong>Credential capture</strong> — a fake login prompt injected into a trusted page.</li><li><strong>Worming</strong> — stored XSS that re-injects itself spreads across users.</li></ul><h3>The fix</h3><ul><li><strong>Context-aware output encoding</strong> — the core fix. Encode user data for the <em>exact</em> context it’s placed in (HTML, attribute, JS, URL). Modern frameworks (React, Angular, Vue) auto-escape by default — don’t override that with dangerouslySetInnerHTML / v-html on untrusted data.</li><li><strong>A Content Security Policy (CSP)</strong> — a strong CSP (no inline script, nonces/hashes, tight script-src) turns many XSS bugs from &quot;account takeover&quot; into &quot;nothing happens.&quot; Defense in depth, not a substitute for encoding.</li><li><strong>HttpOnly cookies</strong> — so even successful XSS can&#39;t read the session cookie.</li><li><strong>Sanitize HTML you must render</strong> — if users submit rich text, run it through a vetted sanitizer like <strong>DOMPurify</strong>; never build it by hand.</li><li><strong>Avoid dangerous sinks</strong> — no innerHTML, document.write, or eval on untrusted data; use textContent and safe DOM APIs.</li><li><strong>Validate input</strong> as a secondary layer — but output encoding is what actually stops XSS, not input filters (which get bypassed).</li></ul><h3>Common Mistakes to Avoid</h3><ul><li>Testing against systems or users you aren’t authorized to assess.</li><li>Testing one payload everywhere instead of matching the payload to the context.</li><li>Only checking the HTML response and missing DOM-based XSS in the JavaScript.</li><li>Assuming a WAF or input filter is the fix — both get bypassed; encoding is the fix.</li><li>Rendering user HTML/markdown/SVG without a sanitizer.</li><li>Using innerHTML/dangerouslySetInnerHTML/v-html on untrusted data.</li><li>Forgetting HttpOnly on session cookies, turning XSS straight into session theft.</li><li>Using a real user’s data in a proof — alert(document.domain) proves it without harm.</li></ul><h3>A Quick XSS Checklist</h3><ul><li>You’re testing only inputs and targets you’re authorized to assess.</li><li>Every user input is traced to where it appears in the response and the DOM.</li><li>The injection context (HTML/attribute/JS/URL) is identified for each reflection.</li><li>Payloads are context-appropriate, and proof is benign (alert(document.domain)).</li><li>Stored cases are confirmed from a second account; DOM cases traced source → sink.</li><li>On the fix: output is context-encoded; the framework’s auto-escaping isn’t bypassed.</li><li>A strong CSP is in place; session cookies are HttpOnly.</li><li>Any rendered rich text/HTML goes through a vetted sanitizer; dangerous sinks are avoided.</li></ul><h3>Final Thoughts</h3><p>XSS persists because every app takes user input and shows it to users, and the gap between “data” and “code” is one missing encode wide. The fix isn’t exotic: encode output for its context, add a CSP, mark cookies HttpOnly, and sanitize anything you deliberately render as HTML. The craft of <em>finding</em> it is all about context — the same character that&#39;s harmless in one place is a running script in another.</p><p>If you build or test web apps, do one thing this week: pick any field that shows your input back to you, drop in &quot;&gt;&lt;img src=x onerror=alert(document.domain)&gt;, and see what the browser does. If a box pops, you&#39;ve found the gap between data and code — and you know exactly which encode closes it.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65f73849da5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SSTI Attacks Explained: When {{7*7}} Returns 49, You Have a Problem]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/ssti-attacks-explained-when-7-7-returns-49-you-have-a-problem-d8ad37d11123?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8ad37d11123</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[red-team]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Wed, 25 Nov 2026 01:12:53 GMT</pubDate>
            <atom:updated>2026-11-25T01:12:53.896Z</atom:updated>
            <content:encoded><![CDATA[<p><em>If user input lands inside a server-side template, the template engine may run it as code — and that road often ends in remote code execution. Here’s how SSTI works, how to detect it, and how to fix it. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eZXkH4WhJkuvfeWkVMAy4Q.png" /></figure><p>Here’s a quiet, high-severity bug hiding in a convenience almost every app uses: <strong>templates.</strong> Apps build pages, emails and documents from templates — “Hi {{name}}, welcome back.” The engine (Jinja2, Twig, Freemarker, Velocity, ERB…) fills in the variables. That’s fine <em>when the template is fixed and the user data is just a value.</em> It goes very wrong when <strong>user input becomes part of the template itself</strong>, because template engines don’t just substitute — they <strong>evaluate expressions.</strong></p><p>That’s <strong>Server-Side Template Injection (SSTI)</strong>, and because template expressions can reach objects, classes and ultimately the operating system, SSTI frequently escalates to <strong>remote code execution</strong>. This guide covers how it works, how to <em>detect</em> it safely, and how to fix it — all for systems <strong>you own or are explicitly authorized to test.</strong></p><h3>What SSTI actually is</h3><p>There’s a critical difference between these two:</p><pre># Safe: user data is passed as a VALUE into a fixed template<br>render_template(&quot;hello.html&quot;, name=user_input)<br># Vulnerable: user data is concatenated INTO the template source<br>render_template_string(&quot;Hello &quot; + user_input)</pre><p>In the second case, whatever the user types becomes part of the template <em>code</em>. If they type template syntax, the engine executes it. name was supposed to be data; now it&#39;s logic. And template logic, in most engines, can walk the object graph — from a harmless string, to its class, to built-in functions, to running shell commands.</p><p>That’s the whole arc of SSTI: <strong>data crosses into code, and template code can reach the OS.</strong></p><h3>Why it’s so dangerous</h3><ul><li><strong>Remote code execution.</strong> The common endgame — template expressions reach OS command execution, giving full control of the server.</li><li><strong>File read / data exfiltration.</strong> Read config, secrets, source, environment variables.</li><li><strong>SSRF and internal access</strong> from the server’s position.</li><li>It’s often in <strong>low-suspicion features</strong> — email personalization, a “custom greeting,” a report name — that nobody threat-models.</li></ul><h3>How to detect SSTI (safely)</h3><p>The beauty of SSTI detection is that you can prove it with <strong>arithmetic</strong>, no harm done.</p><p><strong>1. Inject a math probe.</strong> Put a simple expression where your input is reflected and see if the server <em>computes</em> it:</p><pre>{{7*7}}      → 49    (Jinja2, Twig)<br>${7*7}       → 49    (Freemarker, some JSP/EL)<br>#{7*7}       → 49    (Velocity-style, some engines)<br>&lt;%= 7*7 %&gt;   → 49    (ERB)</pre><p>If the page renders <strong>49</strong> instead of the literal {{7*7}}, the input is being evaluated server-side. That 49 is your proof — unambiguous, and completely benign.</p><p><strong>2. Confirm it’s server-side, not client-side.</strong> Client-side template frameworks (some front-end libs) also evaluate {{...}}. Confirm the evaluation happens on the <em>server</em> (e.g., it shows up in the raw HTML response, before any JS runs), so you&#39;re not chasing a client-only quirk.</p><p><strong>3. Fingerprint the engine.</strong> Different engines use different syntax and fail differently. Which probe worked ({{ }} vs ${ } vs #{ }), and how error strings look, tells you whether it&#39;s Jinja2, Twig, Freemarker, Velocity, ERB, etc. The engine determines everything about escalation.</p><p><strong>4. Assess impact carefully.</strong> From the 49 proof, SSTI <em>typically</em> escalates to RCE via engine-specific object traversal — reaching built-in classes and command execution. For a responsible report, <strong>demonstrate the capability minimally</strong> (e.g., read a benign value or show the engine evaluates a safe built-in) rather than running real system commands or touching data. The {{7*7}}=49 plus an accurate description of the realistic RCE path is a strong, safe finding — you&#39;ve proven the sink; you don&#39;t need to pop a shell on a live system to make the point.</p><h3>Where SSTI hides</h3><p>Anywhere user input might reach a template as code:</p><ul><li><strong>Email templates</strong> — “custom message,” personalized campaigns, notification bodies.</li><li><strong>Greeting / personalization</strong> — “Hi {name},” custom dashboards, signatures.</li><li><strong>CMS and page builders</strong> — user-editable templates or layouts.</li><li><strong>Report / document generation</strong> — custom report titles, invoice fields, PDF content.</li><li><strong>Error and preview pages</strong> that echo input through the rendering layer.</li><li><strong>Any </strong><strong>render_template_string-style call</strong> (or the equivalent in Twig, Freemarker, etc.) that concatenates user input.</li></ul><p>If a feature lets users influence the <em>format</em> of output, not just the values, test it.</p><h3>The fix</h3><p>The root cause is always the same — user input became template <em>code</em> — so the fix is to keep it as <em>data</em>.</p><ul><li><strong>Never concatenate user input into template source.</strong> Pass it as a <strong>context variable</strong> into a fixed template (render_template(&quot;t.html&quot;, name=x)), so the engine treats it as a value, never as logic. This single rule kills almost all SSTI.</li><li><strong>Avoid dynamic template construction</strong> — render_template_string, building template strings from input, user-supplied template files.</li><li><strong>Use a sandboxed or logic-less engine</strong> where user content must be templated — e.g., a logic-less engine (Mustache-style) or an engine’s sandbox mode that blocks access to objects and built-ins. (Sandboxes have had bypasses — treat them as defense in depth, not a guarantee.)</li><li><strong>Validate/allow-list</strong> what users can put in format-affecting fields, as a secondary layer.</li><li><strong>Run the renderer with least privilege</strong> and network egress restrictions, so even a successful SSTI has a smaller blast radius.</li></ul><h3>Common Mistakes to Avoid</h3><ul><li>Testing systems you don’t own or aren’t authorized to assess.</li><li>Jumping straight to RCE payloads instead of proving the sink with {{7*7}}.</li><li>Confusing client-side template evaluation with server-side SSTI.</li><li>Running destructive or data-touching commands to “prove” impact — the 49 plus a described path is enough and safe.</li><li>On the defense side: concatenating user input into templates, or using render_template_string on untrusted input.</li><li>Trusting a template sandbox as a complete fix (they’ve been bypassed).</li><li>Templating user content with a full-featured engine when a logic-less one would do.</li></ul><h3>A Quick SSTI Checklist</h3><ul><li>You’re testing only inputs and targets you’re authorized to assess.</li><li>Every field that could influence output <em>format</em> (not just values) is identified.</li><li>Each is probed with {{7*7}} / ${7*7} / #{7*7} / &lt;%= 7*7 %&gt; and checked for 49.</li><li>Server-side evaluation is confirmed (shows in the raw response, not just client JS).</li><li>The engine is fingerprinted; impact is assessed and described, proven minimally and safely.</li><li>On the fix: user input is passed as context data, never concatenated into template source.</li><li>No dynamic/string-built templates on untrusted input; a sandboxed/logic-less engine where needed.</li><li>The renderer runs least-privilege with restricted egress.</li></ul><h3>Final Thoughts</h3><p>SSTI is the result of a small, understandable mistake with an outsized payoff: a developer builds a template string with user input to make personalization easy, and in doing so hands the user a programming language that runs on the server. The tell is almost comically simple — {{7*7}} comes back as 49 — and the fix is equally simple to state: user input is a <em>value</em>, never part of the template. Keep that line and SSTI can&#39;t happen.</p><p>If you build or test apps that generate anything from templates — pages, emails, reports — do one thing this week: drop {{7*7}} into every field that ends up in that output. If any of them answer 49, your template just became a shell, and you know exactly which line to change.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8ad37d11123" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Response Manipulation Explained: How Changing “false” to “true” Bypasses OTP, Login and Paywalls…]]></title>
            <link>https://medium.com/@vigneshkumaroffsec/response-manipulation-explained-how-changing-false-to-true-bypasses-otp-login-and-paywalls-32d6b7d39189?source=rss-07ee411d0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/32d6b7d39189</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Vigneshkumaroffsec]]></dc:creator>
            <pubDate>Tue, 24 Nov 2026 02:28:40 GMT</pubDate>
            <atom:updated>2026-11-24T02:28:40.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>Response Manipulation Explained: How Changing “false” to “true” Bypasses OTP, Login and Paywalls, and How to Stop It</h3><p><em>The server said no. The attacker edited the response to say yes, and the app believed it. Here is how response and status code manipulation works, when it is critical, how to test for it, and the fix. Authorized testing only.</em></p><p>By Vignesh Kumar | Security Researcher</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3Ldgp7htDCB5KvJ_gzbIg.png" /></figure><p>Some of the most serious bugs I look for during an assessment need no payload at all. No injection, no exploit, no clever encoding. Just one word changed in a response.</p><p>You enter a wrong OTP. The server correctly replies {&quot;success&quot;: false}. You catch that response in a proxy, change false to true, and let it through. The app moves you to the next screen, the one that says &quot;set your new password&quot;. You set it. It works.</p><p>The server did its job. It said no. The problem is that the app asked the server a question and then let the <strong>client</strong> act on the answer. And the client is the one part of the system the attacker fully controls.</p><p>This guide explains how response manipulation and status code manipulation work, how to tell a critical finding from a cosmetic one, how to test for it, and how to fix it. All for systems <strong>you own or are explicitly authorized to test</strong>.</p><h3>What response manipulation actually is</h3><p>Every HTTP response passes through the user’s machine before the app acts on it. With an intercepting proxy like Burp Suite or OWASP ZAP, the user can pause that response and edit anything in it: the body, the headers, the status code.</p><p>That is not a vulnerability by itself. Users can always lie to their own browser. The vulnerability appears when <strong>the application’s security decision is made on the client, based on a response the client can rewrite</strong>.</p><p>There are two common forms:</p><ul><li><strong>Response body manipulation.</strong> The server returns something like {&quot;success&quot;: false}, {&quot;verified&quot;: false}, {&quot;role&quot;: &quot;user&quot;} or {&quot;isPremium&quot;: false}. The attacker changes the value, and the front end unlocks the next step or the hidden feature.</li><li><strong>Status code manipulation.</strong> The server returns 401 Unauthorized or 403 Forbidden. The attacker changes it to 200 OK, sometimes alongside a fake success body, and the front end treats the request as allowed.</li></ul><p>In both cases the server’s answer was correct. The bug is what happens next.</p><h3>How the attack works, step by step</h3><p>Take a typical password reset flow with an OTP:</p><ol><li>The user enters their email. The server sends an OTP.</li><li>The user enters the OTP. The app calls POST /api/verify-otp.</li><li>The server checks it and replies with a result.</li><li>If the result says success, the front end shows the “new password” form.</li><li>The app calls POST /api/reset-password with the email and the new password.</li></ol><p>Here is what the vulnerable version looks like.</p><pre>POST /api/verify-otp<br>{&quot;email&quot;: &quot;victim@example.com&quot;, &quot;otp&quot;: &quot;000000&quot;}<br>HTTP/1.1 200 OK<br>{&quot;success&quot;: false, &quot;message&quot;: &quot;Invalid OTP&quot;}</pre><p>The attacker intercepts the response and rewrites it:</p><pre>HTTP/1.1 200 OK<br>{&quot;success&quot;: true, &quot;message&quot;: &quot;OTP verified&quot;}</pre><p>The front end trusts it:</p><pre>// client: the only place the OTP result is enforced<br>const res = await api.post(&quot;/api/verify-otp&quot;, { email, otp });<br>if (res.data.success) {<br>  showNewPasswordForm();<br>}</pre><p>And the next endpoint never asks whether the OTP was actually verified:</p><pre>// server: vulnerable, trusts that the client only gets here after a valid OTP<br>app.post(&quot;/api/reset-password&quot;, async (req, res) =&gt; {<br>  const { email, newPassword } = req.body;<br>  await users.updatePassword(email, newPassword);<br>  res.json({ success: true });<br>});</pre><p>That is a full account takeover. The attacker never knew the OTP. They only needed the victim’s email address.</p><p>The status code version is the same idea. A route returns 403 Forbidden for a normal user, the front end hides the admin screen on a 403, the attacker changes it to 200 OK, and the admin screen renders. Whether that matters depends entirely on the next request.</p><h3>When it is critical, and when it is not</h3><p>This is the part that matters most, and the part that gets reported wrong most often. It is important to be precise about the impact.</p><p>Changing a response only changes <strong>what the client believes</strong>. It does not change what the server will allow. So the real question is always:</p><blockquote><em>After I flip the response, does the </em><strong><em>next server request</em></strong><em> succeed?</em></blockquote><p><strong>It is critical when the server trusts the step you skipped.</strong></p><ul><li>An OTP or 2FA check is enforced only in the front end, and the next endpoint (reset password, complete login, change email) does not verify that the check passed. That is authentication bypass or account takeover.</li><li>A login response contains the session token only after “success”, but the token itself was already issued, or a later endpoint accepts a user ID without a real session.</li><li>A payment or subscription check happens client-side, and the “premium” API endpoints do not check the entitlement on the server. That is a business logic bypass with direct financial impact.</li></ul><p><strong>It is low or informational when the server still enforces everything.</strong></p><ul><li>You flip a 403 to 200 and the admin page renders, but every API call behind it still returns 403. You can see the empty shell of an admin screen. That is UI exposure. It may leak route names or feature flags, which is worth a note, but it is not a privilege escalation.</li><li>You flip isPremium to true and the premium buttons appear, but the premium content endpoint checks the subscription and refuses.</li></ul><p>A good report shows the second request. “I changed false to true and the screen changed” is not a finding. “I changed false to true, and then POST /api/reset-password changed the victim&#39;s password without a valid OTP&quot; is a critical one.</p><h3>Why this is so critical when it hits</h3><p><strong>It needs no skill to exploit.</strong> Once the pattern is known, anyone with a free proxy can repeat it. There is nothing to brute force and no rate limit to trip, because the attacker sends exactly one wrong OTP.</p><p><strong>It lands on the most sensitive flows.</strong> Response manipulation almost always shows up in authentication: OTP verification, 2FA, password reset, login, email change. Those are the flows that protect the whole account. A bypass there is account takeover, and account takeover is usually rated critical or high by bug bounty programs.</p><p><strong>Scanners miss it.</strong> An automated scanner sees {&quot;success&quot;: false} and moves on. It has no idea that the business rule &quot;you must pass OTP before reset&quot; is enforced only in JavaScript. This is a logic flaw, and logic flaws are found by people who understand the flow.</p><p><strong>It is common in mobile apps and single page apps.</strong> These apps put a lot of flow control in the client. Developers write if (response.success) navigate(...) and assume the navigation is the security control. On mobile it is easy to assume nobody can see or edit the traffic. Anyone with a proxy and a test device can.</p><p><strong>It hides in plain sight.</strong> Each piece looks correct in code review. The OTP endpoint validates properly. The reset endpoint updates the password properly. The bug lives in the gap between them, and nobody owns the gap.</p><h3>How to test for it</h3><p>Only on applications you own or are authorized to assess, using your own test accounts.</p><ol><li><strong>Map the multi-step flows.</strong> Login, OTP, 2FA, password reset, email or phone change, checkout, upgrade, any flow where one step unlocks the next.</li><li><strong>Capture a failing response.</strong> Enter a wrong OTP or use a low-privileged account, and intercept the response in Burp Suite (enable response interception) or ZAP.</li><li><strong>Flip it.</strong> Change false to true, &quot;user&quot; to &quot;admin&quot;, 0 to 1, or the status line 403 Forbidden to 200 OK. For repeat testing, a Match and Replace rule in Burp does this automatically.</li><li><strong>Watch the client.</strong> Does it move to the next step or render the hidden feature?</li><li><strong>Test the next server request. This is the actual test.</strong> Complete the unlocked step and look at the server’s reply. Does the password reset succeed? Does the premium endpoint return data? Does the admin API answer?</li><li><strong>Skip the step entirely.</strong> Go further than editing responses. Call the final endpoint directly without ever calling the verification endpoint. If POST /api/reset-password works without any OTP step, response manipulation was only the visible symptom. The root cause is that the server never links the steps together.</li><li><strong>Report the chain.</strong> The flipped response, the follow-up request, and the server’s success reply. Then the fix.</li></ol><h3>How to mitigate it</h3><p>The fix is one principle applied everywhere: <strong>the client is a display, not a decision maker.</strong> Every security decision is made on the server and checked again at every step that depends on it.</p><p><strong>1. Enforce every step on the server.</strong> The reset endpoint must verify that this specific user passed the OTP check, recently, and on this server. Never assume the client only reaches step two after step one.</p><p><strong>2. Issue proof, not a flag.</strong> When the OTP is verified, the server should return something the client cannot forge: a short-lived, single-use reset token bound to that user, or a server-side session state. The next step requires that proof.</p><pre>// server: fixed. verify-otp issues a one-time token only on a real match<br>app.post(&quot;/api/verify-otp&quot;, async (req, res) =&gt; {<br>  const { email, otp } = req.body;<br>  if (!(await otps.isValid(email, otp))) {<br>    return res.status(400).json({ success: false });<br>  }<br>  await otps.consume(email);<br>  const resetToken = await resetTokens.issue(email, { ttlSeconds: 600, singleUse: true });<br>  res.json({ success: true, resetToken });<br>});<br>// reset-password refuses without a valid, unused token for this user<br>app.post(&quot;/api/reset-password&quot;, async (req, res) =&gt; {<br>  const { resetToken, newPassword } = req.body;<br>  const email = await resetTokens.redeem(resetToken); // null if forged, expired or used<br>  if (!email) return res.status(403).json({ success: false });<br>  await users.updatePassword(email, newPassword);<br>  res.json({ success: true });<br>});</pre><p>Now flipping false to true gets the attacker nothing. There is no resetToken in the response to steal, because the server never issued one.</p><p><strong>3. Model multi-step flows as a server-side state machine.</strong> Store the flow’s current state on the server (email entered, OTP verified, password set) and reject any request that arrives out of order.</p><p><strong>4. Authorize every endpoint, not every screen.</strong> Hiding a button or a route is user experience, not access control. Every API endpoint checks the caller’s session, role and entitlement on its own, every time.</p><p><strong>5. Never put security decisions in response fields the client acts on.</strong> Fields like isAdmin, isPremium or otpVerified are fine for showing or hiding UI, as long as no server endpoint trusts them coming back.</p><p><strong>6. Do not ship what the user should not see.</strong> If a low-privileged user receives the admin bundle, every admin route and API name is already exposed. Load privileged code and data only after a server-side check.</p><p><strong>7. Test for skipped steps.</strong> Add automated tests that call each final endpoint directly, without the earlier steps, and expect a 401 or 403. Log and alert on out-of-order flow attempts, such as a reset request with no OTP verification behind it.</p><h3>Common Mistakes to Avoid</h3><ul><li>Treating if (response.success) in the front end as a security control.</li><li>Validating the OTP correctly, then letting the next endpoint accept any email address.</li><li>Returning a “verified” flag instead of issuing a server-bound, single-use token.</li><li>Hiding admin screens on a 403 while the admin APIs behind them lack their own checks.</li><li>Assuming mobile app traffic cannot be intercepted.</li><li>Reporting “I changed the response and the UI changed” without proving that a server request succeeded.</li><li>Testing flows or accounts you are not authorized to assess.</li></ul><h3>A Quick Checklist</h3><ul><li>Every step of every multi-step flow is verified on the server, not the client.</li><li>Verification steps issue short-lived, single-use proof bound to the user, never a boolean.</li><li>Final endpoints (reset, login completion, email change, checkout) reject requests that did not pass the earlier steps.</li><li>Every API endpoint enforces authentication and authorization by itself.</li><li>Client-side flags only drive UI, and no endpoint trusts them.</li><li>Privileged bundles and data are not sent to unprivileged users.</li><li>Tests call final endpoints directly and expect 401 or 403.</li><li>Out-of-order flow attempts are logged and alerted on.</li></ul><h3>Final Thoughts</h3><p>Response manipulation is not really about responses. It is about where the decision is made. If the server says no and the client decides what happens next, the decision belongs to whoever controls the client, and on the internet that is the attacker.</p><p>If you build or test login, OTP or reset flows, do one thing this week. Take one multi-step flow in your own test environment and call its final endpoint directly, without the steps before it. If the server refuses, your flow is sound. If it succeeds, you have found the gap, and you know exactly which rule closes it: the server checks every step, every time.</p><h3>About me</h3><p>I’m Vignesh Kumar, a security researcher working across application security, DevSecOps, cloud security, and vulnerability research.</p><p>I share practical findings from security assessments and responsible disclosures to help improve the security of real-world systems.</p><p><em>The techniques in this article are described for defending and testing systems you own or are authorized to assess.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32d6b7d39189" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>