GHSL-2023-261: Cross origin request in Owncast allows for potential account takeover - CVE-2024-29026
The CORS handler for admin functions reflected the Origin header and allowed credentials, so an attacker's website could make authenticated cross-origin requests. This could leak the admin password and lead to account takeover.
A lenient CORS policy allows attackers to make a cross origin request, reading privileged information. This can be used to leak the admin password.
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 server reflected the request's Origin header in Access-Control-Allow-Origin and allowed credentials, instead of restricting to trusted origins.
Impact
This could lead to account takeover by leaking the admin password.
What the attacker needed
Victim is a logged-in admin; victim visits attacker's website
The fix
The issue was fixed by patching to only allow localhost CORS access.
How it was found
- An attacker hosts a malicious HTML page on their website.
- A logged-in admin of Owncast visits the attacker's page.
- The page sends a cross-origin request to the Owncast admin serverconfig endpoint with credentials.
- The response containing the admin password is displayed 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.
CORS is a browser rule that controls which websites can read responses from another site. Here the server trusted any website that asked, so a malicious page could read sensitive admin data while the admin was logged in. That data included the admin password, letting the attacker take over the account.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.