Skip to content
CORS Disclosed report Beginner

Cross-origin resource sharing: arbitrary origin trusted on chatws25.stream.highwebmedia.com

The application reflects any supplied Origin in its CORS response and also allows credentials, so a malicious site could read authenticated responses from the endpoint. The reporter also notes the missing Vary: Origin header may allow caching of the response.

Jadek Mark Follow

Originally disclosed on HackerOne

Informational View original
  • Disclosed after 47 hours

Very low-quality reports, such as those which only contain automated output, will be rejected.

##Summary## Hi, i was able to discover a number of instances on chatws25.stream.highwebmedia.com were the application accepts an arbitrarily supplied origin.

The application implements an HTML5 cross-origin resource sharing (CORS) policy for requests that allows access from any domain.
POC The application allowed access from the requested origin https://vazeeukllvua.com

Steps To Reproduce:

  1. Using an intercepting proxy , make the following request ;

GET /ws/info HTTP/1.1 Host: chatws25.stream.highwebmedia.com Accept-Encoding: gzip, deflate Accept: / Accept-Language: en User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0) Connection: close Origin: https://vazeeukllvua.com Cookie: __cfduid=dc7d8e518c8e0f8610c6c317c31c6f46e1538467160

  1. Observe the following request which proves that the application is vulnerable:

HTTP/1.1 200 OK Date: Tue, 02 Oct 2018 08:25:48 GMT Content-Type: application/json; charset=UTF-8 Connection: close Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: https://vazeeukllvua.com Cache-Control: no-store, no-cache, must-revalidate, max-age=0 Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct" Server: cloudflare CF-RAY: 4635c7cb98c72ca2-MBA Content-Length: 79

{"websocket":true,"cookie_needed":false,"origins":[":"],"entropy":600356669}

  1. [add step]

Supporting Material/References:

https://cwe.mitre.org/data/definitions/942.html https://portswigger.net/blog/exploiting-cors-misconfigurations-for-bitcoins-and-bounties

Impact

Since the Vary: Origin header was not present in the response, reverse proxies and intermediate servers may cache it. This may enable an attacker to carry out cache poisoning attacks.

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

The original report as published on HackerOne, by mase289. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Likely the server dynamically reflects the request's Origin header into Access-Control-Allow-Origin without validating it against an allowlist, and also sets Access-Control-Allow-Credentials to true.

Impact

A third-party site could carry out privileged actions and retrieve sensitive information from authenticated users; the missing Vary: Origin header may also allow cache poisoning by intermediate servers.

What the attacker needed

Victim visits a malicious page

The fix

The server should validate the Origin against an allowlist and include a Vary: Origin header.

How it was found

  1. Send a request to the endpoint with an intercepting proxy, including an Origin header from an unrelated domain.
  2. Observe the response reflects that origin in Access-Control-Allow-Origin and sets Access-Control-Allow-Credentials to true.

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 'any site' and also allowed cookies, so a malicious page could read private data from the victim's account. The missing Vary header is a separate caching concern.

What is CORS?

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

More by Jadek Mark

View all

1 more disclosed report, best first.

More from Chaturbate

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

CORS misconfiguration

The lesson behind this report.

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