GHSL-2024-027_GHSL-2024-028: API abuse in codeium-chrome - CVE-2024-28120
The codeium-chrome extension's service worker did not check the sender of external messages, allowing any website to query it and steal the user's API key and other settings. An attacker could then impersonate the user on the backend autocomplete server.
The service worker of the codeium-chrome extension doesn’t check the sender when receiving an external message. This allows an attacker to host a website that will steal the user’s Codeium api-key, and thus impersonate the user on the backend autocomplete server.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The extension's service worker did not validate the sender of external messages, and its manifest allowed messages from all URLs.
Impact
An attacker could steal the user's API key and use it to make queries to the backend autocomplete server as that user.
What the attacker needed
Victim has the codeium-chrome extension installed; victim visits a malicious website
The fix
The vulnerability was fixed by updating the extension to check the sender of external messages.
How it was found
- Host an HTML page containing JavaScript that sends a message to the codeium-chrome extension.
- The JavaScript calls chrome.runtime.sendMessage with the extension ID and a message of type 'user'.
- The extension responds with the user's API key and username, which are shown in an alert.
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 browser extension can receive messages from websites. This extension did not check who sent the message, so any website could ask for the user's secret API key. The website could then use that key to act as the user on the extension's backend service.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.