Remote code execution and exfiltration of secret tokens by poisoning the mozilla/fxa CI build cache
A researcher could obtain an upload URL for the NX Cloud cache used by the Firefox Accounts repository, and because the link allowed repeated uploads to the same artifact, they could poison the cache with a modified artifact and exfiltrate environment variables as a proof of concept. The attack required access to the repository source code, which was public.
Originally disclosed on HackerOne
- Disclosed after 2 months
Summary by the program
A security researcher was able to obtain an upload URL for NX Cloud's caching service, used by the Firefox Accounts repository. Because an authorized link could be used to upload more than once to the same artifact, the researcher was then able to poison the cache by re-uploading a modified cache artifact, and exfiltrate fxa's environment variables as a proof of concept. This vulnerability required an attacker to have access to the repository source code to be exploited, and in this case, the fxa repo is public.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the cache upload URL was reusable and not bound to a single upload, so a previously issued link could overwrite an existing cache artifact.
What the attacker needed
Access to the public repository source code
How it was found
- Obtain an upload URL for the NX Cloud cache used by the fxa repository.
- Re-upload a modified cache artifact to the same entry using the authorized link.
- Exfiltrate the fxa environment variables as a proof of concept.
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 report has not been written yet. The Original tab links to the source.
A build cache stores previous build results for reuse. Here the cache accepted a second upload to the same entry, so someone could replace a trusted build result with their own and read secret environment variables.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.