<?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 sin99xx on Medium]]></title>
        <description><![CDATA[Stories by sin99xx on Medium]]></description>
        <link>https://medium.com/@sin99xx?source=rss-f0364c86c55f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*bNPq5IUhhwL4e_gYyXl4fw@2x.jpeg</url>
            <title>Stories by sin99xx on Medium</title>
            <link>https://medium.com/@sin99xx?source=rss-f0364c86c55f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 10:05:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sin99xx/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[Inner-Parser SSRF]]></title>
            <link>https://sin99xx.medium.com/inner-parser-ssrf-e940b76514e7?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e940b76514e7</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[cyber-security-solutions]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Sat, 06 Jun 2026 01:53:01 GMT</pubDate>
            <atom:updated>2026-06-06T01:53:01.645Z</atom:updated>
            <content:encoded><![CDATA[<h3>The bug class your URL validator was never going to catch</h3><p>If you’ve been doing SSRF long enough, you’ve stopped writing exploits and started writing checklists. Block IP literals in every base. Block internal hostnames. Re-validate after redirects. Check decimal-encoded. Check IPv6 dual-stack. Check the 0177.0.0.1 thing. Check [::ffff:127.0.0.1]. Check DNS rebinding windows.</p><p>That checklist works on the SSRF where there’s <strong>one</strong> fetcher.</p><p>This is about the SSRF where there’s two — where every item on that checklist gets implemented correctly, the team is genuinely proud of their validator, and the bug ships anyway because <strong>a second piece of code, sitting one layer deeper, also knows how to make outbound HTTP requests, and nobody told it about the rules.</strong></p><p><strong>Two parts of a system disagreeing about whose job it was to enforce the boundary.</strong></p><p>Inner-parser SSRF is that family showing up in outbound network requests. Once you see the shape, you find it everywhere.</p><p>This note stands on top of a long lineage. The video-format version of this bug was named in 2016 by <strong>Maxim Andreev</strong> and <strong>Nikolay Ermishkin</strong> in their BlackHat USA talk on SSRF in video converters, and sharpened in 2017 by <a href="https://github.com/neex"><strong>@neex</strong></a> with the AVI/m3u8/XBIN polyglot that turned the same idea into reliable arbitrary file read. The image-format version was disclosed the same year as <strong>ImageTragick</strong> by <strong>Stewie</strong> and the Mail.Ru security team — the MVG/MSL/SVG family of coders that quietly speak HTTP. <strong>Ben Sadeghipour</strong> and <strong>Cody Brocious</strong> did the same job for PDF generators a few years later. <strong>Orange Tsai</strong>’s URL-parser work is the adjacent shape of the same family — different layer, same lesson. Reading list at the bottom; the rest of this note is the version of the argument I keep wishing someone had told me earlier.</p><h3>The shape</h3><p>A service takes a URL from you. The validator on that URL is good. Excellent, even. Scheme allowlist, IP-literal block, hostname block, redirect re-validation. Everything you’d want.</p><p>The validator’s job ends the moment it hands the bytes off to whatever processes the file.</p><p>After that point, <strong>some other piece of code is parsing what’s inside those bytes.</strong> And that other piece of code has its own opinions about what URLs mean. Almost every rich file format embeds references — to other files, to remote resources, to includes, to external entities, to fragments, to fonts, to thumbnails. The library that parses the format is, by design, willing to follow those references.</p><p>The bug is that <strong>the inner library was written assuming the bytes it receives are trusted.</strong> Because they came through the validator. Because someone else’s code put them there. Because nobody on that team was thinking of the media decoder, or the image library, or the office-doc parser, as a network client.</p><p>But it is one. It always was. The validator just couldn’t see it.</p><h3>The proof</h3><p>Here’s the version of this I just shipped on a target whose name doesn’t matter. The endpoint took an audio file for processing. Three schemes accepted on the URL. IP literals blocked in every encoding I tried. Internal hostnames blocked. Redirects re-validated.</p><p>I stopped attacking the URL.</p><p>The platform let me upload files to its own storage and then reference them by an internal URI. So I uploaded a file. The file extension said .mp3. The MIME type said audio/mpeg. The validator was happy on every checkable property.</p><p>The actual bytes were this:</p><pre>#EXTM3U<br>#EXT-X-VERSION:3<br>#EXT-X-TARGETDURATION:1<br>#EXTINF:1.0,<br>https://my-inspector.example/probe-A.ts<br>#EXTINF:1.0,<br>https://my-inspector.example/probe-B.ts<br>#EXT-X-ENDLIST</pre><p>That’s a streaming playlist — the format used for HLS video. When a media library sees #EXTM3U as the first line of a file, it stops thinking of the file as data and starts thinking of it as <strong>a list of things to download</strong>. That&#39;s what playlists are for.</p><p>The validator never read the body. The decoder did. Within a few seconds my inspector started lighting up — two GET requests, from a cloud IP that was visibly not the same fleet as the platform’s normal outbound traffic. Different cloud provider entirely. Different User-Agent: the unmistakable Lavf/... signature of FFmpeg&#39;s internal HTTP fetcher.</p><p>Two fetchers. One trust boundary. Zero coordination.</p><p>What was protected By what Held? The submitted URL Outer validator (scheme, IP, hostname, redirects) ✅ The URLs <em>inside</em> the submitted file (nothing) ❌</p><p>That’s the whole bug. There was exactly one layer of defense, and it was looking at the wrong thing.</p><h3>Where to hunt</h3><p>This is the part where you go run.</p><p>Anywhere a service does fetch(user_url) → hand bytes to library, the library is a candidate. The question is whether the library follows URLs in the content. Many do. Most teams don&#39;t realize it.</p><p><strong>Media:</strong></p><ul><li>FFmpeg / libavformat (HLS playlists, DASH manifests, concat protocol, subfile protocol, RTMP/RTSP, anything you let through -protocol_whitelist)</li><li>GStreamer (playlist elements, manifest demuxers)</li><li>video thumbnail generators that wrap one of the above</li><li>audio fingerprinters and transcoders — same underlying libraries</li></ul><p><strong>Images and graphics:</strong></p><ul><li>ImageMagick / GraphicsMagick (MVG, SVG, MSL, the ghosts of Imagetragick — still a class, not just a CVE)</li><li>librsvg and SVG-supporting image libs (&lt;image href=&quot;...&quot;&gt;, &lt;use href=&quot;...&quot;&gt;)</li><li>icon and favicon generators</li><li>AI image services that pre-process or transcode uploads</li></ul><p><strong>Documents:</strong></p><ul><li>Office parsers that follow external relationships, linked images, OLE references (.docx, .xlsx, .pptx are zip files full of XML that can reference outside resources)</li><li>PDF processors that resolve embedded URIs, remote fonts, XFA references, GoToR actions</li><li>HTML-to-PDF converters (wkhtmltopdf, headless Chrome wrappers, Puppeteer/Playwright endpoints) — these are <em>literally browsers</em> sitting behind your URL validator</li><li>Markdown renderers that fetch images server-side for preview/OG cards</li></ul><p><strong>Data and structured formats:</strong></p><ul><li>XML parsers with external entities enabled (XXE is inner-parser SSRF wearing a different hat)</li><li>XSLT processors with document() enabled</li><li>some YAML libraries with custom tag resolvers</li><li>LDAP referral chasing</li></ul><p><strong>Web stack:</strong></p><ul><li>link-preview and OG-card services</li><li>webhook receivers that fetch linked assets out of payloads</li><li>AI/LLM “browse this URL” tools wrapped behind a “safe” frontend validator</li><li>import-from-URL features on every CMS, project manager, design tool, and dashboard tool you’ve ever signed up for</li></ul><p>In every one of these, the team’s mental model is that the <em>outer</em> URL is the attack surface. The inner library is “just processing the file.” It is not just processing the file. It is, in a real and load-bearing sense, a second HTTP client running on your infrastructure with no allowlist.</p><h3>How to test</h3><p>Three moves, in order.</p><p><strong>One: confirm the inner fetcher exists.</strong> Upload a file in the expected format whose body contains a reference to an inspector you control — a remote &lt;image&gt; in an SVG, a remote font in a PDF, an EXT-X-STREAM-INF line in an m3u8, a &lt;v:imagedata r:href&gt; in a DOCX, an XML external entity (try parameter entities + OOB DTD if direct doesn&#39;t work), an &lt;img&gt; in HTML being rendered to PDF. Submit the file through the normal endpoint. Watch the inspector. If anything fires, you have an inner fetcher and you now know its egress identity.</p><p><strong>Two: confirm the inner fetcher does not share the outer fetcher’s policy.</strong> Re-aim the inner reference at the things the outer validator was blocking. Cloud metadata endpoints (169.254.169.254, metadata.google.internal, IMDSv2 if you can talk to it, the Azure 169.254.169.254/metadata/instance path with the required header). Internal-looking hostnames. Localhost in every encoding. If the outer validator wouldn&#39;t let you talk to these from the URL field and the inner one will, you have crossed a boundary the team didn&#39;t know existed.</p><p><strong>Three: confirm scope.</strong> What protocols does the inner library understand? FFmpeg, in particular, is a protocol monster — it speaks file://, concat:, subfile:, crypto:, rtp://, srtp://, pipe:, unix://, and more, unless an explicit -protocol_whitelist has been set. Image libraries vary. Office parsers vary. Each enabled protocol is a separate question about what the bug actually gets you — read local files, exfil via DNS, hit non-HTTP services, pivot into something stranger.</p><p>If you get to step three and the answers are interesting, you’ve got a real report.</p><h3>What the fix actually has to do</h3><p>Most teams’ first instinct is to add the same outer-validator logic to the inner fetcher. That’s correct, but it’s not enough.</p><p>The deeper fix is to <strong>stop treating the inner library as a passive consumer of trusted bytes.</strong> Once you’ve named it a network client, you can give it a network client’s restrictions: an explicit protocol allowlist; an egress proxy with the same IP/hostname policy as the outer fetcher; a refusal to process content whose magic bytes don’t match the declared format; in some cases, disabling the relevant feature in the library at build time (FFmpeg supports --disable-demuxer=hls, ImageMagick has policy.xml, libxml2 has XML_PARSE_NONET).</p><p>The architectural fix is to align egress policy across <strong>every</strong> subsystem on the path. If the outer fetcher runs in one cloud with one policy and the decoder fleet runs in a different cloud with a different policy, you didn’t harden a system. You hardened a fence.</p><h3>Prior art</h3><p>This bug class has a long, well-documented history. Reading list, grouped by where the inner parser lives — if your target uses any of these stacks, the linked work is the fastest way to internalize what to throw at it.</p><p><strong>Video / FFmpeg / HLS</strong></p><ul><li>Maxim Andreev &amp; Nikolay Ermishkin, <em>Viral Video — Exploiting SSRF in Video Converters</em>, BlackHat USA 2016. The foundational work. (<a href="https://www.blackhat.com/docs/us-16/materials/us-16-Ermishkin-Viral-Video-Exploiting-Ssrf-In-Video-Converters.pdf">slides</a>)</li><li><a href="https://github.com/neex">@neex</a> / Emil Lerner, <em>ffmpeg-avi-m3u-xbin</em> — the AVI/GAB2/XBIN polyglot that smuggles an m3u8 inside a valid AVI, defeating extension and MIME checks and turning the SSRF into reliable arbitrary file read. (<a href="https://github.com/neex/ffmpeg-avi-m3u-xbin">github</a>)</li><li>Neex, <em>SSRF and local file disclosure in libavformat</em> on Automattic, HackerOne #237381, 2017. (<a href="https://hackerone.com/reports/237381">report</a>)</li><li><em>Arbitrary file read via ffmpeg HLS parser</em> on Flickr, HackerOne #487008. (<a href="https://hackerone.com/reports/487008">report</a>)</li><li>ZeroNights 2017 <em>yngwie</em> slides on FFmpeg, more demuxer and protocol abuse. (<a href="https://2017.zeronights.org/wp-content/uploads/materials/ZN17_yngwie_ffmpeg.pdf">pdf</a>)</li><li>Independent Security Evaluators, <em>HLS / concat / subfile</em> writeup. (<a href="https://www.securityevaluators.com/hlsconcat-subfile/">writeup</a>)</li><li>FFmpeg documentation: the -protocol_whitelist option is the supported fix. If your target hasn&#39;t set it, that is the bug.</li></ul><p><strong>Image / ImageMagick / SVG</strong></p><ul><li><em>ImageTragick</em>, 2016 — the umbrella name for the MVG/MSL/HTTPS/EPHEMERAL/LABEL coder family. CVE-2016–3714 (RCE), CVE-2016–3715 (file delete via ephemeral:), CVE-2016-3716 (file move via msl:), CVE-2016-3717 (file read via label:@), CVE-2016-3718 (SSRF via url(https://medium.com/...)). Originally reported by Stewie and Nikolay Ermishkin. (<a href="https://imagetragick.com/">imagetragick.com</a>, <a href="https://github.com/ImageTragick/PoCs">PoCs</a>)</li><li>Yurii Sanin, <em>svg2raster-cheatsheet</em> — the most complete map of what server-side SVG rasterizers will do for you (xlink:href, feImage, xsl:import, font references, Batik scripting). (<a href="https://github.com/yuriisanin/svg2raster-cheatsheet">cheatsheet</a>)</li><li>Fortinet, <em>Anatomy of SVG Attack Surface on the Web</em> — xlink:href as billion-laughs vector, useful for understanding which engines parse what. (<a href="https://www.fortinet.com/blog/threat-research/scalable-vector-graphics-attack-surface-anatomy">blog</a>)</li><li>barrracud4 / <em>image-upload-exploits</em> — a maintained PoC library of payloads for ImageMagick, GraphicsMagick, librsvg, et al. (<a href="https://github.com/barrracud4/image-upload-exploits">github</a>)</li></ul><p><strong>PDF generators / headless renderers</strong></p><ul><li>Ben Sadeghipour (<a href="https://twitter.com/NahamSec">@NahamSec</a>) &amp; Cody Brocious (<a href="https://twitter.com/daeken">@daeken</a>), <em>Owning the Cloud through SSRF and PDF Generators</em>, DEF CON 27 / AppSecCali 2020. The canonical talk on this surface. (<a href="https://static.sched.com/hosted_files/appseccalifornia2020/11/Ben%20Sadeghipour%20-%20Owning%20the%20clout%20through%20SSRF%20and%20PDF%20generators%20-%20ORIGINAL.pdf">slides</a>, <a href="https://www.youtube.com/watch?v=6EyhhmIxPwg">video</a>)</li><li>CVE-2022–35583 — wkhtmltopdf 0.12.6 SSRF, the textbook case of a headless renderer with no egress restrictions. (<a href="https://github.com/wkhtmltopdf/wkhtmltopdf/issues/5249">github issue</a>)</li><li>BHIS, <em>Hunting for SSRF Bugs in PDF Generators</em> — practical hunting walkthrough for the headless-Chrome class. (<a href="https://www.blackhillsinfosec.com/hunting-for-ssrf-bugs-in-pdf-generators/">blog</a>)</li></ul><p><strong>XML / Office documents (XXE is inner-parser SSRF in a different costume)</strong></p><ul><li>Mohamed A. Baset, <em>How I Hacked Facebook with a Word Document</em>, 2014/2015. The earliest widely-cited example of weaponizing OOXML’s DTD reference behavior — a .docx as XXE vector. (<a href="https://www.bram.us/2014/12/29/how-i-hacked-facebook-with-a-word-document/">writeup</a>)</li><li>The broader XXE literature treats this as its own bug class; the framing of this writeup is that it is structurally the same one — an inner parser following references in user-supplied content.</li></ul><p><strong>URL parser SSRF (adjacent shape, same family)</strong></p><ul><li>Orange Tsai, <em>A New Era of SSRF — Exploiting URL Parsers in Trending Programming Languages</em>, BlackHat USA 2017. The classic on parser-disagreement SSRF — not the same layer as this note, but the same kind of mistake one level up: two components seeing different things in the same input. (<a href="https://www.blackhat.com/docs/us-17/thursday/us-17-Tsai-A-New-Era-Of-SSRF-Exploiting-URL-Parser-In-Trending-Programming-Languages.pdf">slides</a>)</li></ul><p><strong>General SSRF references</strong></p><ul><li>PortSwigger, <em>Web Security Academy: SSRF</em>. (<a href="https://portswigger.net/web-security/ssrf">academy</a>)</li><li>swisskyrepo, <em>PayloadsAllTheThings — Server Side Request Forgery</em>. The default payload corpus; useful for the outer-validator phase before you go after the inner parser. (<a href="https://github.com/swisskyrepo/PayloadsAllTheThings/tree/master/Server%20Side%20Request%20Forgery">github</a>)</li><li>cujanovic, <em>SSRF-Testing</em>. (<a href="https://github.com/cujanovic/SSRF-Testing">github</a>)</li><li>OWASP, <em>Server-Side Request Forgery Prevention Cheat Sheet</em>. (<a href="https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html">cheatsheet</a>)</li></ul><p>If something in this list isn’t on your target’s vendor allowlist of acceptable behavior, you probably have a report.</p><h3>Final thesis</h3><p>SSRF is taught as a URL-validation problem. That framing holds for the simplest version. It stops holding the moment more than one component in your system is willing to make outbound requests.</p><p>The question that does hold up, the one I keep coming back to in every writeup in this repo, is some variant of this:</p><p><strong>Which components in this system are doing the security-critical thing, and which of them are quietly trusting somebody else to have done it for them?</strong></p><p>If a system’s answer is “the front layer checks, and the rest of them assume,” the bug is already there. You just have to find the inner parser that’s willing to dial out for you.</p><p>In my case it was a media library reading a playlist.</p><p>It usually is something like that.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e940b76514e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Race Conditions Are Not Only Race Conditions]]></title>
            <link>https://sin99xx.medium.com/race-conditions-are-not-only-race-conditions-e80ab397d93e?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e80ab397d93e</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 17:27:20 GMT</pubDate>
            <atom:updated>2026-07-05T10:49:55.773Z</atom:updated>
            <content:encoded><![CDATA[<h3>Race Conditions Are Not Race Conditions</h3><p><em>Concurrency is the cheapest way to wedge a state machine apart. The window is never the bug.</em></p><p>“Race condition” is the most successful misnomer in web security. It suggests a timing problem. It suggests that if you could just slow the attacker down, the system would be fine. It suggests the fix lives in the network stack, or in queueing, or in some retry policy.</p><p>It does not.</p><p>The bug is never the window. The bug is that the system made a decision against state it did not hold the lock on, and then committed to an outcome based on a snapshot that something else had quietly invalidated. Concurrency does not create that gap. It only walks through it.</p><p>That is the whole frame.</p><p>Anything you call a race condition should, on review, decompose into a <strong>decision context</strong> and a <strong>commit context</strong> — and the bug is that those two contexts are allowed to disagree. Sometimes by milliseconds. Sometimes by minutes. Sometimes by an entire downstream reconciliation cycle.</p><pre>── time ──────────────────────────────────────────────►</pre><pre> ┌──────────────┐                       ┌──────────────┐<br> │   DECISION   │ ─────── GAP ────────► │    COMMIT    │<br> │   reads X    │                       │   writes Y   │<br> └──────────────┘                       └──────────────┘<br>                          ▲<br>                          │<br>            state X can change in here<br>            without the decision noticing.</pre><pre>            the bug is the gap.<br>            concurrency is the cheapest way to widen it.</pre><p>The most useful question is not “is this endpoint racey.” It is:</p><p><strong>Where does this system decide something based on state it does not hold the lock on, and which subsystem is going to ship the consequence before the lock catches up?</strong></p><p>That is the actual bug class.</p><h3>Where the field is right now</h3><p>James Kettle’s <em>Smashing the State Machine</em> settled the arrival problem in 2023. Single-packet attack let researchers deliver N requests with sub-millisecond dispersion at the server, which closed the question of <em>whether</em> concurrency was achievable against a modern stack. After that, the conversation should have moved on. It mostly didn’t.</p><p>What it moved to instead was a slightly larger pile of “I hit this endpoint hard and money fell out” writeups. Useful as proof points. Not useful as a frame. Arrival was the cheap half of the problem. <strong>Verification</strong> — the question of which decisions survive concurrency and which ones quietly fall apart — is where the real surface lives, and it isn’t a single technique. It is a category of architectural mistake that shows up in at least four meaningfully different shapes.</p><p>This is a writeup of those shapes, illustrated through four bugs I reported and was paid for across 2026. Targets and exact paths are removed. The point is the shape, not the trophy.</p><h3>Shape 1: the gap inside a single handler</h3><p>This is the textbook version. A SQL count(*), an application-level check, an INSERT. No transaction wrapping the pair. No SELECT ... FOR UPDATE on the parent row. No advisory lock keyed on the resource. No declarative constraint enforcing the cap.</p><p>On a SaaS platform’s organization-invite endpoint, the cap was six invites per org. The handler counted invites, compared to the cap, inserted. Three statements. No lock held across them.</p><p>The fun part: I never needed Turbo Intruder.</p><p>The platform’s own frontend used a batching RPC client — one HTTP request carrying N independent mutation invocations. The batching layer was a convenience feature for the SPA. The server processed each invocation in parallel under the same auth context.</p><pre>client sends ONE HTTP request:<br>   { invite_1, invite_2, invite_3, ..., invite_10 }<br>                          │<br>                          │  server fans the batch out<br>                          ▼<br>        ┌─────┬─────┬─────┬─────┬─────┬─────┐<br>        │ H1  │ H2  │ H3  │ H4  │ ... │ H10 │<br>        └──┬──┴──┬──┴──┬──┴──┬──┴──┬──┴──┬──┘<br>           │     │     │     │     │     │<br>           ▼     ▼     ▼     ▼     ▼     ▼<br>      SELECT count(*) FROM invites  →  0   (for all of them)<br>      check  0 &lt; 6                  →  ✓   (for all of them)<br>      INSERT new invite             →  fires in parallel<br>           │     │     │     │     │     │<br>           └─────┴─────┴─────┴─────┴─────┘<br>                          │<br>                          ▼<br>         9 invites commit before the lock catches up.<br>         10th hits DB semaphore timeout.<br>         the lock exists. the application just never held it.</pre><p><strong>Nine invites slipped past a cap of six in a single HTTP request.</strong> The tenth came back with a Postgres Semaphore timed out, which is the database telling you the lock primitive exists and is fighting for the row — but the application code is not the one holding it.</p><p>Two things matter about this case beyond the cap bypass.</p><p>First, <strong>the concurrency primitive was the client SDK.</strong> The attacker didn’t bring concurrency. The platform shipped it. tRPC, GraphQL, and JSON-RPC batching all have this property: the frontend is a concurrency engine, and the server’s per-HTTP-request rate-limit is meaningless when the rate-limited unit is the request envelope rather than the mutation. This is post-Kettle terrain. Single-packet attack solved arrival from a <em>hostile</em> client. Batching solved arrival from the <em>blessed</em> client, and nobody on the server side updated their threat model.</p><p>Second, <strong>there was no revocation endpoint.</strong> The product exposed no way to delete a pending invite. Every successful invite — racy or not — became permanent state on the organization, with operator recourse limited to “talk to support.” A race becomes catastrophic exactly when the commit is irreversible. The bug is not just “I exceeded the cap.” It is “I exceeded the cap and the product has no UI to put me back.” Missing revocation surfaces are their own bug class, and they multiply every concurrency mistake near them.</p><p><strong>The exploit shape</strong></p><ol><li>Find a mutation endpoint that enforces a numeric cap (invites per org, seats per workspace, votes per user, retries per credential).</li><li>Confirm the cap is enforced in application code rather than as a declarative constraint. The pattern in tracing or logs is count → check → insert.</li><li>Locate the batching layer the frontend already uses — tRPC ?batch=1, GraphQL operation arrays, JSON-RPC arrays, any wrapper that takes N operations and ships them in one envelope.</li><li>Build a single request carrying N copies of the same mutation, distinguishable only by payload.</li><li>Send once. If N &gt; cap commits land, the limit was procedural and the batching layer was your concurrency primitive.</li></ol><p>Root cause sentence: the application encoded a limit as a procedure (count, check, insert) instead of as a declaration (constraint, advisory lock, partial unique index). The database had the lock. The application never picked it up.</p><p>Triaged and rewarded.</p><h3>Shape 2: the gap between two subsystems</h3><p>This one is the genuinely interesting case, and the one most writeups never reach.</p><p>A fintech product offered a tiered fee-coverage feature: pay a small monthly fee, get a small buffer against overdrafts; pay a slightly larger fee, get a larger buffer. The plan-change endpoint took a single parameter — desired tier — and was supposed to perform two operations atomically:</p><ol><li>Charge the new fee.</li><li>Activate the new tier.</li></ol><p>The system did not consider these one operation. They were two subsystems. Billing collected fees on a nightly schedule with a documented retry-and-NSF policy. Entitlement flipped the tier immediately on the plan-change call. The two were stitched together by an assumption — <em>if billing fails, entitlement will roll back</em> — that the architecture had never been built to enforce.</p><p>I sent concurrent plan-change requests against the higher tier from an account that didn’t have the balance to cover even one clean fee.</p><pre>── time ─────────────────────────────────────────────────────►</pre><pre> ENTITLEMENT  │   ┌─────────────────────────────────────────┐<br>              │   │   TIER B   (active, persistent)         │<br>              │   └─────────────────────────────────────────┘<br>              │   ▲<br>              │   │  flipped on first 200 OK (optimistic)<br>              │   │<br> REQUESTS     │ ──┼── R1 ── R2 ── R3 ── R4 ─────────────────────<br>              │   │<br>              │   ▼<br> BILLING      │   ── debit ── debit ── debit ── debit ──────────<br>              │                                  │<br>              │                                  ▼<br>              │                          ┌── refund ── refund ──┐<br>              │                          │ (unwinds dollars,    │<br>              │                          │  never touches       │<br>              │                          │  entitlement)        │<br>              │                          └──────────────────────┘</pre><pre> final state:   tier B active.   Used &gt; Limit.   ledger inconsistent.</pre><p>What happened next is the part to read carefully.</p><ul><li><strong>Entitlement flipped to the higher tier on the first successful response.</strong> Optimistically. Before any fee had durably settled.</li><li><strong>Billing fired multiple fee debits</strong> — one per raced request — against a balance that couldn’t support even one of them.</li><li><strong>A reconciliation job later issued refunds</strong> for the duplicate debits. The refund job had no concept of entitlement. It unwound dollar amounts and went home.</li><li><strong>Final state: the higher tier was still active.</strong> The account was over its declared limit by a margin that the limit was explicitly designed to prevent — Used &gt; Limit persisted across days. The fee ledger showed N debits and N partial refunds, leaving a net charge that did not correspond to any rational pricing path.</li></ul><p>That is not a race condition in the traditional sense. The window between the raced requests was small, but the <strong>real</strong> gap was between two reconciliation systems that didn’t share state and didn’t share authority. Billing could refund money. Billing could not revoke a tier. Entitlement granted a tier. Entitlement did not watch billing.</p><p>Anywhere a benefit, a quota, a tier, a permission, or a credential is granted in one subsystem and paid for in another, you have this shape latent in the architecture. Concurrency is the easiest way to surface it because concurrency forces the two subsystems to disagree visibly within a single reconciliation cycle. But the underlying bug — <em>grant is not atomic with payment</em> — exists at any throughput.</p><p>A sibling of this exact pattern appeared earlier in a non-race form: when a composite checkout finalized one leg of a bundle while the other failed, the survivor kept pricing that was only valid while the bundle existed. Partial failure was the wedge there. Concurrency was the wedge here. Same gap. Same lesson: a system that grants something based on a fee path it does not hold across the grant will, eventually, hand out the something without the fee path.</p><p><strong>The exploit shape</strong></p><ol><li>Identify a flow where a grant (tier, quota, role, credential, subscription level) depends on a separate subsystem’s success — billing, KYC, identity, fraud, inventory.</li><li>Confirm the grant is <em>applied</em> before the dependent state has <em>durably settled</em>. The signal is grants visible in the UI immediately after the mutation while the dependent state is still pending.</li><li>Issue concurrent grant requests under conditions where the dependent subsystem will fail or reconcile non-trivially — insufficient funds, retries, NSF, rate limits, manual review.</li><li>Watch the ledger for duplicate side effects followed by reconciliation events (refunds, retries, cancellations).</li><li>Confirm the grant persists across the reconciliation. The bug exists if reconciliation only touches one side of the gap.</li></ol><p>Triaged and rewarded at High.</p><h3>Shape 3: the gap between an undeclared invariant and the data model</h3><p>A money-routing feature on the same fintech let a user register an email alias as an inbound-payment recipient. The intended invariant — stated nowhere in the contract — was that an account could have one pending alias registration at a time. The database did not encode this. The application did not encode this. It was a vibes constraint.</p><p>A single-packet attack with four distinct aliases produced four distinct pending registrations, each with its own internal reference id, each generating its own verification email. The “remove one, another quietly appears” behavior was the tell: pending state was a list, not a slot. The model the database held had never matched the model the product team thought they had.</p><pre>┌───────────────────────────┐    ┌───────────────────────────┐<br> │   UI / PRODUCT MODEL      │    │     DATABASE MODEL        │<br> │                           │    │                           │<br> │   pending: [ slot ]       │    │   pending_aliases         │<br> │                           │    │   ├─ alias_1              │<br> │   &quot;one at a time&quot;         │    │   ├─ alias_2              │<br> │                           │    │   ├─ alias_3              │<br> │   asserted in design      │    │   └─ alias_4              │<br> │   docs, screenshots,      │    │                           │<br> │   marketing copy          │    │   no unique index         │<br> │                           │    │   no partial constraint   │<br> │   enforced:  nowhere      │    │   no application lock    │<br> └─────────────┬─────────────┘    └─────────────┬─────────────┘<br>               │                                │<br>               └────────── disagreement ────────┘<br>                               │<br>                               ▼<br>                  race surfaces what was always true:<br>                  the invariant never existed.</pre><p>This is a different shape from the invite cap. In the invite case, the invariant was <em>declared</em> (cap = 6) and <em>enforced procedurally</em>. Here, the invariant was <em>never declared at all</em> — no rule visible anywhere in the application about pending uniqueness. The race didn&#39;t violate a stated constraint. It revealed that no such constraint existed.</p><p>That distinction matters during review. When you find a feature whose UI implies “one of these at a time” — one pending invite, one active session, one default payment method, one verified email, one anything — the question to ask is whether that “one” is encoded in the schema or asserted only in the UI. Schemas don’t have feelings. UIs do.</p><p><strong>The exploit shape</strong></p><ol><li>Find a feature whose UI strongly implies “one of these at a time” — pending invite, default card, active session, verified phone, primary anything.</li><li>Read the application’s model from the outside. If the constraint is not a unique index, a partial unique index, a CHECK, or an EXCLUDE, the &quot;one&quot; is a vibes constraint.</li><li>Send N concurrent creates with distinguishable payloads.</li><li>Confirm N records persist. The bonus signal: deleting one surfaces the next from the queue, proving the data model never agreed with the product description.</li><li>Severity scales with what that “one” was protecting — money-routing aliases and trusted phone numbers sit at the upper bound.</li></ol><p>The fix is a partial unique index or an ON CONFLICT clause that the original developer should have written.</p><p>Triaged and rewarded.</p><h3>Shape 4: the gap between two systems</h3><p>The same fintech offered an eSIM trial through an upstream provider. The user-facing flow let an account with a free-trial entitlement create one eSIM order. The backend forwarded the order to the provider; the provider provisioned the eSIM.</p><p>Concurrent replay of the order-creation request produced multiple 202 Accepted responses and multiple provisioned eSIMs against a single trial entitlement. The user account balance never reflected multiple successful charges. Either the platform or its upstream was absorbing the cost.</p><pre>┌────────────────────────────┐      ┌────────────────────────────┐<br> │         PLATFORM           │      │         UPSTREAM           │<br> │                            │      │                            │<br> │   trial entitlement        │      │   no concept of trial      │<br> │   check  (per request)     │      │                            │<br> │            │               │      │                            │<br> │            ▼               │      │                            │<br> │   forward order  ──────────┼──────┼──►  provision resource     │<br> │            ▲               │      │            │               │<br> │            │               │      │            ▼               │<br> │   assumes upstream         │      │   assumes platform         │<br> │   enforces single-use      │      │   enforces single-use      │<br> └────────────────────────────┘      └────────────────────────────┘</pre><pre> reality:   neither side does.   N concurrent orders → N goods.<br>            the bill lands somewhere.   not on the attacker.</pre><p>This is the shape of a race where the two ends of the gap are <strong>not even in the same company.</strong> The platform owned the order endpoint. The provider owned the fulfillment. The trial-eligibility check on the platform side ran once per request; the provider’s side had no concept of “trial,” only of “incoming order with valid auth.” Neither side enforced single-use on the trial context, because each assumed the other would.</p><p>This is the most operationally expensive shape. Every duplicated good has a real fulfillment cost. Phone numbers, eSIM data plans, shipped items, API credits, paid third-party tokens — anywhere your platform provisions through an upstream and the trial/limit logic lives only on your side, you have this latent. Concurrency turns one paid trigger into N paid triggers, and the bill lands either on you or on the provider. Often the provider, which means the bug only surfaces in someone else’s quarterly report.</p><p><strong>The exploit shape</strong></p><ol><li>Find a flow where the target provisions through an upstream — eSIM, telecom, third-party API credits, drop-ship inventory, payment processor token, paid model access, generated certificates.</li><li>Locate the trial or single-use eligibility check. Confirm it lives only on the target’s side.</li><li>Issue concurrent provisioning requests under the same eligibility token.</li><li>Confirm the upstream produces multiple resources. The platform’s account ledger and the upstream’s account ledger will quietly disagree.</li><li>The cost falls on whichever side does not own idempotency. Sometimes that’s the platform. Sometimes that’s the upstream. Either way, it is not the attacker.</li></ol><p>The fix is idempotency keys that the upstream actually honors, plus a single-use consumption marker on the trial context that flips atomically <em>before</em> fulfillment is even attempted. Consume first. Fulfill second. The order of those two operations is the entire bug.</p><p>Triaged and rewarded.</p><h3>What these four have in common, and what they don’t</h3><p>The common piece is the gap. In each case, a decision was made against a state that something else was about to change.</p><ul><li>In Shape 1, the gap was <strong>between two SQL statements.</strong></li><li>In Shape 2, the gap was <strong>between two subsystems with independent reconciliation.</strong></li><li>In Shape 3, the gap was <strong>between the UI’s model and the database’s.</strong></li><li>In Shape 4, the gap was <strong>between two companies’ systems with no shared single-use token.</strong></li></ul><p>What they don’t share is the size of the gap.</p><pre>SHAPE     GAP LIVES IN…                       FIX LIVES IN…<br> ──────    ─────────────────────────────────   ─────────────────────────<br> Shape 1   two statements in one handler       one transaction<br> Shape 2   two subsystems, one company         shared transaction or<br>                                               cross-subsystem revocation<br> Shape 3   the UI&#39;s head vs the schema         a unique constraint<br> Shape 4   two companies                       a contract renegotiation</pre><p>Shape 1 closes in milliseconds with a single BEGIN; ... FOR UPDATE; ... COMMIT;. Shape 4 may not close without renegotiating the contract with the upstream provider. <strong>The fix surface scales with how far apart the decision and the commit live.</strong></p><p>That scaling is the part the original race-condition literature underweights. “Add a lock” is fine prescription for Shape 1. It is the wrong advice for Shape 2. It is structurally impossible advice for Shape 4. The deeper a race lives in the architecture, the less it looks like a concurrency bug and the more it looks like a contract bug between parts of the system that never agreed on who owns the truth.</p><h3>The 2026 story: client-driven concurrency</h3><p>The piece of this nobody is saying out loud:</p><p><strong>Modern frontends are concurrency engines.</strong> tRPC batching, GraphQL operation batching, JSON-RPC array calls — every one of these takes N logical operations and delivers them in a single HTTP request that the server then fans out internally. The convenience justification is bandwidth and round-trip latency. The security consequence is that the <em>server’s own client SDK ships the attacker a free concurrency primitive</em>, and every per-HTTP-request rate-limit, every per-request audit log, every per-request middleware that assumed one operation per envelope becomes a single point of inadvertent serialization bypass.</p><p>You don’t need a single-packet attack against a batching backend. You need a single packet, period. <strong>The batching is the attack.</strong></p><p>This is the part of the threat model most teams have not updated. If your stack uses tRPC, GraphQL, or any batching RPC layer, every mutation in your API is implicitly callable N-at-a-time under the same auth context, on the same TCP connection, dispatched to the same worker pool, in the same logical instant. Procedural limit enforcement was already a bad idea. Procedural limit enforcement in front of a batching client is procedural limit enforcement with the safety off.</p><p>Two defenses worth thinking about, neither of which is “rate-limit harder”:</p><ol><li>Serialize mutations <em>within</em> a batch on the server, or reject batches containing multiple invocations of the same mutation against the same parent resource. Batching as a client-side ergonomics feature should not become a server-side concurrency primitive.</li><li>Move every limit, cap, and uniqueness rule into a declarative database constraint or an advisory lock keyed on the parent resource. The database is the only thing in the stack that actually understands “one at a time.”</li></ol><h3>What a hardened state machine actually believes</h3><p>Restating the frame as invariants:</p><ul><li><strong>Decisions and commits live in the same transaction</strong>, or the decision is treated as advisory and re-checked at commit. There is no third option. “We check on the way in and trust the check by the time we write” is the bug.</li><li><strong>Limits are declared, not enforced procedurally.</strong> A cap is a unique partial index, a CHECK constraint, an advisory lock — not a count(*) followed by an if. The database is allowed to fight for the row. The application is not allowed to assume it won.</li><li><strong>Grants are atomic with the conditions that justified them.</strong> A tier granted because a fee was charged is revoked if the fee is not, in the same transaction, durable. Two subsystems that reconcile separately cannot make joint decisions safely.</li><li><strong>Single-use contexts are flipped to consumed before fulfillment.</strong> If the trial token marks itself spent only after the eSIM provisions, the eSIM can be provisioned N times. The order is wrong. Consume first. Fulfill second. If fulfillment fails, refund the consumption — never the other direction.</li><li><strong>Every commit has a revocation surface.</strong> If an invite, a session, a grant, a provisioned good, or a registered alias can be created, it must be deletable. Race bugs become irreversible exactly to the extent that the product cannot undo what the race produced. The missing revocation endpoint is the multiplier on every other bug in the same handler.</li></ul><h3>The closing question</h3><p>Race condition is the wrong name. It is shorthand for a class of bugs in which the system made a decision under one state and committed to it under another, and concurrency is simply the easiest way to make those two states disagree visibly.</p><p>The single-packet attack settled arrival. Batching RPCs delivered free concurrency to anyone with a browser. What is left is the question that was always the real one:</p><p><strong>Where does this system decide something based on state it does not hold the lock on, and which subsystem is going to ship the consequence before the lock catches up?</strong></p><p>If the answer is “the application code, between two SQL statements,” you have a Shape 1.</p><p>If the answer is “billing decides one thing and entitlement decides another,” you have a Shape 2.</p><p>If the answer is “the UI thinks there is one of these and the schema doesn’t agree,” you have a Shape 3.</p><p>If the answer is “our system and theirs,” you have a Shape 4.</p><p>If the answer is “we never thought about it that way,” you have all of them, and you have not yet found the worst one.</p><p>That is the entire bug class. The window is not the bug. The window is just where the bug walks through.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e80ab397d93e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026–48840 — Uninitialised Stack Leak in Exim’s PROXY Parser]]></title>
            <link>https://sin99xx.medium.com/cve-2026-48840-uninitialised-stack-leak-in-exims-proxy-parser-e2d1336b3e16?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2d1336b3e16</guid>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Thu, 04 Jun 2026 17:26:34 GMT</pubDate>
            <atom:updated>2026-06-04T17:26:34.758Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Exim is</h3><p>A mail transfer agent — the program that moves email between servers. Your client hands a message to an MTA, the MTA finds the destination server and delivers it. Exim is one of the oldest, written at Cambridge in the ’90s, default on Debian and Ubuntu, roughly half of all internet-facing mail servers.</p><p>Half the mail servers on the internet, reachable before auth.</p><p>The bug isn’t in the email code. It’s earlier — the code that decides who’s connecting.</p><h3>Why the PROXY protocol exists</h3><p>Servers sit behind load balancers (HAProxy, AWS NLB, Cloudflare TCP). The balancer takes the connection and forwards it to a backend. Problem: the backend now sees the connection coming <em>from the balancer</em>, not the real client. The kernel can’t tell Exim the true source address anymore — every connection looks like it came from the same internal IP.</p><p>The PROXY protocol fixes this. The balancer prepends one small block of bytes at the very start of the connection: “real client is X.X.X.X, port N.” Exim reads it first and fills in the source address it would otherwise have gotten from the kernel.</p><p>Key point for later: the header doesn’t <em>describe</em> the connection, it <em>becomes</em> the connection’s identity inside Exim. Whatever lands in those bytes is what Exim thinks about who’s on the other end.</p><h3>The v2 header</h3><p>v1 is a text line. v2 is binary. Starts with a fixed 12-byte signature:</p><pre>\x0D \x0A \x0D \x0A \x00 \x0D \x0A \x51 \x55 \x49 \x54 \x0A</pre><p>(Tail spells QUIT. The null at byte 5 stops anything treating it as a C string.)</p><p>Then the fixed fields:</p><pre>byte 0..11    signature<br>byte 12       version + command   high nibble (top 4 bits) = version, low = command<br>byte 13       family + protocol   0x11 = TCP/IPv4, 0x21 = TCP/IPv6<br>byte 14..15   length              how many address bytes follow<br>byte 16..     address block       interpreted per byte 13</pre><p>Byte 13 says the <em>shape</em>: 0x11 → two 4-byte addrs + two ports = 12 bytes. 0x21 → two 16-byte addrs + two ports = 36 bytes.</p><p>Bytes 14–15 say <em>how much</em> data: 12 for a real IPv4 frame, 36 for IPv6.</p><p>The bug lives in the gap: byte 13 declares the shape, bytes 14–15 declare the size, and nothing makes them agree.</p><h3>The bug</h3><p>Exim reads the 16-byte fixed header, then checks the declared length isn’t too large (so a huge claim can’t overflow a buffer). Sensible. But it only checks the ceiling, never the floor.</p><p>Advisory, verbatim point: only the upper bound was validated, not a lower bound.</p><p>Malformed frame:</p><ul><li>12-byte signature — valid.</li><li>byte 12 = 0x20 — version 2, PROXY command.</li><li>byte 13 = 0x21 — IPv6, so &quot;expect a 36-byte address block.&quot;</li><li>length = 0.</li></ul><p>Zero isn’t too large → passes the check. But byte 13 said IPv6, so Exim takes the IPv6 branch, which copies a 16-byte source address out of the block. It copies 16 bytes.</p><p>No block was sent. Length was zero. Those 16 bytes are whatever was on the parser’s stack when the function ran.</p><p>Result: Exim treats 16 bytes of its own stack as the client’s IPv6 address, and — because the PROXY header <em>is</em> the identity — puts it in the greeting.</p><pre>220 mail.example.com ESMTP Exim<br>250 mail.example.com Hello probe [&lt;16 bytes of stack as an IPv6 addr&gt;]</pre><p>(SMTP opens with 220; after the client&#39;s EHLO/HELO it sends 250 and echoes back the address it thinks you&#39;re calling from.)</p><p>IPv4 path (0x11) has the same hole for frames under 12 bytes — leaks 4 instead of 16.</p><h3>Why uninitialised stack matters</h3><p>A function’s local variables live on the stack. In C that memory isn’t cleared first — a fresh local holds whatever the last function left there. Read it before writing it and you read the leftovers. That’s an uninitialised read. The leftovers aren’t random: saved registers, pointer fragments, return addresses — the debris of whatever ran a moment ago.</p><p>Why 16 bytes is enough to care about: ASLR (address-space layout randomisation) loads code and data at random addresses every start, so an attacker doing memory corruption can’t predict where anything is. That’s usually the first wall they hit — no addresses.</p><p>Leaked stack often contains a pointer, and a pointer tells you where things actually live in <em>this</em> process. Advisory: the bytes are live memory and shift with ASLR across restarts → usable as an ASLR-defeat primitive in a chain.</p><p>On its own this reads 16 bytes and stops. No corruption, no code exec. It’s the first link — turns “I have a corruption bug but no addresses” into “now I have addresses.” That’s why it’s worth taking seriously and why it’s dishonest to call it more than that.</p><h3>Proving it’s real</h3><p>The trap with a leak like this: you send a malformed frame, bytes come back, and you assume it’s memory. It might just be your own input echoed. If so, no leak.</p><p>Three observations together rule that out:</p><ol><li><strong>Vary your input, output doesn’t follow.</strong> Change bytes around the truncation point, pad to different short lengths, alter non-address header fields. Echoed input would move. It doesn’t. Output is independent of what you control.</li><li><strong>Same process, identical leak.</strong> Reconnect to one running Exim repeatedly → same 16 bytes every time. Uninitialised stack is deterministic within a process: same call, same code path, same leftovers.</li><li><strong>Restart, leak moves with ASLR.</strong> Fresh processes → value changes, and changes like an address, not like noise. Cross-check against /proc/&lt;pid&gt;/maps: the leaked value lands inside a real mapped region. Input doesn&#39;t do that; a captured pointer does.</li></ol><p>Independent of input + stable per process + ASLR-varying and matching a real mapping = uninitialised memory disclosure, not a guess off one output.</p><h3>The sanitizer trap</h3><p>Reproducing this will mislead you if you’re not careful.</p><p>Natural move: rebuild Exim with a sanitizer to catch the uninitialised read. You do, you run the frame, the leak’s gone. No warning. Conclusion: not a real bug.</p><p>Wrong. The rebuild changed what you measured. Compilers under sanitizers/hardening can auto-zero stack variables (-ftrivial-auto-var-init=zero). With that on, the leftovers are zeroed before the read — nothing to leak. The source bug is still there, the missing check still missing; your toolchain quietly removed the symptom. You tested a different build, not the bug.</p><p>Fix: reproduce on a build matching what ships, check whether stack-zeroing is on, treat a sanitizer null result as evidence about that build only. The C below shows the masking directly.</p><h3>Minimal repro</h3><p>No Exim, no network needed. The defect is a union read with no minimum-length guarantee. This mirrors the header union, copies in only the 16-byte fixed portion (leaving the address block uninitialised, like the bug), and reads the IPv6 source field.</p><p>Prints it twice — fresh stack, then after scribbling 0xAA over the stack via an unrelated call. Normal build: second read comes back aa, showing the &quot;address&quot; is just inherited stack. Rebuild with stack-zeroing: both reads zero — the sanitizer trap in miniature.</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;string.h&gt;<br>#include &lt;stdint.h&gt;</pre><pre>/* Exim&#39;s PROXY v2 header union. The v2 branch reads the address block<br> * by family, regardless of how many bytes actually arrived. */<br>static void<br>do_read_simulate(void) {<br>    union {<br>        struct { uint8_t line[108]; } v1;<br>        struct {<br>            uint8_t  sig[12];<br>            uint8_t  ver_cmd;<br>            uint8_t  fam;<br>            uint16_t len;<br>            union {<br>                struct { uint32_t src_addr; uint32_t dst_addr;<br>                         uint16_t src_port; uint16_t dst_port; } ip4;<br>                struct { uint8_t  src_addr[16]; uint8_t dst_addr[16];<br>                         uint16_t src_port; uint16_t dst_port; } ip6;<br>                struct { uint8_t  src_addr[108]; uint8_t dst_addr[108]; } unx;<br>            } addr;<br>        } v2;<br>    } hdr;</pre><pre>    /* Frame: 12-byte sig, ver+cmd 0x20 (v2, PROXY), family 0x21 (IPv6),<br>     * length 0x0000. Only these 16 bytes are &quot;received&quot;; the IPv6 block<br>     * after them is never written and keeps whatever was on the stack. */<br>    memcpy(&amp;hdr,<br>           &quot;\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A&quot;  /* signature   */<br>           &quot;\x20&quot;                                              /* ver + cmd   */<br>           &quot;\x21&quot;                                              /* family IPv6 */<br>           &quot;\x00\x00&quot;,                                         /* length = 0  */<br>           16);</pre><pre>    /* IPv6 path reads 16 bytes here unconditionally. */<br>    printf(&quot;  leaked ip6.src_addr =&quot;);<br>    for (int i = 0; i &lt; 16; i++)<br>        printf(&quot; %02x&quot;, hdr.v2.addr.ip6.src_addr[i]);<br>    printf(&quot;\n&quot;);<br>}</pre><pre>/* Leaves a recognisable pattern on the stack — stands in for whatever<br> * Exim was doing just before the parser ran. */<br>static void<br>pollute_stack(int depth) {<br>    char scratch[256];<br>    memset(scratch, 0xAA, sizeof(scratch));<br>    if (depth &gt; 0) pollute_stack(depth - 1);<br>    __asm__ __volatile__(&quot;&quot; :: &quot;r&quot;(scratch) : &quot;memory&quot;);  /* don&#39;t optimise away */<br>}</pre><pre>int main(void) {<br>    printf(&quot;fresh stack:\n&quot;);<br>    do_read_simulate();<br>    printf(&quot;after polluting with 0xAA:\n&quot;);<br>    pollute_stack(8);<br>    do_read_simulate();<br>    return 0;<br>}</pre><p>Shipped build:</p><pre>cc -O2 -o proxy_uninit proxy_uninit.c &amp;&amp; ./proxy_uninit</pre><p>Second read comes back aa — inherited stack. Masking trap:</p><pre>cc -O2 -ftrivial-auto-var-init=zero -o proxy_uninit_zero proxy_uninit.c &amp;&amp; ./proxy_uninit_zero</pre><p>Both reads zero. Same source, same bug, no visible leak — why a sanitizer build misleads a triager.</p><h3>The fix</h3><p>The missing floor. Before reading the address block, verify the declared length is big enough for the family: 12 bytes for IPv4, 36 for IPv6. Frames that fail get rejected like any other malformed frame. An IPv6 frame carrying zero address bytes no longer reaches the copy.</p><h3>If you run Exim</h3><p>Upgrade to 4.99.4. Affected: 4.88 (2017) through 4.99.3, plus master.</p><p>Exposure conditions, both required:</p><ul><li><strong>Build:</strong> compiled with SUPPORT_PROXY and a non-empty hosts_proxy. SUPPORT_PROXY is on in stock Debian/Ubuntu/RHEL/Fedora packages.</li><li><strong>Source:</strong> attacker’s IP matches hosts_proxy, or they can get a PROXY header to Exim through a host already in it (a front-end balancer).</li></ul><p>No PROXY protocol → not affected. Otherwise exposure is as wide as whatever’s trusted in hosts_proxy.</p><p>Can’t upgrade now: narrow hosts_proxy to exact balancer IPs, or unset it to kill PROXY parsing on that listener. Stopgaps, not the fix.</p><h3>Timeline</h3><ul><li><strong>2026–05–19 12:35 UTC</strong> — reported.</li><li><strong>2026–05–19 13:26 UTC</strong> — acknowledged (same day).</li><li><strong>2026–05–19 14:06 UTC</strong> — root cause confirmed, fix in private repo (same day).</li><li><strong>2026–05–25</strong> — CVE-2026–48840 assigned.</li><li><strong>2026–05–26 → 27</strong> — distro notice + restricted patch access.</li><li><strong>2026–05–29</strong> — coordinated public release.</li></ul><p>Report to disclosure: 10 days. Root cause pinned in ~90 minutes.</p><h3>Takeaway</h3><p>Not really about Exim or email. It’s a parsing shape that shows up everywhere: a type field and a length field allowed to disagree, and a bounds check guarding one direction. “Not too big” feels like checking size; the floor is a separate check, and the gap between “not too large” and “large enough” is where the 16 bytes get out.</p><p>And: don’t fool yourself. One suggestive output can be input echo; a sanitizer rebuild can erase the symptom you’re hunting. Vary the input, hold the process, restart it, read the maps — and be clear about exactly what each result proves.</p><h3>References</h3><ul><li>Exim official security advisory (EXIM-Security-2026–05–19.1): <a href="https://www.exim.org/static/doc/security/EXIM-Security-2026-05-19.1.txt">https://www.exim.org/static/doc/security/EXIM-Security-2026-05-19.1.txt</a></li><li>oss-security coordinated disclosure post (Openwall, 2026–05–29): <a href="https://www.openwall.com/lists/oss-security/2026/05/29/3">https://www.openwall.com/lists/oss-security/2026/05/29/3</a></li><li>CVE-2026–48840 — NVD (NIST): <a href="https://nvd.nist.gov/vuln/detail/CVE-2026-48840">https://nvd.nist.gov/vuln/detail/CVE-2026-48840</a></li><li>Exim project homepage / 4.99.4 release notice: <a href="https://www.exim.org/">https://www.exim.org/</a></li><li>PROXY protocol specification (HAProxy): <a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt</a></li><li>GCC -ftrivial-auto-var-init documentation: <a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html">https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html</a></li></ul><p><em>Warisjeet Singh (sin99xx). Reported 2026–05–19, fixed in 4.99.4. CVE-2026–48840.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2d1336b3e16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OIDC and OAuth 2.0 for People Looking for Bugs]]></title>
            <link>https://sin99xx.medium.com/oidc-and-oauth-2-0-for-people-looking-for-bugs-03b45e2b9aad?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/03b45e2b9aad</guid>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Thu, 19 Mar 2026 02:00:29 GMT</pubDate>
            <atom:updated>2026-03-19T02:00:29.471Z</atom:updated>
            <content:encoded><![CDATA[<h3>Most implementations do not fail cryptographically. They fail because they trust the wrong token for the wrong job.</h3><p>OAuth 2.0 is an <strong>authorization</strong> framework. OpenID Connect is an <strong>identity</strong> layer on top of it. That distinction is not trivia. OAuth gets a client access to a resource; OIDC gives the client a way to verify who authenticated by issuing an <strong>ID Token</strong>. If a product uses OAuth artifacts to answer OIDC questions, or OIDC artifacts to answer OAuth questions, you are already in bug territory. (<a href="https://www.rfc-editor.org/rfc/rfc6749?utm_source=chatgpt.com">RFC Editor</a>)</p><p>That is the core thesis.</p><p>The ecosystem is full of adjacent artifacts that look similar enough to tempt developers into lazy decisions:</p><ul><li>access token</li><li>ID Token</li><li>authorization code</li><li>UserInfo response</li><li>frontend session object</li><li>“whatever the SDK handed us”</li></ul><p>A lot of real findings come from one simple pattern:</p><blockquote><em>the implementation stopped caring what the token was </em>for<em>.</em></blockquote><h3>1. The first bug class is artifact confusion</h3><p>The fastest way to review an OAuth/OIDC implementation is to ask five boring questions:</p><ul><li>What logs the user in?</li><li>What calls the API?</li><li>What sits in the browser?</li><li>What gets parsed for identity?</li><li>What gets trusted as “same user”?</li></ul><p>Those answers should not all be the same token.</p><p>An <strong>access token</strong> is for the <strong>resource server</strong>. An <strong>ID Token</strong> is for the <strong>client / relying party</strong>. RFC 6750 is explicit that bearer tokens work because <strong>possession is enough</strong>. That tells you exactly what an access token is: an access artifact, not proof that your app should create a user session from it. OIDC exists because OAuth alone does not define that identity layer. (<a href="https://www.rfc-editor.org/rfc/rfc6750.html?utm_source=chatgpt.com">RFC Editor</a>)</p><p>So when you find:</p><ul><li>access tokens accepted as login proof,</li><li>ID Tokens accepted by APIs as bearer creds,</li><li>session identity built from “whatever JWT came back,”</li><li>or providers mixed together because “it had a sub claim,”</li></ul><p>that is not advanced research. That is standard OAuth/OIDC confusion wearing enterprise clothes.</p><p>JWT made this worse, by the way. Signed JSON gave weak ideas a nicer suit.</p><h3>2. Signature validation is not semantics</h3><p>A lot of teams stop thinking the moment the JWT verifies.</p><p>That is where the bugs start.</p><p>A valid signature does <strong>not</strong> answer:</p><ul><li>who this token was meant for,</li><li>which issuer minted it,</li><li>whether this client should trust it,</li><li>whether this browser transaction is the one that started the flow,</li><li>or whether this token is even the right artifact for this code path.</li></ul><p>OIDC Core defines ID Token validation for a reason. It gives you claims like iss, aud, and nonce because “it’s signed” is not enough. If a product validates the signature but ignores issuer, audience, or nonce, it is not doing serious OIDC. It is just doing cryptographic optimism. (<a href="https://openid.net/specs/openid-connect-core-1_0.html?utm_source=chatgpt.com">OpenID Foundation</a>)</p><p>Same with UserInfo: OIDC Core says the sub from UserInfo <strong>must exactly match</strong> the sub in the ID Token, or the data must not be used. That sentence exists because the protocol authors already knew people would trust the wrong profile data if they got the chance. And developers, being developers, did not disappoint. (<a href="https://openid.net/specs/openid-connect-core-1_0.html?utm_source=chatgpt.com">OpenID Foundation</a>)</p><h3>3. “OAuth login” is usually a confession</h3><p>Whenever someone says “we use OAuth for login,” there is a decent chance they mean one of these:</p><ul><li>they are not actually using OIDC,</li><li>they are using OIDC but skipping half the validation,</li><li>or they are using provider-specific profile APIs and pretending that counts as identity protocol design.</li></ul><p>OAuth is not login. RFC 6749 says OAuth is about <strong>limited access to an HTTP service</strong>. OIDC says “fine, here is the identity layer you clearly wanted all along.” If the implementation takes the OAuth bit and improvises the identity bit, you usually get:</p><ul><li>email-based account confusion,</li><li>wrong-token trust,</li><li>weak provider binding,</li><li>or frontends that build sessions out of access tokens because someone saw a sub and got excited. (<a href="https://www.rfc-editor.org/rfc/rfc6749?utm_source=chatgpt.com">RFC Editor</a>)</li></ul><p>That is a good place to hunt because it is very common for products to look like OIDC in the UI and like half-finished OAuth in the backend.</p><h3>4. Multi-provider support is where clients start lying to themselves</h3><p>Single-provider OIDC bugs are familiar. Multi-provider bugs are better because the client now has to remember <strong>which authorization server this flow was actually for</strong>.</p><p>RFC 9207 added an iss response parameter to help defend against <strong>mix-up attacks</strong>. RFC 9700 goes further and says that if a client can talk to more than one authorization server, it needs a defense against mix-up. That is not nice-to-have language. That is the protocol admitting the problem is real. (<a href="https://www.rfc-editor.org/rfc/rfc9700.html?utm_source=chatgpt.com">RFC Editor</a>)</p><p>So if the target supports:</p><ul><li>Google</li><li>Microsoft</li><li>Okta</li><li>custom SSO</li><li>enterprise IdPs</li></ul><p>ask this:</p><blockquote><em>How does the client know that this authorization response belongs to that intended issuer and that original browser transaction?</em></blockquote><p>If the answer is “the callback URI tells us,” or “the session tells us,” or “the library handles it,” stay there.</p><p>Multi-provider OAuth/OIDC is where correct-looking artifacts get accepted in the wrong trust context. It is the auth equivalent of putting the wrong label on a sealed envelope and pretending delivery was still secure.</p><h3>5. Redirect URIs are still a gold mine because people still get lazy</h3><p>Redirect URI handling is boring right up until it prints money.</p><p>RFC 9700 exists because experience since RFC 6749 showed that technically valid OAuth deployments were still insecure in practice. It updates the threat model, tightens security advice, and deprecates weaker modes. Redirect URI validation is a big part of that because once redirect handling gets soft, the rest of the flow stops meaning what the client thinks it means. (<a href="https://www.rfc-editor.org/rfc/rfc9700.html?utm_source=chatgpt.com">RFC Editor</a>)</p><p>The useful questions are not:</p><ul><li>“do they have a redirect URI?”</li><li>“does the flow complete?”</li></ul><p>The useful questions are:</p><ul><li>how exact is the match?</li><li>can path or query confusion influence it?</li><li>what if multiple callbacks exist?</li><li>what if the wrong provider lands on the right callback?</li><li>what if state is decorative?</li><li>what if the code flow is modern but the transaction binding around it is ancient?</li></ul><p>A lot of OAuth implementations are renovated castles: shiny new front door, haunted wiring.</p><h3>6. PKCE is not a checkbox for mobile apps</h3><p>PKCE is one of those things developers add because they heard it is important, then immediately stop thinking about why it exists.</p><p>RFC 7636 introduced PKCE to stop authorization code interception. It is a transaction-binding mechanism. That means weak PKCE is not just “partial compliance,” it is broken flow integrity. Good places to look:</p><ul><li>public clients without PKCE,</li><li>downgradable PKCE,</li><li>static or predictable verifiers,</li><li>verifier/challenge reuse,</li><li>or code flow implementations where PKCE exists but state/transaction binding is still soft. (<a href="https://www.rfc-editor.org/rfc/rfc9700.html?utm_source=chatgpt.com">RFC Editor</a>)</li></ul><p>Same with nonce.</p><p>OIDC Core does not include nonce because standards authors enjoy extra parameters. It is there to bind the authentication response to the initiating client request and help stop replay or mix-up of authentication results. If the implementation ignores it, reuses it, or never ties it to real browser state, then it is doing ceremony, not protocol security. (<a href="https://openid.net/specs/openid-connect-core-1_0.html?utm_source=chatgpt.com">OpenID Foundation</a>)</p><h3>7. Native apps are a separate trust problem</h3><p>RFC 8252 says native apps should use the browser — not embedded web views — for OAuth authorization requests. That is not a style preference. It is a trust-boundary rule. The moment the app fully owns the auth surface, it can see too much, fake too much, or control too much. (<a href="https://www.rfc-editor.org/search/rfc_search_detail.php?pubstatus%5B%5D=Any&amp;rfc=6749&amp;utm_source=chatgpt.com">RFC Editor</a>)</p><p>So if you still find OAuth or OIDC inside an embedded web view in 2026, that is not “legacy mobile UX.” That is the app choosing a weaker isolation model than current best practice.</p><p>And if the team says “it was easier,” congratulations: you have located the root cause section of the postmortem early.</p><h3>8. The actual hunter mindset</h3><p>Do not ask “does this app use OAuth securely?”</p><p>Ask:</p><ul><li>which artifact answers the identity question?</li><li>which artifact answers the delegation question?</li><li>which server is supposed to validate which artifact?</li><li>which issuer was this transaction supposed to come from?</li><li>which audience was this token minted for?</li><li>which browser transaction does this response belong to?</li><li>where does the implementation stop preserving those distinctions?</li></ul><p>That is where the bugs are.</p><p>Not because OAuth is broken.<br>Not because JWT is cursed.<br>Not because the standards are too long.</p><p>Because implementations routinely erase distinctions the protocol introduced for a reason. (<a href="https://www.rfc-editor.org/rfc/rfc6749?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>Final thesis</h3><p>The access token is not the ID Token.<br>The redirect is not self-authenticating.<br>The UserInfo response is not trustworthy unless it is bound back to the authenticated subject.<br>The right issuer matters.<br>The right audience matters.<br>The right transaction binding matters.</p><p>And most bugs appear the moment an implementation decides one of those distinctions is “basically the same thing.”</p><p>That is why OAuth/OIDC bugs are still good hunting.</p><p>The protocol is usually trying to save the implementation from itself.</p><p>The implementation often fights back.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=03b45e2b9aad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cookies and CORS for People Looking for Bugs]]></title>
            <link>https://sin99xx.medium.com/cookies-and-cors-for-people-looking-for-bugs-6a67de67784f?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a67de67784f</guid>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Wed, 18 Mar 2026 02:20:43 GMT</pubDate>
            <atom:updated>2026-03-18T02:20:43.958Z</atom:updated>
            <content:encoded><![CDATA[<h3>Not how they work. Where they fail.</h3><p>Most teams do not have a cookie model or a CORS model. They have folklore.</p><p>That is why these bugs survive. Someone knows that HttpOnly is good. Someone else knows that Access-Control-Allow-Origin has to be “set correctly.” But very few systems are built from the actual browser trust boundary outward. They are built from framework defaults inward. That is exactly why cookie and CORS bugs keep showing up in mature applications: not because the primitives are mysterious, but because the implementation assumptions are usually lazier than the browser. Cookies are still fundamentally specified by RFC 6265, with rfc6265bis actively updating the model, while modern CORS behavior is defined by the Fetch Standard rather than some standalone “CORS RFC.” (<a href="https://datatracker.ietf.org/doc/html/rfc6265?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>So the right question is not “what is a cookie?” or “what is CORS?” The right question is: <strong>where do engineers assume the browser is giving them a guarantee that the specs never actually gave them?</strong></p><p>That is where the findings are.</p><h3>1. Cookie scope collapse: the quiet sibling-subdomain bug</h3><p>One of the best cookie findings is still the least glamorous: a system treats multiple subdomains as though they are cleanly separated, while the cookie model does not. RFC 6265 allows a server to widen a cookie with the Domain attribute, and that means a weaker or less trusted sibling subdomain can sometimes interfere with cookies used by a stronger one. The spec is quite candid about cookie security defects: cookies have “security and privacy infelicities,” and the model does not magically give you integrity across subdomains. (<a href="https://datatracker.ietf.org/doc/html/rfc6265?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>The bug-hunter version of this is simple: if a company has app.example.com, admin.example.com, help.example.com, old.example.com, and some half-abandoned marketing surface on a sibling host, ask whether any of them can set cookies scoped broadly enough to collide with the main session space. If the session cookie is not host-bound and the estate is large, there is often something to do there. Current browser guidance strongly pushes __Host- for sensitive host-only cookies precisely because it prevents Domain scoping and requires Path=/ plus Secure. If the crown-jewel session cookie is still just a generic broad-scope cookie, that is not modern defensive posture. (<a href="https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Cookies?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>The attack idea is not “steal the cookie.” It is often <strong>confuse the server about which cookie value it sees first</strong>, or overwrite a weaker cookie that later participates in auth, CSRF, feature-flag, or tenant selection logic.</p><h3>2. Path confusion: developers treat Path like isolation, but the RFC never did</h3><p>This one is still criminally underappreciated. Teams mentally partition cookies by URL space: /admin cookies belong to admin, /app cookies belong to app, /api cookies belong to API. RFC 6265 does not bless that model. It says the Path attribute does <strong>not</strong> provide integrity protection. Browsers will accept arbitrary path attributes in Set-Cookie, which means Path is a delivery filter, not a security boundary. (<a href="https://datatracker.ietf.org/doc/html/rfc6265?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>That creates a very specific review target: any application that assumes path scoping is enough to prevent one part of the site from interfering with another. If there is path-based multitenancy, path-based admin separation, or path-based auth state partitioning, look harder. The vulnerability is usually not “cookie theft.” It is cookie shadowing, unexpected precedence, or the server reading the wrong value under ambiguous state.</p><p>If a team says “it’s safe because that cookie is only valid under /admin,” that is not reassuring. That is an invitation.</p><h3>3. Secure is not integrity, and the spec says so out loud</h3><p>A lot of people talk about Secure as though it means “safe cookie.” The RFC is less sentimental. It explicitly says the Secure attribute protects confidentiality of transmission but does <strong>not</strong> provide integrity in the presence of an active network attacker. In other words, Secure is necessary, but it was never enough to carry the whole design. (<a href="https://datatracker.ietf.org/doc/html/rfc6265?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>Why does that matter in practice? Because teams often stop their analysis there. “It’s Secure, so we’re done.” No. The real question is whether the session design assumes the cookie cannot be replaced, confused, downgraded, or raced by other state mechanisms. If the broader architecture treats Secure as the only hardening measure, you may have a design that looks modern in headers and old in threat model.</p><p>This is one reason the browser guidance around __Host- and __Secure- prefixes matters more than many teams realize. The prefix is not cosmetic naming. It is a browser-checkable constraint on how the cookie is allowed to be set. (<a href="https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Cookies?utm_source=chatgpt.com">MDN Web Docs</a>)</p><h3>4. SameSite is where auth flows and security reality start diverging</h3><p>The modern cookie story is not just host, path, and lifetime anymore. It is deeply tied to <strong>same-site versus cross-site</strong> request context. The active rfc6265bis work bakes that modern behavior into the standard, and browser documentation now treats SameSite as fundamental, not optional polish. If a cookie is intended to participate in cross-site contexts, the modern rule is SameSite=None; Secure. If it is not, the browser may suppress it in exactly the places where legacy systems still expect it to appear. (<a href="https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-rfc6265bis?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>This creates two very good classes of bugs.</p><p>The first is the straightforward one: a team bolted on SameSite=None to “make auth work” and quietly reopened cross-site request surface they no longer understand. That is worth testing for CSRF, login CSRF, federated flow confusion, and endpoint assumptions that only held while the cookie was implicitly harder to send.</p><p>The second is subtler and often better: the cookie no longer rides in the intended cross-site flow, so the application invents a fallback. It passes tokens in query strings, fragments, JSON bodies, local storage, or custom headers because “cookies were unreliable.” Those fallback paths are often weaker than the cookie model they replaced. That is a real 2026 bug-hunting instinct: do not just test the cookie policy. Test the <strong>bad compensating architecture</strong> that got built after the cookie policy surprised the team.</p><h3>5. Partitioned cookies are new enough that people are still reasoning about them badly</h3><p>Partitioned cookies — CHIPS — are now part of the modern browser story. MDN currently describes them as baseline-available in 2025, with a separate cookie jar per top-level site for opted-in cookies. The point is to preserve legitimate embedded state without reviving the old universal third-party cookie model. (<a href="https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>That means there is a fresh class of implementation mistakes: teams who believe partitioned cookies behave like old third-party cookies, and teams who do not realize their embedded auth assumptions are now top-level-site-dependent. Good places to look are SSO widgets, payment embeds, support widgets, account switchers, and SaaS control panels embedded cross-site.</p><p>The finding is rarely “the browser is wrong.” The finding is usually that the application’s state machine still assumes globally shared third-party state, while the browser has moved to partitioned state. That mismatch can produce auth confusion, session fixation-like behavior inside embeds, broken logout, or tenant mix-ups.</p><h3>6. CORS is not auth. It is response-read permission for browser JavaScript</h3><p>If you want one sentence that kills half the nonsense around CORS, it is this:</p><p><strong>CORS does not decide whether the browser can send the request. It decides whether browser JavaScript can read the response.</strong></p><p>That is the modern model in the Fetch Standard and current MDN guidance. It is why so many teams misdiagnose CORS bugs. They think “request blocked” means “request never happened.” In reality, the network interaction may have happened; the browser may simply refuse to expose the result to the calling origin because the response did not satisfy the CORS protocol. (<a href="https://fetch.spec.whatwg.org/?utm_source=chatgpt.com">Fetch Standard</a>)</p><p>That distinction produces two different bug classes.</p><p>One is the obvious data-exposure class: a response becomes readable cross-origin when it should not.</p><p>The other is the state-change class: teams assume CORS protects side-effecting endpoints because “other sites can’t call them,” when in reality CORS is not a CSRF defense and does not stop the browser from issuing many kinds of cross-origin traffic. The bug is the mistaken belief that a read-control protocol is a send-control protocol.</p><p>If you see a team leaning on CORS as though it were auth, that is not a small misunderstanding. That is usually an architectural opening.</p><h3>7. Reflected Origin with credentials: still good, but only if the allowlist is actually broken</h3><p>Credentialed CORS remains one of the most productive review areas. Modern guidance is clear: if the request carries credentials, the server must return a specific allowed origin, not *, and Access-Control-Allow-Credentials: true must be present for the browser to expose the response to frontend code. MDN also notes that Set-Cookie will not take effect on a credentialed cross-origin response if ACAO is * instead of an actual origin. (<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Credentials?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>So the real bug is not “I saw Access-Control-Allow-Credentials: true.” The real bug is <strong>how the origin gets approved</strong>.</p><p>Look for:</p><ul><li>suffix matching instead of exact origin matching,</li><li>substring checks,</li><li>regex mistakes,</li><li>protocol confusion,</li><li>acceptance of null,</li><li>and trust in attacker-controlled subdomains.</li></ul><p>That is where the serious CORS findings come from. The header reflection is just the visible symptom. The underlying bug is origin parser weakness.</p><h3>8. null origin and weird-origin trust is a better test than most scanners do</h3><p>A lot of origin validation code is written by people who think an origin is “basically a hostname.” It is not. Scheme and port are part of origin. And there are edge contexts that produce Origin: null, which is why treating null as harmless or equivalent to “no origin” is still dangerous. PortSwigger’s current CORS material still calls out null as a meaningful ACAO value with real exploitation implications when trusted carelessly. (<a href="https://portswigger.net/web-security/cors/access-control-allow-origin?utm_source=chatgpt.com">PortSwigger</a>)</p><p>This is the kind of issue that separates actual review from checkbox scanning. Do not just test your normal attacker origin. Test weird-but-valid origins, sandboxed/null-like contexts where applicable, scheme changes, localhost variants in dev-heavy systems, and mixed-port setups. Most broken allowlists are not broken for the clean demo case. They are broken at the parsing margins.</p><h3>9. Missing Vary: Origin is a cache bug masquerading as a CORS bug</h3><p>This one is genuinely underrated. If a server dynamically returns Access-Control-Allow-Origin based on the incoming Origin but forgets Vary: Origin, then an HTTP cache can serve a response tailored for one origin to a different origin. MDN’s CORS guidance explicitly shows Vary: Origin alongside explicit ACAO behavior because without it, caches do not know that the response depends on Origin. (<a href="https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/CORS?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>People often describe this as “just a reliability issue.” It can be, but that framing is too soft. Any time authorization-like response exposure is origin-dependent and caching does not know it, you should at least think in terms of cache confusion and policy cross-talk. Sometimes the result is only broken frontend behavior. Sometimes the result is cross-tenant or cross-origin exposure in front of shared infrastructure.</p><p>The important point is that CORS policy is not just headers. It is headers plus caches plus how responses vary.</p><h3>10. Set-Cookie being invisible to JS creates a very specific class of bad workarounds</h3><p>Modern browsers do not expose Set-Cookie to frontend JavaScript. The Fetch model treats it as a forbidden response-header name, and MDN is explicit that browsers filter it out from responses exposed to frontend code. (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Headers/getSetCookie?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>On its face, that sounds defensive. It is. But it also creates a recurring engineering anti-pattern: teams want the frontend to “know the session was set,” discover they cannot read Set-Cookie, and then add another signal. They return session tokens in JSON, echo back auth state in custom exposed headers, or create a “login successful with token” response purely so the SPA can observe something it was never supposed to need directly.</p><p>That is a beautiful place to hunt. The spec-compliant cookie path is often fine. The <strong>extra observability path</strong> added for frontend convenience is often where the leak is.</p><h3>11. Preflight mismatches are often boring until they are not</h3><p>CORS preflight is usually treated as framework furniture. The browser sends an OPTIONS request describing the method and headers it wants to use; the server answers with what it will allow. That basic model is in modern CORS guidance and the Fetch standard. (<a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS?utm_source=chatgpt.com">MDN Web Docs</a>)</p><p>The good bugs show up when the application’s actual enforcement and the preflight policy drift apart.</p><p>If the preflight says a method or header is fine, but the actual route logic enforces something weaker, stronger, or just different, you get inconsistent state. Sometimes that only creates operational weirdness. Sometimes it reveals an internal API shape or enables request forms the team never meant to be callable cross-origin.</p><p>The review mindset here is not “does OPTIONS return 200.” It is “does the browser-facing permission model match the application-facing enforcement model on every path that matters.”</p><h3>12. The best cookie/CORS bugs are usually trust-boundary bugs, not header bugs</h3><p>That is the larger lesson tying all of this together.</p><p>The highest-signal findings are rarely “missing Secure” or “forgot ACAO.” Those are surface indicators. The real bugs are:</p><ul><li>trusting sibling subdomains too much,</li><li>treating Path as isolation,</li><li>treating Secure as integrity,</li><li>using SameSite=None without understanding the resulting cross-site state model,</li><li>reasoning about partitioned cookies with an outdated third-party cookie mindset,</li><li>treating CORS like auth,</li><li>validating origins loosely,</li><li>forgetting that caches participate in CORS,</li><li>and building unsafe fallback mechanisms because the real browser model was inconvenient.</li></ul><p>That is where the elite stuff lives. Not in memorizing headers, but in asking one unfriendly question:</p><p><strong>What guarantee does this team think the browser is giving them that the spec never actually promised?</strong></p><p>That is the place to start.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a67de67784f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JWTs for People Who Hunt Bugs, Not Blog Posts]]></title>
            <link>https://sin99xx.medium.com/jwts-for-people-who-hunt-bugs-not-blog-posts-3c7020d2d7d8?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c7020d2d7d8</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 20:21:28 GMT</pubDate>
            <atom:updated>2026-03-17T20:22:06.010Z</atom:updated>
            <content:encoded><![CDATA[<h3>A whitepaper on JOSE semantics, verifier failure modes, and where real systems break</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*XialUg-aSAWb1IgVtG3dbQ@2x.jpeg" /></figure><p>JWT is usually presented as a compact token format for authentication and authorization. That description is operationally useful and analytically weak. For a security engineer, a JWT is better modeled as a <strong>serialized cryptographic object carrying attacker-controlled metadata</strong>, where the decisive question is not whether the primitive is modern, but whether the verifier permits untrusted structure to influence trust before trust has been earned. JWT failures are rarely about “breaking SHA-256.” They are about finding the exact point where the implementation stops treating the token as hostile input and starts treating it as configuration. The JOSE stack — JWS, JWE, JWK, and JWA — was standardized across RFCs 7515, 7516, 7517, and 7518, with JWT itself in RFC 7519 and the hardening guidance in RFC 8725. (<a href="https://www.rfc-editor.org/rfc/rfc7515?utm_source=chatgpt.com">RFC Editor</a>)</p><p>That is the right frame for a 2026 reader. The interesting problems are not “what is a claim” or “how do I decode base64url.” The interesting problems are these: which fields are consulted before authenticity is established, which keys are reachable through attacker input, which algorithms are accepted because the token asked for them, which claims are interpreted outside their intended context, and which error paths leak structure under adaptive probing. The current IETF direction has only reinforced this posture: RFC 8725 remains the baseline BCP, rfc8725bis is active, and JOSE is also advancing draft work to formally deprecate JWS none and JWE RSA1_5, which is really the standards process admitting that verifier flexibility has historically been too generous. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>1. What a JWT actually is, before applications romanticize it</h3><p>At the wire level, a compact JWT is not “a JSON object.” It is an ASCII string composed of base64url-encoded segments separated by literal dots. RFC 7519 defines JWT claims as a JSON object used as the payload of a JWS or the plaintext of a JWE. That byte-level definition matters because the security boundary is not the later parsed object model; it is the exact serialized input on which cryptographic operations are defined. (<a href="https://www.rfc-editor.org/rfc/rfc7519?utm_source=chatgpt.com">RFC Editor</a>)</p><p>For a signed JWT, the compact JWS form is:</p><p>BASE64URL(UTF8(JWS_Header)) || &#39;.&#39; || BASE64URL(JWS_Payload) || &#39;.&#39; || BASE64URL(JWS_Signature)</p><p>RFC 7515 defines the JWS Signing Input as the ASCII bytes of the first two transmitted segments joined by a dot. That means the signature is over bytes, not over semantic JSON equivalence, not over claims “as understood by the application,” and not over any normalized representation a library invents after parsing. If one forgets that, one begins reasoning about JWT at the wrong layer. (<a href="https://www.rfc-editor.org/rfc/rfc7515?utm_source=chatgpt.com">RFC Editor</a>)</p><p>For an encrypted JWT, compact JWE is:</p><p>BASE64URL(Protected_Header) || &#39;.&#39; || BASE64URL(Encrypted_Key) || &#39;.&#39; || BASE64URL(Initialization_Vector) || &#39;.&#39; || BASE64URL(Ciphertext) || &#39;.&#39; || BASE64URL(Authentication_Tag)</p><p>RFC 7516 defines those five fields and makes the protected header part of the authenticated data. In other words, even when the header is visible, it is still cryptographically bound to the ciphertext and tag. That is one of the more misunderstood aspects of JWE: the header is not merely descriptive metadata, it participates in the integrity model. (<a href="https://datatracker.ietf.org/wg/jose/about/?utm_source=chatgpt.com">IETF Datatracker</a>)</p><h3>2. JWS and JWE are not “formats”; they are trust transitions</h3><p>In HS256, the signer computes an HMAC over the JWS Signing Input using a shared secret. In RS256, the signer hashes the same input and signs it using RSASSA-PKCS1-v1_5. In ES256, the signer generates an ECDSA signature over P-256 and serializes the (r,s) pair in JOSE’s fixed-width format. In all of those cases, the verifier’s obligation is very narrow: reconstruct the signing input exactly, apply the cryptographic check under a policy-approved algorithm and key, and reject on any mismatch. (<a href="https://www.rfc-editor.org/rfc/rfc7515?utm_source=chatgpt.com">RFC Editor</a>)</p><p>JWE is a different sort of machine. The verifier first has to recover or derive the Content Encryption Key according to alg, then apply the content encryption algorithm specified by enc, and only then release plaintext if authentication succeeds. Depending on the header, the CEK may be transported with RSA-OAEP, wrapped under AES Key Wrap, derived through ECDH-ES, or supplied directly in dir mode. Each accepted alg therefore expands the verifier’s state space. That is not merely interoperability; it is attack surface. (<a href="https://datatracker.ietf.org/wg/jose/about/?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>This is why JWT should be taught as a system of trust transitions rather than a convenience token. JWS asks whether these bytes were authenticated under this algorithm and key. JWE asks whether CEK establishment, content decryption, and integrity checks all succeeded under exact rules. Nested JWT asks whether both layers were validated in the intended order. Systems get into trouble when they flatten those separate questions into a single boolean called “token valid.” (<a href="https://www.rfc-editor.org/rfc/rfc7519?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>3. The real bug-hunting thesis: untrusted metadata must not negotiate verification policy</h3><p>The recurring JWT bugs all share one structural defect: the verifier allows attacker-controlled token metadata to influence the rules that are supposed to constrain the token. That is the common logic behind algorithm confusion, kid injection, jwk abuse, jku-driven key substitution, cross-token substitution, and differentiated decryption oracles. The mistake is not the existence of a header. The mistake is permitting the unauthenticated header to participate in trust negotiation. RFC 8725 is essentially a long formal argument for refusing that posture. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>A serious verifier therefore begins with policy that exists outside the token: accepted algorithms, accepted key classes, accepted issuers, accepted audiences, accepted token types, and accepted key lookup rules. The token may identify a candidate within that universe. It must not be allowed to widen the universe. The difference sounds philosophical until you review a target that reads alg, chooses a verification mode, reads kid, chooses a storage path, reads jku, chooses a network destination, and only then asks whether any of this was a good idea. That is not verification. That is adversary-assisted configuration. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>4. Algorithm choice is really trust-model choice</h3><p>The standard HS256/RS256/ES256/PS256 comparison is too often presented as a performance table. For actual security work, these are distinct trust models disguised as algorithms. RFC 7518 defines the algorithms, but RFC 8725 is where the operational consequences become explicit. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>HS256 is cryptographically fine if the key is actually a cryptographic key. The trouble is architectural: every verifier holding the HMAC secret can also mint tokens. In a distributed system, that collapses issuance and verification into the same privilege. RFC 8725 explicitly warns against using human-memorable passwords directly as HMAC keys because once a valid token is observed, weak deployments reduce to offline guessing. The failure mode is not exotic. It is a key-management failure wearing a JWT badge. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>RS256 improves the trust model because verifiers only need the public key. But it also creates the exact precondition for the most famous JWT exploit family: if the verifier treats “key material” generically and allows the token to influence algorithm choice, RSA public-key bytes can be reinterpreted as an HMAC secret. That is not a weakness in RSA. It is type confusion at the verification boundary. RFC 8725’s guidance on caller-specified algorithms and key separation exists precisely to prevent that collapse. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>ES256 is attractive because elliptic-curve signatures are smaller and efficient, but they are less forgiving of sloppy implementation. ECDSA depends on sound nonce generation, which is exactly why RFC 6979 standardized deterministic nonce generation. The point for a bug hunter is not to recite “ECDSA needs good randomness.” The point is to inspect whether the implementation got nonce discipline, JOSE signature serialization, side-channel behavior, and key validation right at the same time. (<a href="https://datatracker.ietf.org/wg/jose/about/?utm_source=chatgpt.com">IETF Datatracker</a>)</p><p>PS256 is generally the cleaner RSA signature choice when ecosystem support allows it. But even a superior signature scheme does not rescue a verifier that accepts the wrong token, from the wrong issuer, under the wrong key-selection pathway, for the wrong application context. Strong primitives do not compensate for weak verification semantics. (<a href="https://datatracker.ietf.org/wg/jose/about/?utm_source=chatgpt.com">IETF Datatracker</a>)</p><h3>5. The exploit classes that still matter</h3><p>Algorithm confusion remains the canonical JWT bug because it exposes whether the verifier actually knows what kind of key it is holding. A public RSA key and an HMAC secret are not interchangeable in any real cryptographic model. Yet a verifier that reduces both to “bytes plus an algorithm named by the token” has erased that distinction itself. Once that type boundary is gone, the attacker does not need to break RSA; they only need the application to keep passing the same bytes into a library that now interprets them differently. That is why this class is still worth teaching to mature engineers. It is not old news. It is a lesson about trust-boundary typing. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>Weak HS256 deployments are less glamorous and often more practical. If the HMAC key is low entropy, the token becomes an offline cracking target. No interaction with the verifier is required after capture. One valid token plus a bad secret policy is enough. RFC 8725’s language on high-entropy keys is not ceremonial advice; it reflects a failure mode that remains common in real deployments. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>Header-driven key selection is where JWT starts to look less like cryptography and more like input injection wearing a suit. RFC 7515 defines kid, jwk, jku, x5u, and related parameters, while RFC 8725 warns that these values must not be trusted without strong policy constraints. If kid is spliced into SQL, mapped into a filesystem path, or treated as an unchecked selector into a key store, the token has opened a classic injection surface. If jwk is accepted as self-supplied trust or jku is allowed to fetch arbitrary remote keys, the signature check may still succeed while the verifier has been tricked into validating against attacker-chosen material. That is not signature bypass in the childish sense. It is verification-path compromise. (<a href="https://www.rfc-editor.org/rfc/rfc7515?utm_source=chatgpt.com">RFC Editor</a>)</p><p>Substitution attacks are what happen when systems confuse cryptographic validity with semantic legitimacy. A token may be perfectly signed and still be unacceptable: wrong audience, wrong issuer relationship, wrong token type, wrong protocol role, wrong relying party, wrong nested composition. RFC 8725 leans hard on issuer validation, audience validation, explicit typing, and mutually exclusive validation rules because a valid token for one purpose is routinely replayable into another unless the application binds it to context. This is the mature JWT bug class: the crypto passes, the authorization model fails. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>6. The advanced vectors serious assessors still care about</h3><p>ECDH-ES in JWE is where casual JWT knowledge ends and actual cryptographic review begins. In that mode, the recipient combines a static private key with an attacker-influenced ephemeral public key from the header. If the implementation does not validate that point correctly, classic invalid-curve or subgroup-style attacks become relevant. RFC 8725 explicitly calls out the need for elliptic-curve input validation, and the JOSE ecosystem has already lived through real-world library fixes motivated by this class of issue. Once you realize that a token header is feeding a public-key operation, the review question writes itself: are we validating the peer point before scalar multiplication? (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><p>RSA1_5 remains important not because modern engineers should be using it, but because it teaches the right lesson about decryption-side behavior. The long history of Bleichenbacher-style oracle attacks against PKCS#1 v1.5 encryption is exactly why the JOSE standards track is moving to formally deprecate JWE RSA1_5, and why current IETF drafts reflect a narrower tolerance for legacy flexibility. The vulnerability is not “RSA bad.” It is that decryption plus distinguishable failure behavior plus attacker-controlled ciphertext is a dangerous combination, and standards bodies are finally treating that as a first-class design constraint rather than a footnote. (<a href="https://datatracker.ietf.org/doc/draft-ietf-oauth-rfc8725bis/?utm_source=chatgpt.com">IETF Datatracker</a>)</p><h3>7. What a hardened verifier actually believes</h3><p>A hardened JWT acceptance pipeline is built on invariants, not convenience. The accepted algorithm set is defined by application policy before the token is consulted. Keys are typed and scoped: an RSA verification key is not “just bytes,” an HMAC secret is not “just bytes,” and a signing key is not silently reused as a decryption key. Header parameters are treated as hostile until independently constrained. Unknown critical parameters are not tolerated into success. Signature or decryption success is necessary and insufficient: issuer, audience, lifetime, token type, and context-specific profile rules are separate gates. And failure handling is uniform enough that the verifier does not become an oracle under probing. Those are not stylistic preferences. They are the minimum beliefs required to keep JWT from becoming a parser-mediated trust escalation mechanism. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><h3>8. Final thesis</h3><p>The enduring lesson of JWT is not that JSON is dangerous or that web developers should not touch cryptography. It is that <strong>verification semantics are security-critical software</strong>, and JWT puts a large amount of expressive power in precisely the layer where teams are tempted to trust attacker-controlled structure too early. The question that matters in every serious review is simple:</p><p><strong>What does the token get to influence before trust has been established?</strong></p><p>If the answer includes algorithm choice, key class, key source, token type, or authorization context, the system is probably review-worthy. That was true when RFC 8725 was published, and the direction of rfc8725bis and the deprecation work around none and RSA1_5 suggests the standards process agrees. JWT is still useful. But in 2026, anyone serious about bug hunting should stop treating it as a token format and start treating it as what it really is: a hostile input language for verifiers. (<a href="https://www.rfc-editor.org/rfc/rfc8725?utm_source=chatgpt.com">RFC Editor</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c7020d2d7d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When a Composite Checkout Keeps Pricing From a State That No Longer Exists]]></title>
            <link>https://sin99xx.medium.com/when-a-composite-checkout-keeps-pricing-from-a-state-that-no-longer-exists-edffe47cba64?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/edffe47cba64</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bugbounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 17:21:51 GMT</pubDate>
            <atom:updated>2026-03-15T17:25:37.969Z</atom:updated>
            <content:encoded><![CDATA[<p>Most payment bugs people look for are obvious: changing a price, reusing a discount, forcing a negative total, or finding a race condition.</p><p>This one was different.</p><p>The issue was not about directly modifying amounts. It was about breaking a transaction invariant in a bundled checkout flow.</p><p>The platform allowed a user to start with <strong>Transaction A</strong> and then attach <strong>Transaction B</strong> in the same checkout session. When the combined value of <strong>A + B</strong> crossed a threshold, the backend applied more favorable pricing to <strong>A</strong>.</p><p>That means <strong>A</strong> was not independently entitled to that pricing. Its discount existed only because <strong>B</strong> existed too.</p><p>So the rule should have been simple:</p><p><strong>Transaction A may keep bundle-derived pricing only while the state (A + B) still exists.</strong></p><p>That rule was not enforced.</p><p>Here is the simplest way to model it.</p><p><strong>Initial standalone state</strong></p><p><strong>Transaction A</strong></p><ul><li>base amount: 7.75</li><li>standalone fee: 4.49</li><li>standalone total: 12.24</li></ul><p>By itself, <strong>A</strong> does not qualify for reduced pricing.</p><p>Now the user attaches <strong>Transaction B</strong>:</p><p><strong>Transaction B</strong></p><ul><li>base amount: 8.25</li></ul><p>Now the combined value becomes:</p><p><strong>A + B = 16.00</strong></p><p>At that point, the platform marks <strong>A</strong> as eligible for better pricing because the bundled threshold has been met.</p><p>So the pricing changes from:</p><p><strong>A = 7.75 + 4.49 fee</strong></p><p>to something like:</p><p><strong>A = 7.75 + 0.00 adjusted fee</strong></p><p>That is still valid at this stage, because the backend’s assumption is:</p><p><strong>A is discounted because B exists.</strong></p><p>The problem starts during payment.</p><p>Suppose the payment source has enough balance to cover <strong>A</strong> in its discounted state, but not enough to cover the full bundled total.</p><p>Then the authorization flow becomes:</p><ul><li><strong>auth(A) = success</strong></li><li><strong>auth(B) = failure</strong></li></ul><p>This is the exact point where the backend has to choose a safe model.</p><p>There are only two correct options.</p><p><strong>Option 1: atomic processing</strong><br>If pricing depends on <strong>A + B</strong>, then both transactions must succeed together. If <strong>B</strong> fails, nothing should finalize.</p><p><strong>Option 2: revalidation on partial failure</strong><br>If the system allows <strong>A</strong> to survive while <strong>B</strong> fails, then it must remove <strong>B</strong> from the transaction state, recalculate <strong>A</strong> as a standalone transaction, invalidate the bundle-derived pricing, and require authorization for the corrected total.</p><p>What the vulnerable flow did instead was this:</p><ul><li><strong>A succeeded</strong></li><li><strong>B failed</strong></li><li><strong>A finalized anyway</strong></li><li><strong>A kept pricing that was only valid while B existed</strong></li></ul><p>That is the bug.</p><p>The backend computed pricing using the state <strong>(A + B)</strong>, but finalized settlement using the state <strong>(A)</strong>, without rechecking whether <strong>A</strong> was still entitled to bundle-derived pricing.</p><p>A clean state-machine view makes the issue obvious:</p><p><strong>S0 — Standalone</strong></p><ul><li>only <strong>A</strong> exists</li><li><strong>A</strong> does not qualify for reduced pricing</li></ul><p><strong>S1 — Composite eligible</strong></p><ul><li><strong>B</strong> is added</li><li><strong>A + B</strong> crosses the threshold</li><li>reduced pricing is applied to <strong>A</strong></li></ul><p><strong>S2 — Authorization</strong></p><ul><li><strong>auth(A) = success</strong></li><li><strong>auth(B) = failure</strong></li></ul><p><strong>S3 — Vulnerable finalization</strong></p><ul><li><strong>B</strong> no longer survives</li><li><strong>A</strong> is finalized with pricing inherited from <strong>S1</strong> instead of being repriced under <strong>S0</strong></li></ul><p>The broken transition is <strong>S2 -&gt; S3</strong>.</p><p>Once <strong>B</strong> failed, the system should have moved back to standalone pricing logic for <strong>A</strong>. It did not. It carried forward stale eligibility from a state that no longer existed.</p><p>That is why this is not just a billing inconsistency. It is a <strong>state-machine integrity bug</strong>.</p><p>The backend encoded real economic rules:</p><ul><li>threshold-based fee waivers</li><li>bundle-dependent incentives</li><li>pricing derived from linked transaction state</li></ul><p>Those rules only work if the backend recomputes truth when the qualifying state changes. Here, it did not.</p><p>A user could intentionally create a valid composite state, let the platform apply the incentive, then force one leg of the composite to fail and still keep the favorable pricing on the surviving leg.</p><p>That is a direct failure of order-calculation integrity.</p><p>What makes the bug stronger is that it was practical. It did not require packet timing, request replay, client mutation, or race windows. It relied on a normal backend event: <strong>partial authorization failure in a multi-leg checkout</strong>.</p><p>That matters because payment failure is part of the security boundary. If a platform supports linked transactions and bundle-derived pricing, then partial failure handling has to be security-correct, not just payment-correct.</p><p>The deeper mistake was treating eligibility as a sticky flag instead of a derived condition.</p><p>A lot of systems effectively do this:</p><ul><li>threshold reached</li><li>flag set</li><li>benefit applied</li></ul><p>That only works when the qualifying condition remains true.</p><p>In this case, the flag was created because <strong>B</strong> existed. Once <strong>B</strong> failed, the flag should have died with it. Instead, <strong>A</strong> kept a pricing property that was no longer justified by the current transaction state.</p><p>That is the entire finding.</p><p>Not because a number was changed manually.<br>Not because the frontend was tricked.<br>But because the backend finalized an outcome based on a stale state snapshot.</p><p>The fix is straightforward in design terms.</p><p>Once <strong>B</strong> fails, the system must do one of the following before finalizing anything:</p><ul><li>cancel the entire composite checkout</li><li>revert <strong>A</strong> to a pre-finalization state</li><li>reprice <strong>A</strong> as a standalone transaction</li><li>remove all bundle-derived incentives</li><li>require fresh authorization for the corrected amount</li></ul><p>The invariant should be:</p><p><strong>A surviving transaction must never retain incentives whose validity depended on a bundle that no longer exists.</strong></p><p>This kind of bug gets missed because most payment testing is too local. People ask whether they can change a number, reuse a code, or break the total. The better question is:</p><p><strong>What happens when one subsystem computes value from assumptions that another subsystem later invalidates?</strong></p><p>That is what happened here.</p><p>The pricing subsystem assumed:</p><p><strong>A is discounted because B exists.</strong></p><p>The authorization subsystem later proved:</p><p><strong>B does not survive.</strong></p><p>The finalization path never reconciled those two facts.</p><p>That was the vulnerability.</p><p><strong>Final thought</strong></p><p>This was not a flashy bug. No exploit chain, no timing trick, no weird payload.</p><p>Just a backend that calculated pricing in one state and finalized in another.</p><p>And that is exactly why it matters nd what made me <strong>MONEY</strong>.</p><p>Some of the best bugs are not hidden in requests. They are hidden in the moment a system quietly stops enforcing the condition that made its earlier decision valid.</p><p>#bugbountytips #cybersecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=edffe47cba64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Most bug bounty writeups are recycled. Real bugs are hiding in the specs.]]></title>
            <link>https://sin99xx.medium.com/most-bug-bounty-writeups-are-recycled-real-bugs-are-hiding-in-the-specs-ded73f6dd06e?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/ded73f6dd06e</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 19:02:28 GMT</pubDate>
            <atom:updated>2026-03-14T19:11:31.405Z</atom:updated>
            <content:encoded><![CDATA[<p>A lot of people in bug bounty keep reading the same stuff.</p><p>Same recon tips. Same payload lists. Same “how I found XSS” stories. Same fake-deep writeups that sound smart but do not actually teach you how real systems work.</p><p>That is exactly where I got stuck for a while.</p><p>I was past beginner level, but I still felt like I was trapped in that middle stage where you know enough to test things, but not enough to consistently spot deeper bugs. I could do the usual workflow. I could try common auth tests, common web bugs, common edge cases. But most of it felt surface-level.</p><p>At some point I realized the problem was not that I was lazy or missing tools.</p><p>The problem was that I was mostly learning <strong>bug bounty content</strong>, not learning the actual <strong>protocols and systems behind the bugs</strong>.</p><p>That changed when I started reading specs.</p><p>Not another hype thread. Not another “top 10 bug bounty tips” post. Actual documentation.</p><p>And this bug came directly from that.</p><h3>The bug was in a Google login flow</h3><p>The target supported <strong>Sign in with Google</strong> through OpenID Connect.</p><p>At first glance, nothing looked strange. User clicks the Google login button, Google authenticates them, the application receives identity information, and the user gets logged in.</p><p>Pretty normal.</p><p>But the problem was in what happened <strong>after</strong> Google returned the identity data.</p><p>The application treated the user’s <strong>email address</strong> as their identity.</p><p>That sounds small, but it is exactly where the bug was.</p><p>Because in OpenID Connect, <strong>email is not the stable identity</strong>.</p><h3>The important part most implementations get wrong</h3><p>When an OpenID Connect provider authenticates a user, it returns claims inside an ID token.</p><p>A lot of developers see something like this and immediately focus on the email:</p><pre>email = admin@clinic-example.com</pre><p>Then the app says:</p><pre>same email = same user</pre><p>That is the mistake.</p><p>The stable identity in OIDC is the pair:</p><pre>iss + sub</pre><p>Where iss is the issuer, and sub is the subject identifier for that user.</p><p>That pair is what should be used to bind the local account.</p><p>Not the email claim.</p><p>The email is just an attribute. It is useful, but it is not permanent. It can be reassigned, recycled, recreated, or returned under a different real-world owner later.</p><p>Once you understand that, the entire bug becomes obvious.</p><h3>What the vulnerable logic looked like</h3><p>The application was basically doing this:</p><pre>Google returns email = admin@org.com<br>application looks for existing account with email = admin@org.com<br>application logs that Google user into the existing account</pre><p>Instead of doing this:</p><pre>Google returns iss + sub<br>application binds that stable identity to the account<br>future logins must match the same iss + sub</pre><p>So the app was not really asking, “is this the same Google identity as before?”</p><p>It was asking, “does this login come back with the same email string?”</p><p>Those are not the same question.</p><p>And when an app confuses those two things, identity takeover becomes possible.</p><h3>Why email is a bad identity key here</h3><p>A lot of developers still think email is “unique enough.”</p><p>It is not.</p><p>It is only temporarily associated with a person. It is not guaranteed to stay with them forever.</p><p>That matters a lot in SSO and federated login flows.</p><p>There are two very practical ways this breaks.</p><h3>Scenario 1: same organization, same email, different person</h3><p>Imagine an organization uses a mailbox like:</p><pre>admin@clinic-example.com</pre><p>First, that email belongs to User A.</p><p>User A signs in through Google and creates an account on the target platform. The application now links that account to admin@clinic-example.com.</p><p>Later, User A leaves the organization.</p><p>The organization deletes or deprovisions that Google Workspace user.</p><p>Some time later, a different employee is created with the exact same email address:</p><pre>admin@clinic-example.com</pre><p>But this is now User B.</p><p>Different human.<br>Different Google account.<br>Different subject identifier.</p><p>If the application only checks the returned email claim, it sees the same email string and assumes this must be the same person as before.</p><p>So it logs User B into User A’s old account.</p><p>Same email text. Completely different identity.</p><p>That is not a weird edge case. That is an account takeover caused by broken identity binding.</p><h3>Scenario 2: expired domain and recreated mailboxes</h3><p>The second case is even more interesting.</p><p>An organization shuts down and its domain expires.</p><p>Later, somebody else registers that same domain again and recreates old-looking mailboxes on it.</p><p>For example:</p><pre>admin@old-practice.com</pre><p>If the target platform still has an account historically tied to that email, and its Google login flow only trusts the email claim, the new owner of that mailbox can end up logged into the historical account.</p><p>That means a completely different person, under completely different ownership, can inherit access just because the same email string came back again.</p><p>Once you look at it from a protocol point of view, the bug is very straightforward.</p><p>The application treated a <strong>recyclable attribute</strong> as if it were a <strong>permanent identity</strong>.</p><h3>Why this bug matters</h3><p>This kind of issue gets underestimated because it does not look flashy.</p><p>There is no script popup.<br>No SQL syntax error.<br>No “hacked” screen.<br>No payload that makes people clap on Twitter.</p><p>But the impact is real.</p><p>If the account contains sensitive messages, stored documents, private communications, profile data, or privileged actions, then logging the wrong person into that account is a full compromise of confidentiality and integrity for that user.</p><p>And the dangerous part is that the login itself looks legitimate from the application’s point of view.</p><p>The app thinks Google authenticated the user correctly.</p><p>Google did authenticate the user correctly.</p><p>The problem is that the application linked the authenticated Google account to the wrong local user because it trusted the wrong identifier.</p><p>That is why this class of bug is so important.</p><p>Nothing is “broken” at the provider level.<br>The break happens in the application’s identity binding logic.</p><h3>Why I found it by reading docs, not by running tools</h3><p>No scanner is going to tell you:</p><p>“this application is binding OpenID Connect users by email instead of stable subject identity.”</p><p>That is not how these bugs show up.</p><p>You find them when you stop treating authentication as a black box and start asking protocol questions.</p><p>Questions like:</p><p><em>What exactly is this app using as the account key?</em></p><p><em>Is it trusting </em><em>email or trusting </em><em>iss + sub?</em></p><p><em>What happens if the mailbox changes owners?</em></p><p><em>What happens if the domain expires?</em></p><p><em>What happens if the same email comes back under a different Google identity?</em></p><p>Those are not payload questions.</p><p>Those are protocol questions.</p><p>And that is why I keep saying real bugs are often hiding in specs, docs, RFCs, and provider guidance that most people ignore.</p><p>A lot of bug bounty content teaches people how to repeat testing patterns.</p><p>Reading protocols teaches you how to recognize when the application’s logic is fundamentally wrong.</p><h3>The root cause in one sentence</h3><p>The root cause was simple:</p><p>The application treated this:</p><pre>email</pre><p>as identity, when it should have treated this:</p><pre>iss + sub</pre><p>as identity.</p><p>That single mistake is enough to turn a normal Google login flow into an account takeover condition.</p><h3>What the correct implementation should do</h3><p>The correct design is not complicated.</p><p>The application should bind accounts to the stable identifier returned by the identity provider, which in OIDC means the issuer and subject pair.</p><p>Email can still be stored.</p><p>Email can still be displayed.</p><p>Email can still be used for communication.</p><p>But email should not be the thing that decides whether two identities are the same user.</p><p>That decision belongs to the stable provider identity, not to a mutable attribute that can change ownership over time.</p><h3>The bigger lesson</h3><p>This bug is a good example of something I wish more hunters understood earlier.</p><p>A lot of real vulnerabilities do not come from clever payloads.</p><p>They come from knowing how a protocol is supposed to work, then noticing that the implementation quietly violates that contract.</p><p>That is where a lot of strong bugs live.</p><p>OAuth mistakes.<br>OIDC account confusion.<br>SAML validation issues.<br>JWT handling mistakes.<br>Session binding flaws.<br>Account recovery edge cases.</p><p>None of these are as glamorous as people make XSS look online, but they are often much more meaningful.</p><p>And most of them become easier to spot once you stop only reading writeups and start reading the docs those writeups never mention.</p><h3>Final thought</h3><p>This finding did not come from some magic trick.</p><p>It came from understanding one boring but important truth:</p><p><strong>email is not a stable identity in OpenID Connect.</strong></p><p>Once you really understand that, you start seeing the bug everywhere an application makes identity decisions on the email claim alone.</p><p>That is the difference between recycled content and real bug hunting.</p><p>One teaches you what other people already found.</p><p>The other teaches you how to see what they missed.</p><p>#bugbounty #bugbountytips #cybersecurity #hackerone</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ded73f6dd06e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Header No One Was Watching: Leaking sensitive data (quitely)]]></title>
            <link>https://sin99xx.medium.com/the-header-no-one-was-watching-a-quiet-idor-in-a-financial-system-0fcba65e2ace?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fcba65e2ace</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Wed, 19 Nov 2025 19:07:29 GMT</pubDate>
            <atom:updated>2025-11-19T19:16:24.737Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*9gurtD4VJZIToS1qFZlo4w.png" /></figure><p>I didn’t find this bug because something was broken.<br>I found it because something felt <strong>too clean</strong>.</p><p>Most systems expose their weak points loudly - bad redirects, weird errors, malformed JSON.<br> This one didn’t.<br> Everything about the platform looked polished and predictable.<br> Exactly the kind of environment where subtle mistakes hide comfortably.</p><p>And then I noticed a header.</p><h3>The Pattern</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*motVssH0Cq0ysZ4iA5vciQ.jpeg" /></figure><p>There’s a rhythm you get used to when watching network traffic.<br> Requests come in, JWT attaches itself, cookies line up, and everything falls into a pattern.</p><p>So when a request caught my eye, it was <em>too simple</em>.</p><pre>X-Account-Id: &lt;user_id_here&gt;</pre><p>A quiet variable deciding which account’s data I could see.</p><p>Headers like this are supposed to be decorative.<br>Hints, this one felt important.<br>Too important.</p><h3>The Test</h3><p>I replayed the request exactly as-is.<br> My transaction history came back.<br> All normal.</p><p>Then I swapped the X-Account-Id to the ID from my second account.<br> Same session.<br> Same authentication.<br> Only one value changed.</p><p>I hit send.</p><p>It returned the second account’s full financial data as if I had every right to see it.</p><p>No authorization checks.<br>No ownership validation.<br>No resistance at all.</p><p>Just trust.</p><p>And that’s when it clicked:<br>The backend wasn’t using the JWT to determine <em>who</em> I was.<br>It was using a client-controlled header.</p><p>That’s a blind spot.</p><h3>The Scope</h3><p>The first endpoint was /user/past_transactions.<br> Then I checked a few more.</p><p>Rewards.<br> Billing preferences.<br> Account-linked data.</p><p>The same flaw repeated:<br> <strong>server-side decisions being driven by client-side identifiers.</strong></p><p>You don’t need to be a security engineer to understand why that’s bad.<br> If you let the client decide “I am Account X,” then the only barrier between accounts is guessing an ID.</p><p>And in financial systems, every IDOR is a loaded gun.</p><h3>The Ethics</h3><p>I only tested with my own accounts.<br> My data.<br> My identifiers.<br> No stepping outside the lines.</p><p>I didn’t enumerate.<br> Didn’t poke random IDs.<br> Didn’t scrape anything.</p><p>The issue was obvious without going near anyone else’s privacy.</p><h3>The Triage</h3><p>Reporting the issue started a conversation, they wanted to understand the surface area.</p><p>Then came the part every researcher knows:<br> the scoring discussion.</p><p>Was it high?<br> Medium?<br> Low?</p><p>In finance, leaking transaction data isn’t a debate.<br> It’s sensitive by definition — regulators, privacy law, and basic threat modeling all agree on that.</p><p>Once the full scope was clear and additional endpoints were confirmed vulnerable, the severity was adjusted appropriately.</p><p>They handled it professionally.<br> Quick responses.<br> Thoughtful clarification.<br> Solid follow-through.<br> Bounty awarded in 24 hours.</p><p>Good teams don’t deflect; they dig.<br> They dug.</p><h3>The Real Lesson</h3><p>Someone added a header to make routing easier.<br> Someone else didn’t tie it into auth.<br> Months later, it became a vulnerability.</p><p>Security isn’t only about catching the big mistakes.<br> It’s about noticing when something ordinary is doing something it shouldn’t.</p><h3>Closing Thoughts</h3><p>This bug sat in the open, quietly trusted by a system that assumed the client would never lie.</p><p>All I did was ask the question the backend didn’t:</p><p><strong>“What if this ID isn’t mine?”</strong></p><p>That’s all it took.</p><p>A single header, deciding the identity of every request.<br>A quiet flaw with loud implications.</p><p>This is the kind of bug that reminds you:<br>complexity doesn’t always break systems.<br>Sometimes, simplicity does.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fcba65e2ace" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Gemini iOS Vulnerability: Public Link Sharing Silently Leaks Entire Conversations]]></title>
            <link>https://sin99xx.medium.com/google-gemini-ios-vulnerability-public-link-sharing-silently-leaks-entire-conversations-e1f80cbea25c?source=rss-f0364c86c55f------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f80cbea25c</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[sin99xx]]></dc:creator>
            <pubDate>Mon, 14 Apr 2025 13:39:16 GMT</pubDate>
            <atom:updated>2026-03-18T18:36:17.872Z</atom:updated>
            <content:encoded><![CDATA[<h3>CVE-2025–5009 — Gemini iOS broke share scope and exposed full chats</h3><h3>A message-level action resolved to a conversation-level public link</h3><p><strong>Author:</strong> sin99xx</p><p>Some bugs get buried under weak language.</p><p>People call them “confusing UI,” “unexpected behavior,” or “just how sharing works.” That framing is wrong here.</p><p>This was not interesting because the link was public. The link was supposed to be public. The bug was that the user acted on <strong>one message</strong>, while the system generated a public artifact for <strong>the entire conversation</strong>.</p><p>That is the issue.</p><p>Google’s published record for <strong>CVE-2025–5009</strong> says that in Gemini iOS, when a user shared a <strong>snippet</strong> of a conversation, the app shared the <strong>entire conversation</strong> through a public link instead. The weakness is classified as <strong>CWE-359: Exposure of Private Personal Information to an Unauthorized Actor</strong>. (<a href="https://app.opencve.io/cve/CVE-2025-5009?utm_source=chatgpt.com">OpenCVE</a>)</p><p>That is not a product quirk.<br>That is a broken scoping boundary.</p><h3>The bug in one sentence</h3><p>The user performed a <strong>message-scoped action</strong>.</p><p>The app created a <strong>conversation-scoped share</strong>.</p><p>That gap is the whole vulnerability. (<a href="https://app.opencve.io/cve/CVE-2025-5009?utm_source=chatgpt.com">OpenCVE</a>)</p><p>If you strip away the AI branding and the sharing UI, the engineering problem is simple: a narrow user action was wired to a broader backend object. The user thought they were authorizing disclosure of one exchange. The system published the parent thread.</p><p>That is why this matters.</p><p>Not because public links are scary.<br>Because the product silently widened the scope of what the user was sharing.</p><h3>Why this is a real security bug</h3><p>A lot of weak writeups stop at user surprise. That is not enough.</p><p>The right way to analyze this is through <strong>object scope</strong>.</p><p>In the interface, the visible unit is a prompt or response — one piece of a larger chat. In the backend, the durable sharing object is the conversation. The vulnerability happened because the product did not preserve the difference between those two things when it created a public link.</p><p>That is a security bug because the app exposed <strong>more data than the user intended to disclose</strong>.</p><p>Gemini conversations can contain private material: health questions, financial context, work notes, personal writing, code, drafts, and all the other things people paste into an LLM because the interface feels like a local interaction. Once the share operation jumps from snippet scope to thread scope, all of that becomes part of the disclosure surface. That is exactly why the CVE lands in CWE-359 rather than some harmless product bucket. (<a href="https://app.opencve.io/cve/CVE-2025-5009?utm_source=chatgpt.com">OpenCVE</a>)</p><h3>Why “the link was public anyway” misses the point</h3><p>This is where people usually get sloppy.</p><p>Of course the link was public. Public link generation was the feature.</p><p>Google’s current Gemini help docs say that public links are public, and they also say that if you create a public link from below a response in the mobile app, you share the <strong>entire conversation</strong>. That tells us something useful: the underlying share primitive is conversation-scoped. (<a href="https://support.google.com/gemini/answer/13743730?co=GENIE.Platform%3DDesktop&amp;hl=en&amp;utm_source=chatgpt.com">Google Help</a>)</p><p>That does not make the original issue less serious. It makes the bug clearer.</p><p>The backend primitive was broader than the UI action suggested.</p><p>So the real problem was not “public links exist.” The real problem was:</p><blockquote><em>a message-level share affordance invoked a conversation-level share primitive without preserving the user’s intended scope.</em></blockquote><p>That is the engineering failure.</p><h3>Why this was not luck</h3><p>Nothing about this depended on luck.</p><p>There was no race condition.<br>No special payload.<br>No weird user interaction.<br>No fancy browser trick.</p><p>The product itself did the over-sharing after an ordinary action.</p><p>That is exactly why this is worth writing up properly. It is a clean example of a bug class that shows up everywhere modern apps pretend to act on a small object while actually operating on a larger one.</p><p>You see the same pattern in other systems too:</p><ul><li>“share this file” actually shares the folder</li><li>“invite to this doc” actually grants workspace access</li><li>“export this item” actually exports the whole dataset</li><li>“revoke this token” only revokes one view of a broader credential</li></ul><p>The pattern is always the same:</p><p><strong>narrow action, broad artifact</strong></p><p>That is what happened here.</p><h3>The real lesson for AI products</h3><p>AI products are especially exposed to this class of bug because their interfaces create false granularity.</p><p>Users think in:</p><ul><li>one prompt</li><li>one response</li><li>one code block</li><li>one generated artifact</li></ul><p>Backends often think in:</p><ul><li>one conversation</li><li>one session</li><li>one history object</li></ul><p>That mismatch is dangerous.</p><p>The moment a product offers fine-grained actions over a coarse-grained storage model, someone has to do the hard work of keeping scope intact. If they do not, the UI starts promising one boundary while the backend enforces another.</p><p>That is exactly what CVE-2025–5009 shows.</p><p>The interesting part is not that Gemini had a sharing feature. The interesting part is that the feature let the user believe they were sharing a child object while the system actually exposed the parent object. (<a href="https://app.opencve.io/cve/CVE-2025-5009?utm_source=chatgpt.com">OpenCVE</a>)</p><h3>Root cause, stated plainly</h3><p>The cleanest way to describe this bug is:</p><blockquote><em>The iOS share flow did not preserve object scope when converting a per-message sharing action into a public link.</em></blockquote><p>Or shorter:</p><p><strong>subresource intent, parent-resource exposure</strong></p><p>That is the bug.</p><p>You do not need inflated language about AI complexity. The AI part is irrelevant. This would make sense in any threaded product where the visible unit is smaller than the sharing unit.</p><h3>Final takeaway</h3><p>CVE-2025–5009 matters for one simple reason:</p><p>The user thought they were sharing <strong>one thing</strong>.<br>The product shared <strong>more than that thing</strong>. (<a href="https://app.opencve.io/cve/CVE-2025-5009?utm_source=chatgpt.com">OpenCVE</a>)</p><p>That is not “confusing UX.”<br>That is not “expected behavior users misunderstood.”<br>That is not luck.</p><p>That is a scope failure that turned a narrow user action into broad public disclosure.</p><p>And that is exactly the kind of bug security engineers should take seriously.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f80cbea25c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>