Skip to content

Reading list

Learn CORS from real reports

A permissive cross-origin policy lets another site read responses with the user's credentials.

12 reports, easiest first.

  1. GHSL-2023-261: Cross origin request in Owncast allows for potential account takeover - CVE-2024-29026

    GitHub Security Lab Beginner

    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.

    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.

    The lesson. The server reflected the request's Origin header in Access-Control-Allow-Origin and allowed credentials, instead of restricting to trusted origins.

  2. Code Gate CORS Exploit

    Beginner

    The CodeGate API server on localhost had a CORS configuration that allowed any origin to make requests with credentials, and it lacked CSRF tokens. An attacker could host a malicious website that, when visited by a developer, would silently read chat history or change settings to route AI conversations through an attacker-controlled proxy.

    CORS is a browser rule that normally stops one website from reading data from another. Here the local CodeGate tool told browsers to allow any website to talk to it, so a malicious page could quietly fetch the developer's chat history or change the tool's settings. The developer only had to visit the page; no clicks were needed.

    The lesson. The CORS middleware was configured to allow all origins, credentials, methods and headers, and no CSRF protection was present.

  3. $5,000 Bug Bounty: Stealing Private API Keys via Arbitrary Origin Reflection in CORS

    Beginner

    The API reflected any Origin header value in Access-Control-Allow-Origin while also allowing credentials, so any website could read authenticated responses. An attacker could host a page that fetches the victim's private API keys and exfiltrates them.

    Websites use a rule called the Same-Origin Policy to stop one site from reading data from another. CORS is a way for a site to say 'these other sites are allowed to read my data'. Here the site said 'any site is allowed', so a malicious page could read the victim's secret API keys.

    The lesson. The backend dynamically reflected the inbound Origin header into Access-Control-Allow-Origin without checking it against a static whitelist, and also set Access-Control-Allow-Credentials to true.

  4. # I Tracked Your Location Without Your Permission ## How a Misco

    Beginner

    A cloud function that returns precise GPS coordinates had a CORS policy allowing any origin to read the response. An attacker could host a malicious page that silently fetches the victim's location without any user interaction.

    Websites use a rule called CORS to decide which other websites can read their data. This API said 'any website can read me', so a malicious page could quietly ask for the visitor's location and send it to the attacker. The visitor would not see any popup or warning.

    The lesson. Likely the CORS configuration on the cloud function set Access-Control-Allow-Origin to a wildcard, allowing any origin to read the response.

  5. How a Simple CORS Misconfiguration Put a Finance Platform at Risk

    Beginner

    The API server returned a wildcard Access-Control-Allow-Origin together with Access-Control-Allow-Credentials: true, which violates the CORS specification. An attacker could host a page that makes authenticated cross-origin requests and reads sensitive financial data from a logged-in victim's account.

    CORS is a browser rule that lets a website say which other websites may read its responses. This server said 'any website' while also allowing logged-in cookies to be sent, so a malicious page could fetch a victim's private data. The browser should normally block this, but the server's settings told it not to.

    The lesson. The server combined a wildcard allowed origin with credential support, which the CORS specification forbids.

  6. Cross-origin resource sharing misconfig | steal user information

    Semrush Beginner

    The API reflected any supplied Origin header in Access-Control-Allow-Origin while also allowing credentials, so a malicious site could read a logged-in user's project data. An attacker could host a page that fetches the victim's information and sends it to their own server.

    Websites use a rule called CORS to decide whether another site's JavaScript can read their data. Here the site said 'yes' to every site that asked, even while sending the user's login cookies. That let an attacker's page quietly read the victim's account information.

    The lesson. The server reflected the request's Origin header into Access-Control-Allow-Origin and set Access-Control-Allow-Credentials to true, instead of checking the origin against a trusted list.

  7. CORS origin validation failure

    UPchieve Beginner

    The web application reflects any Origin header in Access-Control-Allow-Origin and sets Access-Control-Allow-Credentials to true, allowing any website to make credentialed cross-origin requests and read responses. An attacker could potentially steal session cookies and take over accounts, though the reporter did not demonstrate this due to sign-up difficulties.

    Cross-Origin Resource Sharing (CORS) is a browser feature that lets a website say which other websites are allowed to read its responses. Here, the site echoes back whatever origin the attacker sends and also allows credentials (like cookies), so a malicious site can read sensitive data from the victim's session. This could let an attacker steal session cookies and take over accounts.

    The lesson. Likely the server reflects the Origin header without validating it against an allowlist and sets Access-Control-Allow-Credentials to true.

  8. From CORS Misconfiguration to Sensitive Data Exposure

    Beginner

    The API returned a wildcard Access-Control-Allow-Origin together with Access-Control-Allow-Credentials: true, so any website could read authenticated responses. An attacker could make a logged-in victim visit a malicious page and read private messages, friends lists and fitness goals.

    Websites normally cannot read data from another site because of a browser rule called the Same-Origin Policy. CORS is a way for a server to relax that rule for chosen other sites. Here the server relaxed it for every site while also allowing logged-in cookies, so a malicious page could fetch the victim's private data.

    The lesson. The server sent a wildcard Access-Control-Allow-Origin together with Access-Control-Allow-Credentials: true on data endpoints, so it accepted credentialed cross-origin reads from any origin.

  9. CORS misconfig | Account Takeover

    X / xAI Beginner

    The application's CORS policy reflected any Origin header containing the string '//niche.co', allowing an attacker-controlled domain to make credentialed cross-origin requests. An attacker could read a victim's account data and perform actions such as viewing private posts or deleting accounts.

    CORS is a browser rule that lets a website say which other sites may read its responses. Here the site trusted any origin that merely contained its name, so a malicious page could read the victim's data using their logged-in session.

    The lesson. The origin check used a substring match instead of an exact whitelist, so any domain containing the trusted string was accepted.

  10. Your Browser Trusts Websites More Than It Should

    Beginner

    A server reflected any Origin header back in its CORS response along with credentials, allowing an attacker's website to read a victim's private account data using the victim's logged-in session. The author describes this as a trust mistake where the server fails to validate origins against an allow list.

    Websites use a rule called CORS to decide which other websites are allowed to read their data. If a site is misconfigured, it may trust any website that asks, so a malicious page you visit can quietly read your private information from another site where you are logged in.

    The lesson. Likely the server reflects the Origin header without validating it against a strict allow list, and also allows credentials.

  11. Exploiting misconfigured CORS on popular BTC site

    Beginner

    The third-party support form API reflected any Origin header in its CORS response and allowed credentials, so a malicious page could read a victim's previously submitted support form data. An attacker could steal names, emails, phone numbers and account IDs from any user who had used the support form.

    When a website lets another site read its data, it uses a rule called CORS. Here the support form's server trusted any website that asked, and also allowed the visitor's login cookies to be sent. That meant a page controlled by an attacker could quietly fetch the victim's earlier support messages and read the personal details inside them.

    The lesson. Likely the server echoed the request's Origin header into Access-Control-Allow-Origin and set Access-Control-Allow-Credentials to true, instead of checking against a fixed list of allowed origins.

  12. A simple CORS misconfiguration leaked private post of twitter facebook instagram

    Beginner

    The niche.co website had a CORS misconfiguration that reflected any origin containing '//niche.co', allowing an attacker to read private synced posts and account data from other users. An attacker could host a malicious page on a domain like niche.co.evil.net and steal sensitive information from logged-in users.

    CORS is a browser rule that lets a website say which other sites can read its data. Here the site used a weak check that accepted any domain containing '//niche.co', so a malicious site could trick the browser into handing over private data from a logged-in user.