Skip to content
CORS Disclosed report Intermediate

CORS Misconfiguration leading to Private Information Disclosure

The CORS policy on two Ubiquiti sites allowed requests from origins outside the company's own domains. An attacker could lure a logged-in user to a malicious page and read private information or trigger unwanted actions.

sandh0t Follow

Originally disclosed on HackerOne

  • Triaged in 44 hours
  • Fixed in 28 days
  • Paid in 28 days
  • Disclosed after 7 months

Summary by the program

Due to mistake on te CORS policy configuration, the sites https://client.amplifi.com and https://protect.ubnt.com/ CORS policy allowed HTTP requests to be made from certain sites outside the *.ubnt.com and *.ui.com domains.

This bug could be used to steal users information or force the user to execute unwanted actions. As long that a legit and logged in user is lure to access a attacker controlled HTML page.

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

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The summary concerns two Ubiquiti sites: https://client.amplifi.com and https://protect.ubnt.com/. The weakness is filed as improper access control, and the program's own summary describes it as a CORS policy configuration mistake.

According to the summary, the CORS policy on those two sites allowed HTTP requests to be made from certain sites outside the *.ubnt.com and *.ui.com domains. In other words, requests could be made from certain sites outside the *.ubnt.com and *.ui.com domains.

The summary describes the consequence in two parts. An attacker could steal user information, or force the user to execute unwanted actions. Both depend on a condition the summary states explicitly: a legitimate, logged-in user has to be lured to an attacker-controlled HTML page. The report does not name the specific origins that were wrongly trusted, does not include the request or response headers involved, and does not give a reproduction sequence beyond that description.

Root cause

The summary frames the root cause as a mistake in the CORS policy configuration. A CORS policy that reflects or trusts an origin outside *.ubnt.com and *.ui.com lets a page on that origin read authenticated responses from the two sites, provided the browser sends the user's credentials and the server permits them.

The summary frames this as a configuration mistake in the CORS policy.

Impact

With a logged-in victim visiting an attacker page, that page could make requests to the two sites and steal user information. That is what turns a CORS misconfiguration into private information disclosure: the browser normally blocks the reading of the response, and the misconfiguration removes that block.

The summary also notes that the bug could be used to force the user to execute unwanted actions. Both outcomes are conditional on the lure succeeding; a user who is not logged in, or who does not visit the attacker page, is not affected in the way described.

How this kind of bug works

Browsers enforce the same-origin policy: a script on one origin cannot read the response of a cross-origin request. CORS is the controlled exception. The server answers a cross-origin request with headers such as Access-Control-Allow-Origin, and if the browser sees its own origin echoed there, it hands the response body to the calling script.

When credentials are involved, the server must also send Access-Control-Allow-Credentials: true, and the allowed origin cannot be the wildcard *. A misconfiguration appears when the server derives the allowed origin from the request's Origin header without validating it against a strict list, or when its validation is loose enough to accept lookalike or unrelated origins. The result is that any site the check lets through can read authenticated data.

The defences are a fixed allowlist of exact origins, no reflection of arbitrary Origin values, and care with credentials: only send Access-Control-Allow-Credentials: true to origins that genuinely need it. Where cross-origin access is not needed at all, omitting the CORS headers is the safest choice.

How to test for it

  1. Identify endpoints that return private, session-bound data, such as account details or settings pages, and note whether they respond to simple GET requests.
  2. Send a request to such an endpoint with an Origin header set to an unrelated domain you control, and inspect the response for Access-Control-Allow-Origin and Access-Control-Allow-Credentials.
  3. Repeat with variations: a null origin, a subdomain of the target, a domain that merely contains the target's name, and an origin with a different scheme or port. A positive result is the server echoing your test origin in Access-Control-Allow-Origin while also allowing credentials, on an endpoint that returns sensitive data.
  4. Confirm in a browser rather than only with a proxy: serve a page from your test origin that fetches the endpoint with credentials and reads the body. If the browser delivers the data, the misconfiguration is real.

Common false positives are an echoed origin on endpoints that return only public data, an echo without Access-Control-Allow-Credentials on endpoints that do not need the session, and preflight responses that look permissive while the actual request is rejected. A reflected origin alone is not impact; the response has to contain something worth stealing.

How it is fixed

The standard fix is to replace any reflection of the Origin header with a strict comparison against an exact list of trusted origins, and to return no CORS headers for anything else. Credentials should only be allowed for origins that require them. Where the application does not need cross-origin reads, the CORS headers should be removed entirely. After the change, the same test requests should no longer show the test origin in the response headers.

Hunting notes

CORS mistakes tend to sit in shared middleware or per-route configuration, so they show up on API hosts, account and settings endpoints, and any service that serves several front-end domains. Recon signals worth following are multiple related domains under one brand, endpoints that answer with Access-Control-Allow-Origin at all, and any place where the header value changes with the request's Origin.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

Ubiquiti runs a set of websites under the *.ubnt.com domain. Two of them are https://client.amplifi.com and https://protect.ubnt.com/.

A browser has a built-in safety rule: a page from one website is not allowed to read data from a different website. This rule is called the same-origin policy. Think of it like a hotel where every guest's key only opens their own room door. Without that rule, any page you happen to open could quietly read your bank, your email or your shopping account in another tab.

Websites sometimes need to relax that rule on purpose. The mechanism for doing so is called CORS, short for Cross-Origin Resource Sharing. The server tells the browser, through special response headers, which other websites are allowed to read its data. It is like the hotel manager handing out a short list of guests who may enter a particular room.

