Stealing SSO Login Tokens (snappublisher.snapchat.com)
The SSO login token for snappublisher.snapchat.com could be stolen by chaining a CSRF login flaw, an open referrer parameter that allowed hash fragments, a non-expiring token, and an SVG upload that executed JavaScript. An attacker could use the stolen token to log into the victim's SnapPublisher account and make API requests.
- Triaged in 14 hours
- Fixed in 2 months
- Paid in 27 days
- Disclosed after 3.9 years
Summary by the program
@coolboss was able to chain multiple security issues, which allowed him to extract SSO tokens from Snapchat users by sending them to a malicious website.
The report
Description
Attacker can steal SSO login tokens for snappublisher.snapchat.com by chaining different flaws in SSO and Snapchat’s Snappublisher tool. Detailed attack flow is as follows.
Attack Flow
1.. Snapchat fetches a SSO LOGIN TOKEN from accounts.snapchat.com to login into different products of Snapchat i.e. SnapPublisher, Ads Manager, Business Manager, etc. provided that user is logged into accounts.snapchat.com.
eg. To login into SnapPublisher following requests are made …
1] https://accounts.snapchat.com/accounts/login?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/sso_continue
2] 302 redirect to
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https%3A%2F%2Fsnappublisher.snapchat.com%2Fsso_continue
3] again 302 redirect to
https://snappublisher.snapchat.com/sso_continue?ticket=redacted
So, a SSO login token ticket is sent from accounts.snapchat.com to snappublisher.snapchat.com which is used to login the user. And is also used in Authorization header when making requests to API.
Now, we are going to steal this SSO login token ticket which will allow us to login and control victim’s account.
2.. On snappublisher.snapchat.com, I was able to upload a svg image to google cloud storage, using which I run my javascript code.
Note: Use import from site functionality via https://snappublisher.snapchat.com/snaps/create/new and import my xss-svg image from here (███████/tokenstealer.svg). This alerts and logs #hashfragment in the console.
I have already did this in my POC so this is just for understanding purpose. My image URL is https://snappublisher.snapchat.com/api/v1/media/████████/file/somthine.svg?%23pranav
3.. Now, other flaws in SSO …
1] In this URL
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/████████/file/somthine.svg?%23pranav
referrer parameter can be controlled and any snappublisher.snapchat.com URL is allowed.
Also, %23pranav, this #hashfragment is allowed in referrer parameter.
I take advantage of both these flaws to flow the SSO login token to my website or land to a page which I control.
Note: #hashfragment is send further by browser for 302 / 307 redirects.
4.. CSRF Login flaw SSO functionality is vulnerable to CSRF attack so I can login other people into my account. I use this functionality to login user into my account.
5.. Token doesn’t expire flaw Once the SSO login token is used, it doesn’t expire and can be reused multiple times.
So, simple attack flow is as follows :
- User is logged into
accounts.snapchat.com. - Attacker logs user into his/her
snappublisher.snapchat.comaccount via CSRF login flaw. - Now, attacker makes a request to fetch SSO login token
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/█████████/file/somthine.svg?%23pranavand redirects the token in#hashfragmenttohttps://snappublisher.snapchat.com/api/v1/media/█████/file/somthine.svg?%23pranav https://snappublisher.snapchat.com/api/v1/media/████/file/somthine.svg?%23pranavthis redirects with307status code tostorage.googleapis.com/creativesuite-prod-media/*withSSO login token ticketin#hashfragmentcarried forward by browser.- Svg image executes my js code and alerts and logs the
SSO login token ticketin the console. - I can use the
ticketto login into victim’s account. Viahttps://snappublisher.snapchat.com/sso_continue?ticket=<stolen token>
Proof Of Concept
Video POC : █████████(Unlisted video on youtube)
- Login into your account on
accounts.snapchat.com. - Login into your SnapPublisher account
snappublisher.snapchat.com. - Visit (█████) which fetches
user’s SSO login tokenwhich can be used to login. (This alerts and logs thetokenin console.) - Use the token via
https://snappublisher.snapchat.com/sso_continue?ticket=<stolen token>
Impact
- Gain unauthorized access to Snappublisher account.
- Can use the SSO login token to make API requests.
Recommendations
- For SSO functionality …
1] Add state param to prevent CSRF login on https://snappublisher.snapchat.com/sso_continue?ticket=<token>
2] In referrer param of the following URL
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/██████████/file/somthine.svg?%23pranav disallow #hashfragments to be included.
3] Make the referrer param of the following URL
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/███████/file/somthine.svg?%23pranav more specific and restricted similar to your OAuth2 adsapi.
4] SSO login token should be one time use and should not be able to use it again and again.
- For SnapPublisher
1] I observed you are using Google Cloud Storage, so blocking svg images or disallowing any uploads of svg-xss images will further enhance security. Otherwise, one can easily get xss on storage.google
Let me know if you need any help. :-)
Regards, Pranav Hivarekar
Context
Snapchat runs a single sign-on service at accounts.snapchat.com that issues login tokens to its various products: SnapPublisher, Ads Manager, Business Manager and others. When a user is already logged into accounts.snapchat.com, the SSO service hands that user a token, called a ticket, which the downstream product uses to establish a session. The ticket is also used in the Authorization header when the product makes API requests.
SnapPublisher lives at snappublisher.snapchat.com. It includes an import-from-site feature at https://snappublisher.snapchat.com/snaps/create/new. Uploaded media is stored in Google Cloud Storage and served back through the SnapPublisher API.
The report chains several separate weaknesses: a controllable referrer parameter in the SSO endpoint, the acceptance of a #hashfragment inside that parameter, a CSRF flaw in the SSO login flow, a ticket that never expires, and an SVG upload that executes JavaScript. Together they let an attacker move a victim's SSO ticket into a page the attacker controls.
Setup
The attack assumes the victim is logged into accounts.snapchat.com. The researcher used the site's import-from-site functionality to import a malicious SVG. No specific tooling, versions or browser details are given in the report.
Finding it
The researcher started from the normal SSO flow and looked at how the ticket travels between the two hosts. Logging into SnapPublisher while authenticated on accounts.snapchat.com produces the following sequence of requests:
https://accounts.snapchat.com/accounts/login?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/sso_continue
This is answered with a 302 redirect to:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https%3A%2F%2Fsnappublisher.snapchat.com%2Fsso_continue
which in turn redirects with another 302 to:
https://snappublisher.snapchat.com/sso_continue?ticket=redacted
The ticket in that last URL is the SSO login token. Whoever holds it can log in as the user, and it is also the value sent in the Authorization header on API calls. That makes it a high-value secret, and the researcher set out to steal it.
Two properties of the SSO endpoint stood out. First, the referrer parameter is attacker-controllable, and any snappublisher.snapchat.com URL is accepted as its value. Second, a #hashfragment is allowed inside the referrer parameter. The researcher also noted that browsers carry the #hashfragment forward across 302 and 307 redirects, which means a fragment placed in the referrer value can survive the redirect chain and end up somewhere the attacker can read it.
Exploitation
Step 1: host JavaScript in an SVG on SnapPublisher
SnapPublisher allowed the researcher to upload an SVG image to Google Cloud Storage, and the SVG executed his JavaScript when loaded. He imported the file through the site's import functionality at https://snappublisher.snapchat.com/snaps/create/new, importing an image he calls xss-svg. The resulting media URL was:
https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
In his proof of concept the SVG alerts and logs the #hashfragment in the console. The report presents this step as background for the chain rather than as the main finding.
Step 2: point the SSO referrer at the SVG
The SSO endpoint accepts a snappublisher.snapchat.com URL in referrer, including one that carries a #hashfragment:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
Because the fragment is permitted in the parameter and browsers forward fragments across 302 and 307 redirects, the ticket can be made to land in the fragment of the attacker-chosen URL. The attacker does not need to control a host outside snappublisher.snapchat.com for this: the SVG already hosted there does the reading.
Step 3: log the victim into the attacker's account via CSRF
The SSO functionality is vulnerable to CSRF, so the attacker can log other people into the attacker's own SnapPublisher account. The researcher uses this to log the victim into his account.
Step 4: fetch the ticket and let the redirect carry it
The attacker makes a request to the SSO endpoint with the crafted referrer:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
The token is redirected in the #hashfragment to the SnapPublisher media URL. That URL then answers with a 307 redirect to storage.googleapis.com/creativesuite-prod-media/*, and the browser carries the SSO login token ticket in the #hashfragment along with it. The SVG loads from storage and its JavaScript runs, alerting and logging the ticket in the console.
Step 5: reuse the ticket
Once the SSO login token has been used, it does not expire and can be reused multiple times. The attacker logs into the victim's account with:
https://snappublisher.snapchat.com/sso_continue?ticket=<stolen token>
The proof of concept follows the same path: log into accounts.snapchat.com, log into SnapPublisher, visit the attacker page that fetches the user's SSO login token and logs it in the console, then use the token at the sso_continue URL above.
Root cause
Several independent design and implementation mistakes combine here:
- The
referrerparameter of the SSO endpoint accepts anysnappublisher.snapchat.comURL rather than a specific, restricted destination, so an attacker can choose where the ticket is delivered. - The
referrerparameter permits a#hashfragment. Since browsers preserve fragments across 302 and 307 redirects, the ticket can be placed in a fragment that the destination page's JavaScript can read. - The SSO login flow has no CSRF protection, so an attacker can force a victim into the attacker's account.
- The ticket is not single-use: it remains valid after it has been consumed.
- SnapPublisher accepts SVG uploads and serves them from Google Cloud Storage, so attacker JavaScript runs on the storage host.
Impact
The researcher lists two consequences: unauthorised access to the victim's SnapPublisher account, and the ability to use the stolen SSO login token to make API requests. The attack requires the victim to be logged into accounts.snapchat.com. The program's summary describes the result as extracting SSO tokens from Snapchat users by sending them to a malicious website. The report was rated high severity and paid a bounty of 7,500 USD.
Fix
The researcher recommended the following.
For SSO:
- Add a
stateparameter to prevent CSRF login onhttps://snappublisher.snapchat.com/sso_continue?ticket=<token>. - Disallow
#hashfragmentsin thereferrerparameter of the SSO URL. - Make the
referrerparameter more specific and restricted, similar to the OAuth2 adsapi implementation. - Make the SSO login token one-time use so it cannot be replayed.
For SnapPublisher:
- Block SVG images, or disallow uploads of SVG files that can carry XSS, since the service uses Google Cloud Storage and an SVG otherwise gives XSS on the storage host.
The report does not state which of these changes were actually made.
Variants to test
- Controllable
referreron other SSO endpoints. Try substituting a URL on an allowed host that you control content on. A positive result is a ticket delivered to a destination you can read. - Fragment preservation through redirects. Put a
#fragmentin a redirect parameter and follow the chain. If the fragment survives to a page whose JavaScript you control, the same token-leak primitive may exist. - CSRF on SSO login. Submit the SSO login request cross-site without a token. A positive result is the victim being logged into the attacker's account.
- Ticket replay. Use a ticket once, then use it again. A positive result is a second successful login with the same ticket.
- SVG upload to object storage. Upload an SVG with script through any import or upload feature. A positive result is script execution when the stored file is loaded.
Hunting notes
This class of bug tends to sit where an authentication token is passed through a redirect parameter that the application only partially validates: host allowlists that accept any path on an allowed host, and parameters that permit fragments. During recon, look for SSO and OAuth flows that carry a referrer, redirect_uri or similar parameter, and check whether fragments are accepted and whether the destination host serves user-controlled content. Upload and import features that accept SVG and store files on a third-party bucket are another signal, because they give script execution on a trusted origin. The researcher demonstrated impact by walking the chain: hosting the SVG, fetching the ticket, and logging in with the stolen ticket at sso_continue.
What happened, in plain words
Snapchat has one central login page, accounts.snapchat.com. Once you log in there, you can use many Snapchat products without typing your password again: SnapPublisher (a tool for creating and managing Snap content), Ads Manager, Business Manager and others. This is called single sign-on, or SSO. The central login page gives each product a pass, called a ticket, and the product uses that ticket to let you in. The ticket is also used in the Authorization header when the product makes API requests.
The researcher found that this ticket could be stolen. He chained several separate mistakes together. One mistake let him choose where the ticket was delivered. Another let him hide the ticket in a part of a web address that a page's JavaScript can read. Another let him force a victim into his own account. Another meant the ticket never expired. And one more let him upload an image file that runs JavaScript. Put together, these let him take a victim's ticket and log in as that victim.
This article walks through the attack in the same order as the researcher's report, explaining each concept from scratch.
Background: the pieces involved
What SSO is
Imagine a large office building with one reception desk. You show your ID once at reception, and reception gives you a visitor badge. Every office you visit inside the building trusts that badge instead of asking for your ID again. SSO works the same way: accounts.snapchat.com is the reception desk, and the ticket is the visitor badge. SnapPublisher, Ads Manager and Business Manager are the offices that trust the badge.
What a token is
A token is a short string of characters that stands in for your identity. It is not your password. It is more like a coat-check ticket: whoever holds the ticket can collect the coat. If someone steals your token, they can act as you without knowing your password. The report calls the SSO token a ticket.
What an API is
An API (application programming interface) is the way one piece of software asks another piece of software to do something. When you click a button in a web page, the page often sends a request to a server behind the scenes, and the server sends back data. The report says the ticket is used in an Authorization header when the product makes API requests. A header is a small piece of extra information attached to a web request, like the address label on a parcel. The Authorization header is the label that says "this request is from the logged-in user".
What SnapPublisher does
SnapPublisher is a Snapchat tool with an import-from-site feature at https://snappublisher.snapchat.com/snaps/create/new. Uploaded media is stored in Google Cloud Storage, a service for storing files, and served back through the SnapPublisher API.
What the vulnerability class is
This report is about an authentication bypass. Authentication is the process of proving who you are. A bypass means getting past that proof without having the right credentials. Here the researcher does not guess a password; he steals the pass that the system issues after a successful login.
The normal login flow
The researcher started by watching what happens during a normal login. When you are already logged into accounts.snapchat.com and you go to SnapPublisher, your browser makes this request:
https://accounts.snapchat.com/accounts/login?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/sso_continue
Line by line:
https://accounts.snapchat.com/accounts/loginis the address of the central login page.?starts the query string, which is a list of extra instructions sent with the address.client_id=creativesuite-prodtells the login page which product is asking.&separates one instruction from the next.referrer=https://snappublisher.snapchat.com/sso_continuetells the login page where to send you after login. The destination is a page on SnapPublisher calledsso_continue.
The login page answers with a 302 redirect. A redirect is a message from a server saying "I am not the page you want; go to this other address instead". The 302 status code means a temporary redirect. The browser follows it automatically. The redirect points to:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https%3A%2F%2Fsnappublisher.snapchat.com%2Fsso_continue
Line by line:
- The address is now
/accounts/sso, the endpoint that actually issues the ticket. client_id=creativesuite-prodis the same product identifier as before.referrer=https%3A%2F%2Fsnappublisher.snapchat.com%2Fsso_continueis the same destination, but now it is URL-encoded. URL encoding replaces characters that have special meaning in a web address with a percent sign and two hexadecimal digits.%3Ais a colon,%2Fis a slash. So the value decodes back tohttps://snappublisher.snapchat.com/sso_continue.
That endpoint answers with another 302 redirect, this time to:
https://snappublisher.snapchat.com/sso_continue?ticket=redacted
Line by line:
https://snappublisher.snapchat.com/sso_continueis the page on SnapPublisher that finishes the login.?ticket=redactedcarries the SSO login token. The report shows the value asredactedto avoid publishing a real one.
Whoever holds that ticket can log in as the user. It is also the value sent in the Authorization header on API calls. That makes it a high-value secret, and the researcher set out to steal it.
Finding the weaknesses
Two properties of the SSO endpoint stood out.
First, the referrer parameter is attacker-controllable, and any snappublisher.snapchat.com address is accepted as its value. A parameter is a named value in a web address, like referrer=.... Controllable means the attacker can put whatever he likes there, within the rules the server enforces. The rule here was only that the address had to be on snappublisher.snapchat.com. It did not have to be the specific sso_continue page.
Second, a #hashfragment is allowed inside the referrer parameter. A fragment is the part of a web address that starts with #. It is normally used to jump to a section of a page, like page.html#section2. The important thing about a fragment is that the browser keeps it on the client side: it is not sent to the server in the request. But JavaScript running on the page can read it.
The researcher also noted that browsers carry the #hashfragment forward across 302 and 307 redirects. A 307 redirect is like a 302 but tells the browser to keep the same request method. In both cases, if the address you are redirected to has a fragment, or if the redirect target is built from a value that contains a fragment, the browser keeps that fragment in the address bar and makes it available to the page's JavaScript. That means a fragment placed in the referrer value can survive the redirect chain and end up somewhere the attacker can read it.
Exploitation, step by step
Step 1: host JavaScript in an SVG on SnapPublisher
An SVG is a file format for images that is written in XML, a text-based markup language. Unlike a JPEG or PNG, an SVG can contain <script> tags, so it can run JavaScript when a browser displays it. JavaScript is the programming language that runs inside web pages and can read things like the page address, including its fragment.
SnapPublisher allowed the researcher to upload an SVG image to Google Cloud Storage, and the SVG executed his JavaScript when loaded. He imported the file through the site's import functionality at https://snappublisher.snapchat.com/snaps/create/new, importing an image he calls xss-svg. XSS stands for cross-site scripting: getting your own JavaScript to run in the context of someone else's website. The resulting media address was:
https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
Line by line:
https://snappublisher.snapchat.com/api/v1/media/is the API path that serves uploaded media.[redacted]stands for an identifier that the report hides./file/somthine.svgis the file name. The spellingsomthineis as it appears in the report.?%23pranavis a query string containing the URL-encoded form of#pranav.%23is the encoding for#. So the address carries a fragment-like value,pranav, in encoded form.
In his proof of concept the SVG alerts and logs the #hashfragment in the console. An alert is a pop-up box the browser shows; the console is a developer panel where JavaScript can print messages. The report presents this step as background for the chain rather than as the main finding: the point is that the researcher already has a page on snappublisher.snapchat.com that runs his code and can read the fragment.
Step 2: point the SSO referrer at the SVG
The SSO endpoint accepts a snappublisher.snapchat.com address in referrer, including one that carries a #hashfragment:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
Line by line:
https://accounts.snapchat.com/accounts/ssois the endpoint that issues the ticket.client_id=creativesuite-prodidentifies SnapPublisher as the product asking.referrer=https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranavis the destination. It is on the allowed host, so the server accepts it. It also contains%23pranav, the encoded fragment.
Because the fragment is permitted in the parameter and browsers forward fragments across 302 and 307 redirects, the ticket that the SSO endpoint appends to the redirect target can be made to land in the fragment of the attacker-chosen address. The attacker does not need to control a host outside snappublisher.snapchat.com for this: the SVG already hosted there does the reading.
Step 3: log the victim into the attacker's account via CSRF
CSRF stands for cross-site request forgery. It is a trick where a malicious page makes a victim's browser send a request to another site, and the other site treats it as if the victim had chosen to send it. The SSO functionality is vulnerable to CSRF, so the attacker can log other people into the attacker's own SnapPublisher account. The researcher uses this to put the victim into his account before the ticket is fetched.
Step 4: fetch the ticket and let the redirect carry it
The attacker makes a request to the SSO endpoint with the crafted referrer:
https://accounts.snapchat.com/accounts/sso?client_id=creativesuite-prod&referrer=https://snappublisher.snapchat.com/api/v1/media/[redacted]/file/somthine.svg?%23pranav
Line by line, this is the same address as in Step 2. The difference is the context: the victim's browser is now logged in (to the attacker's account, thanks to the CSRF step), so the endpoint will issue a ticket.
The token is redirected in the #hashfragment to the SnapPublisher media address. That address then answers with a 307 redirect to storage.googleapis.com/creativesuite-prod-media/*, and the browser carries the SSO login token ticket in the #hashfragment along with it. The SVG loads from storage and its JavaScript runs, alerting and logging the ticket in the console.
Why does the fragment survive? Because the browser, not the server, owns the fragment. When a server sends a redirect, the browser combines the new address with the fragment it already has, unless the new address specifies a different one. So the ticket, placed in the fragment by the SSO endpoint, travels through the SnapPublisher media address and on to Google Cloud Storage, where the SVG's JavaScript can read it.
Step 5: reuse the ticket
Once the SSO login token has been used, it does not expire and can be reused multiple times. The attacker logs into the victim's account with:
https://snappublisher.snapchat.com/sso_continue?ticket=<stolen token>
Line by line:
https://snappublisher.snapchat.com/sso_continueis the page that finishes the login.?ticket=<stolen token>carries the stolen ticket. The angle brackets are a placeholder: the attacker substitutes the real value.
The proof of concept follows the same path: log into accounts.snapchat.com, log into SnapPublisher, visit the attacker page that fetches the user's SSO login token and logs it in the console, then use the token at the sso_continue address above.
Why it works: the root causes
Several independent design and implementation mistakes combine here:
- The
referrerparameter of the SSO endpoint accepts anysnappublisher.snapchat.comaddress rather than a specific, restricted destination, so an attacker can choose where the ticket is delivered. - The
referrerparameter permits a#hashfragment. Since browsers preserve fragments across 302 and 307 redirects, the ticket can be placed in a fragment that the destination page's JavaScript can read. - The SSO login flow has no CSRF protection, so an attacker can force a victim into the attacker's account.
- The ticket is not single-use: it remains valid after it has been consumed.
- SnapPublisher accepts SVG uploads and serves them from Google Cloud Storage, so attacker JavaScript runs on the storage host. An origin is the combination of scheme, host and port that browsers use to decide which pages may talk to each other.
Impact
The researcher lists two consequences: unauthorised access to the victim's SnapPublisher account, and the ability to use the stolen SSO login token to make API requests. The attack requires the victim to be logged into accounts.snapchat.com. The program's summary describes the result as extracting SSO tokens from Snapchat users by sending them to a malicious website. The report was rated high severity and paid a bounty of 7,500 USD.
Fix
The researcher recommended the following.
For SSO:
- Add a
stateparameter to prevent CSRF login onhttps://snappublisher.snapchat.com/sso_continue?ticket=<token>. Astateparameter is a random value that the server checks when the login comes back, so a request forged by another site will not match and will be rejected. - Disallow
#hashfragmentsin thereferrerparameter of the SSO address. - Make the
referrerparameter more specific and restricted, similar to the OAuth2 adsapi implementation. OAuth2 is a standard way for apps to get permission to act on your behalf; itsredirect_uriis normally checked against an exact list. - Make the SSO login token one-time use so it cannot be replayed.
For SnapPublisher:
- Block SVG images, or disallow uploads of SVG files that can carry XSS, since the service uses Google Cloud Storage and an SVG otherwise gives XSS on the storage host.
The report does not state which of these changes were actually made.
Variants to test
- Controllable
referreron other SSO endpoints. Try substituting an address on an allowed host that you control content on. A positive result is a ticket delivered to a destination you can read. - Fragment preservation through redirects. Put a
#fragmentin a redirect parameter and follow the chain. If the fragment survives to a page whose JavaScript you control, the same token-leak primitive may exist. - CSRF on SSO login. Submit the SSO login request cross-site without a token. A positive result is the victim being logged into the attacker's account.
- Ticket replay. Use a ticket once, then use it again. A positive result is a second successful login with the same ticket.
- SVG upload to object storage. Upload an SVG with script through any import or upload feature. A positive result is script execution when the stored file is loaded.
Hunting notes
This class of bug tends to sit where an authentication token is passed through a redirect parameter that the application only partially validates: host allowlists that accept any path on an allowed host, and parameters that permit fragments. During recon, look for SSO and OAuth flows that carry a referrer, redirect_uri or similar parameter, and check whether fragments are accepted and whether the destination host serves user-controlled content. Upload and import features that accept SVG and store files on a third-party bucket are another signal, because they give script execution on a trusted origin. The researcher demonstrated impact by walking the chain: hosting the SVG, fetching the ticket, and logging in with the stolen ticket at sso_continue.
Glossary
- API: the way one piece of software asks another to do something, usually over the web.
- Authentication: the process of proving who you are.
- Authentication bypass: getting past the proof of identity without the right credentials.
- Authorization header: a small label attached to a web request that says which user the request is from.
- Bounty: a payment made by a company to a researcher who reports a security bug.
- Browser: the program you use to view web pages.
- Console: a developer panel in the browser where JavaScript can print messages.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later visits.
- CSRF (cross-site request forgery): a trick where a malicious page makes your browser send a request to another site that treats it as your own action.
- CVSS: a scoring system for the severity of a security bug.
- Endpoint: a specific address on a server that accepts requests.
- Fragment (
#hashfragment): the part of a web address after#, kept by the browser and readable by JavaScript on the page. - Google Cloud Storage: a service for storing files online.
- Header: extra information attached to a web request or response.
- High severity: a rating meaning the bug can cause serious harm.
- JavaScript: the programming language that runs inside web pages.
- OAuth2: a standard way for apps to get permission to act on your behalf.
- Origin: the combination of scheme, host and port that browsers use to decide which pages may talk to each other.
- Parameter: a named value in a web address, like
referrer=.... - Redirect: a server message telling the browser to go to another address instead.
- Referrer: here, a parameter that tells the login page where to send you after login.
- Replay: using the same token or request again after it has already been used.
- SSO (single sign-on): logging in once at a central page and using many products without logging in again.
- State parameter: a random value checked on return from a login to block forged requests.
- SVG: an image file format written in XML that can contain script.
- Ticket: the SSO login token in this report.
- Token: a short string that stands in for your identity.
- URL encoding: replacing characters that have special meaning in a web address with a percent sign and two hexadecimal digits.
- XSS (cross-site scripting): getting your own JavaScript to run in the context of someone else's website.
- 302 redirect: a temporary redirect.
- 307 redirect: a temporary redirect that tells the browser to keep the same request method.