December 3, 2026
The QR code that lied to everyone
**A note before we start:** this is my first article. I’m **Maturi Jaswanth Sai Madhu Mohan**, and I’ve spent a little over a year hunting…
By Maturi Jaswanth Sai Madhu Mohan
9 min read
A note before we start: this is my first article. I'm Maturi Jaswanth Sai Madhu Mohan, and I've spent a little over a year hunting bugs — with bounties and hall-of-fame entries from places like NASA, Red Bull, Google, Microsoft, NVIDIA and others. I've never written one of these before, so I'm going to write it the way I'd explain it to a friend at 1 a.m.: like a movie, with the cyber bits explained as we go.
— -
Act I — A very ordinary Tuesday
Here's the setting. A document-lifecycle platform: you upload a PDF, it hands you back a QR code, you print the QR code on the page, and anyone who scans it sees your document. Invoices. Certificates. Contracts. That's the whole product, and it's a good one.
I'd signed up with a throwaway email, like I always do, and I was clicking around the way I do — not looking for anything in particular, just looking. That's the part nobody puts in a write-up. Most of my bugs don't arrive as a lightning bolt. They arrive as a slightly odd response that I didn't quite believe.
The thing that snagged me was this: every page of the app handed me a signed access token inside its HTML source. Not in a login flow. Not after I proved anything. Just sitting in the page, like a key taped under the doormat — except there were thousands of doormats, and every visitor got the same kind of key.
My first thought was, "that's normal, it's a public visitor token." My second thought, the useful one, was: "okay — what does this key actually let me open?"
That question is the entire story.
— -
Act II — Two doors, only one has a bouncer
Before I could test anything, I had to understand what the server was checking. So I did the least glamorous thing in security: I read how the door worked.
It turned out there were two doors.
Door one: "Is this endpoint on your allow-list?" — checked, every single time. The token carried a list of roughly nineteen endpoints it was permitted to call. Ask for anything else and you got a crisp 403. I tried. I tried several times. The bouncer was good at his job.
Door two: "Does this document actually belong to you?" — never asked. Not once. Not in any code path I could reach.
The caller supplied the document's identifier in the request body, and the server simply… used it. No comparison against the caller's identity. And here's the kicker: for an anonymous visitor, the caller's identity was an empty string. So even if someone had written that check, the check would have been comparing a document owner against nothing.
Security folks give this a grown-up name: broken object-level authorization, or BOLA, number one on the OWASP API top-10. The short version is what I put in the diagram: the server checked which room you walked into, and never checked whose stuff was on the table.
— -
Act III — The three-request heist
Now the fun part. Here's the whole attack, scene by scene.
Scene 1 — the victim publishes something. A document gets a QR code. The code contains a short public identifier. Let's call it the Code. It is, by design, not a secret — it's the thing you point a phone at. It gets printed on paper, photographed, forwarded in an email, stuck on a poster.
Scene 2 — the attacker scans it. No account. No invitation. Just the Code, which was always meant to be public.
Scene 3 — the attacker opens any page of the site and copies the token out of the HTML. One GET. No credentials attached, no cookies, no session. The token decoded to something like this:
{ "sub": "assistant", "aud": ["public"], "UserID": "",
"APIs": [ "…nineteen endpoints…" ] }{ "sub": "assistant", "aud": ["public"], "UserID": "",
"APIs": [ "…nineteen endpoints…" ] }Look at that UserID: empty. That's the anonymous identity, handed out to everyone.
Scene 4 — the attacker asks for a write pass to that exact document. One POST, containing the public Code. The server replied 200 with a cloud-signed upload URL for the live object — a temporary, cryptographically signed permit that says this bearer may overwrite that file.
POST /api/v1/<document>.upload-url
Authorization: Bearer <the anonymous token>
{"Code": "<victim Code>"} → 200
[https://storage](https://storage).<cloud>/documents/<folder>/<file>?X-Goog-Signature=…POST /api/v1/<document>.upload-url
Authorization: Bearer <the anonymous token>
{"Code": "<victim Code>"} → 200
[https://storage](https://storage).<cloud>/documents/<folder>/<file>?X-Goog-Signature=…Scene 5 — the swap. The attacker PUTs their own bytes to that URL. 200 OK, with an ETag back. Done.
And then the part that made me sit up straight: the public viewer for that document — the thing every person who scans the QR code sees — does a redirect to that same object.
GET /view/<Code> → 302 Location: …/documents/<folder>/<file>GET /view/<Code> → 302 Location: …/documents/<folder>/<file>I compared the path the server had just signed for me with the path the viewer redirects to. Byte for byte, they were identical.
That detail is the difference between a bug and a story. It meant I wasn't poisoning some cached copy in a corner — I was replacing the real document, the one everyone reads.
— -
Act IV — One scan before, one scan after
So I ran it end to end, on my own test document, and took a screenshot of both halves.
Before: a perfectly ordinary invoice, served as application/pdf.
After: my content — and, because the attacker also chooses the content type (that value gets signed into the URL, and the stored object had no nosniff header), I could serve a page that renders in the browser instead of downloading as a file.
Same QR code. Same sticker. Same piece of paper. Two completely different worlds.
If you're wondering why content type matters: a link that's supposed to open a document is trusted. A link that suddenly renders a login-shaped page asking you to "re-enter your card details" is a phishing kit that lives behind a code the victim already decided to trust. The QR code is the trust anchor — and I'd moved what was underneath it.
— -
Act V — The escalation montage
This is the part where I have to be honest about how the report got its severity. The first version of my finding was "I can replace a file." That's bad. It wasn't critical yet.
So I did what I always do: I asked "what else can this same request do?"
- Can I read? Yes — the anonymous token could list another user's documents, including their private notes. Same missing check, different endpoint.
- Can I write? Yes, and cross-account: I created two throwaway accounts of my own, gave one a document, and used the anonymous token to overwrite it. The second account's file was replaced while the second account watched.
- Can I make a private document public? Yes. A draft that had never been published went from
404to302and started serving its contents to anyone. - Can I make it disappear for the owner? Yes — after that, the document was in neither of the owner's lists (drafts or published) while still being publicly reachable. That's the availability half of the CIA triad, and it was the bit that surprised me most.
- Can I change the content type? Yes — already covered, and it's what turns "file replacement" into "attacker-controlled page."
Read, write, availability, content control — confidentiality, integrity, availability, all three, with zero credentials. That's how a solid High became a Critical.
The trick I'd hand you here: severity is not a feeling, it's a checklist. Write the list down — read / write / delete / publish / content-type / one object or all of them — and answer each question with evidence before you pick a number. I've talked myself up out of excitement and down out of fear more times than I'd like to admit. A list doesn't get excited.
— -
Act VI — The scenes that didn't shoot
A good write-up has to include the failures, because that's where the learning is. Here's my blooper reel:
- Stored XSS? No. Every field I injected came back HTML/JS-escaped — the framework escapes for the JavaScript string context properly, and one field was server-side allow-listed so my payload was stripped to an empty string. I nearly reported it. I'm glad I checked the rendered output instead of my own assumption.
- Could I get XSS on the main site instead? Also no — every viewer route redirects to cloud object storage rather than rendering inline, so attacker content executes on the storage origin, not the app's origin. Different bug, different story, not mine to claim.
- SQL injection? No — parameterised queries; every payload came back with an empty result set.
- Crack the token's signing secret? Tried. Hashcat against a curated JWT wordlist, then the full
rockyoulist, thenrockyouwith rules. Nothing. Had that worked, I could have forged an identity and this would have been a different article entirely. - Trick the file-naming to overwrite something that already exists? Ten encoding variants — double slashes,
./,../, percent-encoding, trailing dots, spaces, NULs. Every single one was either renamed by the server or landed on a different object. That check worked, and it's the reason one of my findings stayed a High instead of becoming a Critical.
I list all of that in the report too. Your negatives are credibility. When a triage team sees "here's what I tried and what happened," they stop wondering whether you over-claimed and start believing the parts you did claim.
— -
Act VII — The methodology, if you want to steal it
This is the bit I actually want you to take away, because none of it is specific to this target. It transfers to almost any web app.
- Read the page source before you read the documentation. Tokens, feature flags and whole endpoint lists hide in inline HTML and in JavaScript bundles. Mine was sitting in the page, already scoped, waiting to be copied. It costs ten seconds.
- Ask of every ID you can see: "what is this checked against?" If the caller supplies
?user=or{"Code":"…"}, the server must compare it to the caller's identity. If you can't find that comparison anywhere, keep pulling the thread. That one question was the entire vulnerability. - Test the anonymous state first — strip everything. No cookies, no auth header, no referer. Then send the request. What an outsider gets is often very different from what the UI implies. A clean
403with a JSON body means the gate exists — good, now look past it. - Follow every redirect; it's a map. A
302to object storage tells you exactly where writes land and where reads come from. Compare the two paths. If they match, your write is a true overwrite and not just a poisoned copy — that comparison is what upgraded my whole report. - Prove it small, then widen the circle. Your own data → a second account you own → a second tenant. Each step is still yours to touch, which keeps you inside the rules and inside the program's scope, and each step honestly raises the severity.
- When something is denied, ask what the same request can still do. "Cannot read" is not "cannot harm." Reading was blocked in one place I tested; writing, publishing and replacing all worked. That reframing is where the value was.
- Keep a negative log as you go. Every payload that failed, and why. It stops you re-running dead ends an hour later, and it's the section triage teams trust most.
- Escalate with a fixed checklist, then stop. Read, write, delete, publish, content type, single vs. all objects. Work the list. When the answers run out, that's your severity — no matter how much you want it to be higher.
— -
Finale — the part that made it worth it
A few days later I got the message. The report had been accepted, the hall of fame was being updated, and there was talk of swag in the mail.
I'm not going to pretend the bounty was the best part. The best part was the comparison of those two paths — the moment the signed URL and the viewer's redirect turned out to be the same string. That's the moment a pile of curious clicks becomes a vulnerability with a name and a number attached.
If you're early in your hunting journey, here's the honest version of how this happened: I didn't know more than anyone else. I just refused to stop at the first 403, I wrote down what didn't work, and I kept asking one boring question over and over — "and what does this actually let me do?"
Go ask it on your next target. That's the whole method.
— -
Thanks for reading my first article. If it helped, the field-notes image is the one to save — and if you're staring at an anonymous token in someone's page source right now, you already know what question to ask next.
** — Maturi Jaswanth Sai Madhu Mohan**