CORS Misconfiguration, could lead to disclosure of sensitive information
The application reflected any Origin in its CORS response and allowed credentials, so a malicious site could read authenticated users' sensitive data. An attacker could trick a logged-in victim into visiting their site and then retrieve the victim's information.
- Triaged in 34 hours
- Fixed in 20 days
- Disclosed after 23 days
Summary: Cross Origin Resource Sharing Misconfiguration | Lead to sensitive information.
Description: An HTML5 cross-origin resource sharing (CORS) policy controls whether and how content running on other domains can perform two-way interaction with the domain that publishes the policy. The policy is fine-grained and can apply access controls per-request based on the URL and other features of the request. Trusting arbitrary origins effectively disables the same-origin policy, allowing two-way interaction by third-party web sites. Unless the response consists only of unprotected public content, this policy is likely to present a security risk. If the site specifies the header Access-Control-Allow-Credentials: true, third-party sites may be able to carry out privileged actions and retrieve sensitive information. Even if it does not, attackers may be able to bypass any IP-based access controls by proxying through users' browsers.
Steps To Reproduce: Proof Of Concept 1:
Request: GET /dashboard HTTP/1.1 Host: app.upchieve.org Accept-Encoding: gzip, deflate Accept: / Accept-Language: en-US,en-GB;q=0.9,en;q=0.8 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Connection: close Cache-Control: max-age=0 Origin: https://yiopwxxzxvtf.com
Response: HTTP/1.1 200 OK Date: Mon, 17 May 2021 07:37:24 GMT Content-Type: text/html; charset=utf-8 Connection: close x-powered-by: Express access-control-allow-origin: https://yiopwxxzxvtf.com vary: Origin access-control-allow-credentials: true set-cookie: connect.sid=s%3A-B7Wt1PQXUC7BtBz0ulAFKO3Eq5IsYdO.a0e20ezO2zcBQS4j4mlAsPKWaXH71hSNoAL3%2FHZ3P14; Path=/; Expires=Fri, 16 Jul 2021 07:37:24 GMT cache-control: no-cache,max-age=0 x-envoy-upstream-service-time: 4 CF-Cache-Status: DYNAMIC cf-request-id: 0a1adb2d6c0000023fdbb9d000000001 Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" Report-To: {"endpoints":[{"url":"https://a.nel.cloudflare.com/report?s=Z9CuAhWGEHzcFGQsIdF0YRfLAK1Ian64mv%2Ffzse3iqdbc8uFvvLhy1O3wlv8IKmC%2B8IYGRNG9GSarf%2Buh8xhPpIyAUSAq6T8aJdmau8Db6SX"}],"group":"cf-nel","max_age":604800} NEL: {"report_to":"cf-nel","max_age":604800} Server: cloudflare CF-RAY: 650b2e28ae81023f-SJC Content-Length: 31520
Laporan Referensi: - https://hackerone.com/reports/426165
Impact
Attacker would treat many victims to visit attacker's website, if victim is logged in, then his personal information is recorded in attacker's server. If the site specifies the header Access-Control-Allow-Credentials: true, third-party sites may be able to carry out privileged actions and retrieve sensitive information. Even if it does not, attackers may be able to bypass any IP-based access controls by proxying through users' browsers.
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 while also setting Access-Control-Allow-Credentials to true, instead of checking against an allowlist.
Impact
A malicious site could read sensitive information from a logged-in victim's account and may be able to perform privileged actions.
What the attacker needed
Victim is logged in; victim visits attacker's site
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 lets a website say which other sites may read its responses. Here the site said yes to every site and also allowed cookies, so any website could read private data from a logged-in user's account. The attacker only needs the victim to open a link while logged in.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.