Pancakeswap Content Injection Bug Fix Review
A Crowdin API key with full write access was exposed in network traffic, allowing an attacker to create and approve translations that would inject arbitrary text into PancakeSwap's website. This could have been used to redirect users to phishing sites or alter token swap instructions.
immunefi.com
Published on immunefi.com
Whitehat Kadabra from $SLAM Token team discovered a web content injection vulnerability that would have allowed a malicious user to inject any arbitrary text on PancakeSwap’s website. Kadabra reported this vulnerability to Immunefi on May 21, and we rated it as critical.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
A malicious user could have injected arbitrary content into PancakeSwap's website, such as directing users to a phishing site or asking them to swap a particular token.
What the attacker needed
Access to PancakeSwap website; Ability to inspect network traffic
The fix
PancakeSwap revoked the API token, blocking the content injection attack.
How it was found
- Navigate to PancakeSwap's website
- Inspect the network traffic upon changing the language
- Extract the API key from the headers of the GET request
- Create a new translation using the Crowdin API
- Approve that translation
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
PancakeSwap uses a translation service called Crowdin to manage text in different languages. The key used to access Crowdin was too powerful: it could not only read translations but also change them. An attacker who found that key could change the text on PancakeSwap's website, for example to trick users into visiting a fake site.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.