The problem in this report is that the list was too generous. According to the program's summary, the CORS policy on those two Ubiquiti sites allowed HTTP requests to be made from certain sites outside the *.ubnt.com and *.ui.com domains. In plain terms, the hotel manager was letting in people who were never on the intended guest list.

The summary says this could be used in two ways:

  1. To steal user information.
  2. To force the user to execute unwanted actions.

Both outcomes depend on one condition, which the summary states clearly: a legitimate, logged-in user has to be lured to an attacker-controlled HTML page. In other words, the victim must already be signed in to the Ubiquiti site and must then open a page the attacker controls. That page can then make requests to the Ubiquiti site and steal user information.

In general, how this kind of bug works

A request is simply a message your browser sends to a server, for example "give me my account page". A cookie is a small piece of data the server asked your browser to store earlier, and the browser sends it back with every later request to that site. Cookies are how a site remembers that you are logged in. A token works in a similar way: a value that proves who you are.

When your browser loads a page from https://example.com and that page's script tries to fetch data from https://client.amplifi.com, the browser treats this as a cross-origin request. By default it blocks the script from reading the response. CORS is the controlled exception. The server replies with headers such as Access-Control-Allow-Origin, and if the browser sees its own origin echoed there, it hands the response body to the calling script.

When login cookies are involved, the server must also send Access-Control-Allow-Credentials: true, and the allowed origin cannot be the wildcard *. A misconfiguration appears when the server takes the allowed origin from the request's Origin header without checking it against a strict list, or when its check is loose enough to accept lookalike or unrelated origins. The result is that any site the check lets through can read authenticated data.

The defences are a fixed allowlist of exact origins, no reflection of arbitrary Origin values, and care with credentials: only send Access-Control-Allow-Credentials: true to origins that genuinely need it. Where cross-origin access is not needed at all, omitting the CORS headers is the safest choice.

How to test for it

  1. Identify endpoints that return private, session-bound data, such as account details or settings pages, and note whether they respond to simple GET requests.
  2. Send a request to such an endpoint with an Origin header set to an unrelated domain you control, and inspect the response for Access-Control-Allow-Origin and Access-Control-Allow-Credentials.
  3. Repeat with variations: a null origin, a subdomain of the target, a domain that merely contains the target's name, and an origin with a different scheme or port. A positive result is the server echoing your test origin in Access-Control-Allow-Origin while also allowing credentials, on an endpoint that returns sensitive data.
  4. Confirm in a browser rather than only with a proxy: serve a page from your test origin that fetches the endpoint with credentials and reads the body. If the browser delivers the data, the misconfiguration is real.

Common false positives are an echoed origin on endpoints that return only public data, an echo without Access-Control-Allow-Credentials on endpoints that do not need the session, and preflight responses that look permissive while the actual request is rejected. A reflected origin alone is not impact; the response has to contain something worth stealing.

How it is fixed

The standard fix is to replace any reflection of the Origin header with a strict comparison against an exact list of trusted origins, and to return no CORS headers for anything else. Credentials should only be allowed for origins that require them. Where the application does not need cross-origin reads, the CORS headers should be removed entirely. After the change, the same test requests should no longer show the test origin in the response headers.

Hunting notes

CORS mistakes tend to sit in shared middleware or per-route configuration, so they show up on API hosts, account and settings endpoints, and any service that serves several front-end domains. Recon signals worth following are multiple related domains under one brand, endpoints that answer with Access-Control-Allow-Origin at all, and any place where the header value changes with the request's Origin.

Glossary

  • CORS (Cross-Origin Resource Sharing): a set of response headers that let a server tell the browser which other websites may read its data.
  • Same-origin policy: the browser rule that a page from one website cannot read data from a different website by default.
  • Origin: the combination of scheme, host and port that identifies a website, for example https://client.amplifi.com.
  • Cross-origin request: a request from a page on one origin to a different origin.
  • Request: a message the browser sends to a server asking for something.
  • Response: the server's reply to a request, including headers and a body.
  • Header: a labelled piece of metadata sent with a request or response, such as Access-Control-Allow-Origin.
  • Access-Control-Allow-Origin: the CORS header that names which origin may read the response.
  • Access-Control-Allow-Credentials: the CORS header that says whether login cookies may be sent and the response read.
  • Origin header: the request header in which the browser states which site the request comes from.
  • Cookie: a small value stored by the browser and sent back to a site, commonly used to keep you logged in.
  • Token: a value that proves identity or grants access, similar in role to a cookie.
  • Credentials: the login data, such as cookies, that a request carries to prove who the user is.
  • Allowlist: a list of things that are explicitly permitted, here the origins allowed to read responses.
  • Wildcard (*): a symbol meaning "anything"; in CORS it cannot be combined with credentials.
  • Endpoint: a specific URL on a server that performs a particular function, such as returning account details.
  • GET request: a simple request that asks the server to return something.
  • Preflight request: an automatic check the browser sends before certain cross-origin requests, to ask the server what is allowed.
  • Proxy: a tool that sits between your browser and the server so you can inspect and modify requests and responses.
  • False positive: a test result that looks like a problem but is not actually exploitable.
  • Impact: the real harm an attacker could cause if the bug is exploited.
  • Severity: a rating of how serious a bug is, here high.
  • Disclosure: the point at which a bug report is made public.

More by sandh0t

View all

2 more disclosed reports, best first.

More from Ubiquiti Inc.

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.