Unlisted add-ons susceptible to MITM attack over HTTPS when updateKey not used
Unlisted add-ons that use an HTTPS update URL but omit the updateKey field can be updated with a malicious extension by an attacker who intercepts the traffic with a forged certificate. The attacker could then install their own signed extension in place of the legitimate one.
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 10 days
- Disclosed after 7 days
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Steps to reproduce:
Hello. I am the author of the AMO extension auto-update attack (https://hackernoon.com/tor-browser-exposed-anti-privacy-implantation-at-mass-scale-bd68e9eb1e95#.fxng326l9). The attack is also possible on extensions that do not use the updateKey field.
We'll analyze the Passifox install.rdf add-on for attack feasibility. https://github.com/pfn/passifox/blob/master/passifox/install.rdf
1. Develop a malicious extension (id verifications are not effective as implemented see #1303418)
2. Sign the extension
3. Generate forged certificate for passifox.appspot.com
4. MITM traffic to passifox.appspot.com and pass the malicious extension
Actual results:
Since <updateKey> is not a requirement for HTTPS <updateURL> only the transport is encrypted. Since HTTPS pinning is not used the transport layer is vulnerable to a forged certificate attack similar to #1303418.
Expected results:
<updateKey> should be required on both HTTP and HTTPS <updateURL> fields.
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 update mechanism treats HTTPS transport encryption as sufficient and does not require the updateKey signature check, so a forged certificate lets an attacker replace the update.
Impact
An attacker able to intercept traffic could install a malicious signed extension in place of the legitimate one, because HTTPS pinning is not used.
What the attacker needed
Attacker can intercept network traffic; forged certificate accepted by client; target add-on omits updateKey
The fix
The updateKey should be required for both HTTP and HTTPS update URLs.
How it was found
- Create a malicious extension, since the identifier checks are not effective as implemented
- Sign the extension
- Generate a forged certificate for the update host
- Intercept the traffic to that host and serve the malicious extension
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.
Add-ons can check for updates by fetching a file from a web address. If that address uses HTTPS but the add-on does not also include a special signing key, someone who can intercept the connection with a fake certificate can swap in their own add-on. The reporter says the signing key should be mandatory for both HTTP and HTTPS update addresses.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.