The code, one handler at a time
The bed is projects/vibe-sim/app/app.py, 168 lines, and the same file runs on the hunt server. Read it handler by handler and mark where each critical decision is made.
1 · leg 1, the contentType check · graphql(), lines 79 to 101
| Check | Code | Verdict | The insecure variant you will meet | Root cause lives in |
| contentType allowlist, line 86 | ext = EXT.get(ct) against a fixed dict of five exact strings | safe | a wildcard, ct.startswith("image/"), lets image/svg+xml through. A regex without an anchor, ^image/(png|jpg|gif), lets image/pngx and image/png; charset=x through. A substring, "image" in ct, lets anything through. A deny-list lets through every type it forgot, the Confluence case below | the application, not Amazon, the bucket never sees this check |
| binding the type to the upload, lines 90 to 92 | params = {"Bucket", "Key"}, ContentType only added when SIGN_CT | unsafe by default | this is vibe's shape, a correct allowlist that is never put under the signature, so leg 2 sends whatever it likes | the application, the signing parameters it chose, Amazon signs exactly what it is asked to |
| the key, line 89 | apps/<uuid4>.<ext>, server-chosen | safe | a client-supplied filename in the key, path traversal or overwrite of another tenant's object inside the same signed prefix | the application |
The same check in the wild, deny-list edition. Confluence Data Center, Atlassian on Bugcrowd, disclosed August 2025, P2. The comment uploader at
/plugins/drag-and-drop/upload.action takes the MIME type from the client, and the server decides
attachment versus
inline on
/download/attachments/ with a
deny-list in
ContentDispositionHeaderGuesser,
text/html,
application/xhtml+xml and friends.
video/mp2t was not on it, so an HTML file named
.png and declared
video/mp2t is served inline, and
WebKit on iOS renders video/mp2t as HTML. Script runs in the Confluence origin with the victim's session and mints a personal access token through the REST API.
X-Content-Type-Options: nosniff was present and did nothing, it only forces the declared type, and the declared type was the attacker's. Three things for our row: the check is the same decision as line 86, which type is allowed to be rendered, a deny-list fails on the type nobody thought of while an exact allowlist cannot, and
the browser decides what a type means, not the server, so even the allowlist must hold only types every engine renders inert, which is also why
image/svg+xml is not in vibe's.
What the check guards. Lines 86 to 88 validate the declared type and turn it into an extension, so image/svg+xml or text/html is refused at leg 1. Nothing after that carries the type forward: line 90 signs only the bucket and the key, and line 92, the one line that would put content-type under the signature, sits behind a knob that is off. The check decides the file name and nothing else. Leg 2 may send any Content-Type, which is exactly the shape of vibe's leg 1.
Two reading notes. The operation check on line 83 looks at operationName only, the query text is never parsed, which is a simulation shortcut and not vibe's behaviour. And the SIGN_PAYLOAD branch on lines 94 and 95 is a stub that does nothing yet, only SIGN_CONTENT_TYPE is a real knob.