Corezoid (CVE-2024–55017) — Account Takeover via OAuth2 r
The OAuth2 authorization endpoint accepted arbitrary redirect_uri values without strict allowlist validation, so an attacker could craft a link that redirects an authenticated victim to an attacker-controlled server with the authorization code appended. The attacker could then exchange that code for a session cookie and impersonate the victim, accessing their account and data.
Published on medium.com
Earlier this year I discovered an OAuth2 misconfiguration in a Corezoid deployment that lets an attacker abuse an unvalidated redirecturi parameter to capture authorization codes and take over user accounts. A crafted authorization URL redirects an authenticated victim to an attacker-controlled endpoint with the…
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
Root cause
The authorization server did not validate the redirect_uri against a strict allowlist, allowing redirection to attacker-controlled domains.
Impact
An attacker could take over a victim's account, access their data, and perform any authenticated operations as that user, including accessing the admin panel.
What the attacker needed
Victim is authenticated; victim clicks a crafted link; attacker controls a server to receive the code
The fix
The issue was fixed in Corezoid version 6.8.2 by enforcing strict allowlisting of redirect URIs, using exact match and canonicalisation, and adding PKCE and client authentication.
How it was found
- The attacker crafts an OAuth2 authorization URL with a redirect_uri pointing to an attacker-controlled host and sends it to an authenticated victim.
- The victim clicks the link; if they have an active session, the server issues an authorization code.
- The server redirects the victim to the attacker's redirect_uri with the code appended as a query parameter.
- The attacker's server receives and logs the authorization code.
- The attacker exchanges the code at the token endpoint and receives a session cookie.
- The attacker uses the session cookie to access the victim's resources and admin panel.
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.
OAuth2 is a way for websites to let you log in using another service, like 'Log in with Google'. When you log in, the service sends a short-lived code back to the website you came from. This report found that the service did not check carefully where it sent that code, so an attacker could make it send the code to their own website. With that code, the attacker could log in as the victim.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.