CORS Misconfiguration, could lead to disclosure of sensitive information (translate.kromtech.com)
The server reflected any supplied Origin header in its CORS response and allowed credentials, so a malicious site could read authenticated responses from the victim's session. An attacker could use this to disclose sensitive information from the translate service.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 3 months
- Paid in 4 days
- Disclosed after 6 months
Summary by the program
Summary
CORS Misconfiguration, could lead to disclosure of sensitive information (translate.kromtech.com)
Steps to reproduce
In PoC section we send Origin: http://owmzuoswdxrx.com header and server respond to us with Access-Control-Allow-Origin: http://owmzuoswdxrx.com and Access-Control-Allow-Credentials: true headers which mean that server is vulnerable.
Request:
GET / HTTP/1.1
Host: translate.kromtech.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: http://owmzuoswdxrx.com
Cookie: PHPSESSID=hftjf037mdcu83res34fvbjot3
Response:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Nov 2019 11:44:31 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: http://owmzuoswdxrx.com
Access-Control-Allow-Credentials: true
Content-Length: 2477
<!DOCTYPE html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Zeo Translate - Index</title>
<link rel="stylesheet" type="text/css" href="/css/base.css">
<link rel="stylesheet" type="text/css" href="/css/default.css">
...
What the report shows
The target is translate.kromtech.com, a host in the *.kromtech.com scope of the Clario program on HackerOne. The feature under test is the translation site's index page, which the response titles "Zeo Translate - Index". The researcher, sec0ndw0lf, reported a CORS misconfiguration that could lead to disclosure of sensitive information. The report was rated low severity with a CVSS score of 1.3 and paid a bounty of 50.00 USD. It was disclosed on 2020-05-18.
The test is a single request. The researcher added an Origin header pointing at a domain they controlled, http://owmzuoswdxrx.com, and sent it to the root of the host together with a session cookie:
GET / HTTP/1.1
Host: translate.kromtech.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: http://owmzuoswdxrx.com
Cookie: PHPSESSID=[redacted]
The server answered with 200 OK and echoed the attacker origin back in the CORS headers, while also allowing credentials:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Nov 2019 11:44:31 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: http://owmzuoswdxrx.com
Access-Control-Allow-Credentials: true
Content-Length: 2477
<!DOCTYPE html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Zeo Translate - Index</title>
<link rel="stylesheet" type="text/css" href="/css/base.css">
<link rel="stylesheet" type="text/css" href="/css/default.css">
...
The researcher's reasoning is that the pair of headers, Access-Control-Allow-Origin echoing the supplied origin and Access-Control-Allow-Credentials: true, means the server is vulnerable. The report does not describe a follow-up request that reads data cross-origin, and it does not state a fix.
Root cause
The response shows the Access-Control-Allow-Origin header carrying the same value as the supplied Origin. Combined with Access-Control-Allow-Credentials: true, this tells the browser that any origin is permitted to read the response with the user's cookies attached.
Impact
If a victim with an active session visits a page controlled by an attacker, the headers suggest script on that page could issue credentialed cross-origin requests and read the responses. The report frames the consequence as possible disclosure of sensitive information and does not demonstrate a specific piece of data being exfiltrated, which is consistent with the low severity and low CVSS score.
How this kind of bug works
The same-origin policy stops a page on one origin from reading responses from another. CORS is the controlled exception: a server names the origins it trusts in Access-Control-Allow-Origin, and when Access-Control-Allow-Credentials: true is present, the browser will include cookies and expose the response body to the calling script. The browser enforces this, so the server must be strict about which origins it names.
The bug appears when the server reflects the request's Origin header instead of checking it against an allowlist. Any site can then be named as trusted. With credentials enabled, an attacker page can make authenticated requests as the victim and read the results. Without credentials, the impact is limited to data the endpoint serves to anonymous users.
Defences are straightforward: a fixed allowlist of trusted origins, exact string matching rather than prefix or substring checks, no reflection of arbitrary input, and Access-Control-Allow-Credentials only where genuinely needed. A Vary: Origin header keeps caches from serving one origin's CORS response to another.
How to test for it
- Find endpoints that return user-specific data or act on the session: account pages, profile APIs, settings, anything that reads a cookie.
- Send a normal request and note whether any
Access-Control-Allow-Originheader comes back at all. No CORS headers means no CORS surface. - Resend with an
Originheader set to a domain you control, and observe whether it is echoed inAccess-Control-Allow-Origin. - Check for
Access-Control-Allow-Credentials: truein the same response. Reflection alone is not enough for a credentialed attack. - Try variations that catch sloppy validation: a lookalike suffix of a trusted domain, a subdomain of the target, the
nullorigin, and an arbitrary unrelated domain. Note which ones are accepted. - Confirm in a browser from a page on your own origin, using a credentialed fetch, that the response body is actually readable. Header reflection without readable data is not a finding.
Common false positives: reflection without Access-Control-Allow-Credentials: true, endpoints that return only public data, and responses where the browser still blocks the read because the preflight fails. A reflected origin on a static asset or a page that requires no session has little value.
How it is fixed
Replace reflection with a strict allowlist of trusted origins, matched exactly. Only send Access-Control-Allow-Credentials: true on endpoints that truly need cross-origin credentialed access, and never pair it with a wildcard or reflected origin. Add Vary: Origin so shared caches do not mix responses between origins. Reject or ignore unexpected Origin values rather than echoing them.
Hunting notes
CORS misconfigurations cluster around APIs and single-page applications that serve several front ends, around endpoints added for partner or mobile integrations, and around older PHP applications where headers are set ad hoc. Subdomains and staging hosts in a wide scope such as *.example.com are good places to look, since policy is often inconsistent between them.
Recon signals: responses that already carry Access-Control-Allow-Origin, endpoints that return JSON tied to a session, and hosts whose main site and API live on different origins. Send a benign foreign origin early and watch the headers.
What happened, in plain words
This report is about a translation website, translate.kromtech.com, which is part of the Clario bug bounty program on HackerOne. A bug bounty program is a scheme where a company invites outside researchers to look for security problems in its systems and pays them for good findings. The researcher here, sec0ndw0lf, found a problem in how the site handles cross-origin requests, the mechanism that lets one website read data from another. The report was rated low severity, given a CVSS score of 1.3, and paid a bounty of 50.00 USD. CVSS is a standard scoring system where a higher number means a more serious bug. The report was disclosed on 2020-05-18.
The page under test is the translation site's front page, which the response titles "Zeo Translate - Index".
The request
The researcher sent one request to the root of the host, adding a header that names a domain they controlled, http://owmzuoswdxrx.com, and attaching a session cookie:
GET / HTTP/1.1
Host: translate.kromtech.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: http://owmzuoswdxrx.com
Cookie: PHPSESSID=[redacted]
Line by line:
GET / HTTP/1.1asks the server for the front page (/) using version 1.1 of HTTP, the language browsers and servers use to talk to each other.Host: translate.kromtech.comnames the site being contacted. One server can host many sites, so it needs to know which one is wanted.Accept-Encoding,Accept,Accept-LanguageandUser-Agentdescribe what the client can handle and what software it claims to be. They are ordinary browser headers and play no part in the bug.Connection: closeasks the server to close the connection after answering.Origin: http://owmzuoswdxrx.comis the important line. TheOriginheader tells the server which website the request is coming from. Here the researcher pretends the request comes from a domain they control, to see whether the server trusts it.Cookie: PHPSESSID=[redacted]carries the session cookie. A cookie is a small piece of data a site stores in your browser so it can recognise you on later visits. A session cookie is the one that proves you are logged in. Sending it shows what happens when a logged-in user's browser makes the request.
The response
The server answered with 200 OK, meaning success, and sent back two headers that matter:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 07 Nov 2019 11:44:31 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Access-Control-Allow-Origin: http://owmzuoswdxrx.com
Access-Control-Allow-Credentials: true
Content-Length: 2477
<!DOCTYPE html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Zeo Translate - Index</title>
<link rel="stylesheet" type="text/css" href="/css/base.css">
<link rel="stylesheet" type="text/css" href="/css/default.css">
...
Server: nginxsays the web server software is nginx. The other headers (Date,Content-Type,Expires,Cache-Control,Pragma,Content-Length) are routine housekeeping: when the page was produced, that it is HTML, and that it should not be cached.Access-Control-Allow-Origin: http://owmzuoswdxrx.comis the finding. The server copied the attacker's domain from the request straight into its answer. In effect it said: "I trust this website."Access-Control-Allow-Credentials: truesays that requests from that trusted website may carry the user's cookies.
The body is the normal front page of the translation site. The researcher's conclusion is that this pair of headers means the server is vulnerable. The report does not show a follow-up request that actually reads data from another site, and it does not describe a fix.
In general, how this kind of bug works
Browsers have a rule called the same-origin policy. An origin is a combination of scheme, host and port, so https://example.com and https://other.com are different origins. The rule stops a page on one origin from reading responses from another. Without it, any website you visited could quietly read your webmail or your bank page in another tab.
CORS, short for Cross-Origin Resource Sharing, is the controlled exception. A server can name the origins it trusts in the Access-Control-Allow-Origin response header. When Access-Control-Allow-Credentials: true is also present, the browser will send cookies along and let the calling script read the response body. Think of it as a club with a guest list: the browser only lets in the names the server wrote down. The browser enforces the rule, so the server has to be strict about who is on the list.
The bug appears when the server writes down whatever name the visitor gives instead of checking a fixed list. Then any website can get itself trusted. With credentials enabled, a page controlled by an attacker can make requests as the logged-in victim and read the answers. Without credentials, the damage is limited to data the site serves to anyone.
How to test for it
- Find pages or APIs that return data specific to a user or act on a session: account pages, profile APIs, settings, anything that reads a cookie.
- Send a normal request and note whether any
Access-Control-Allow-Originheader comes back at all. No CORS headers means nothing to test. - Resend with an
Originheader set to a domain you control, and see whether it is echoed back. - Check for
Access-Control-Allow-Credentials: truein the same response. Reflection alone is not enough for an attack that uses the victim's session. - Try variations that catch sloppy checks: a lookalike suffix of a trusted domain, a subdomain of the target, the
nullorigin, and an unrelated domain. Note which are accepted. - Confirm in a browser, from a page on your own origin, that the response body is actually readable. A reflected header without readable data is not a finding.
Common false positives: reflection without Access-Control-Allow-Credentials: true, endpoints that return only public data, and responses the browser still blocks because the preflight fails. A preflight is an automatic preliminary request the browser sends to ask permission before the real one. A reflected origin on a static file or a page that needs no session has little value.
How it is fixed
Replace reflection with a strict allowlist of trusted origins, matched exactly. Send Access-Control-Allow-Credentials: true only on endpoints that truly need cross-origin access with cookies, and never pair it with a wildcard or a reflected origin. Add Vary: Origin so shared caches do not hand one origin's response to another. Ignore unexpected Origin values rather than echoing them.
Where to look
These misconfigurations cluster around APIs and single-page applications that serve several front ends, around endpoints added for partner or mobile integrations, and around older PHP applications where headers are set ad hoc. Subdomains and staging hosts in a wide scope such as *.example.com are good places to look, since policy is often inconsistent between them.
Useful signals: responses that already carry Access-Control-Allow-Origin, endpoints that return JSON tied to a session, and hosts whose main site and API live on different origins. Send a harmless foreign origin early and watch the headers.
Glossary
- Bug bounty program: a scheme where a company pays outside researchers for reporting security problems.
- CORS (Cross-Origin Resource Sharing): the mechanism by which a server tells the browser which other origins may read its responses.
- Origin: the combination of scheme, host and port that identifies a website, for example
https://example.com. - Same-origin policy: the browser rule that stops a page on one origin from reading responses from another.
- Request: a message a browser or tool sends to a server asking for something.
- Response: the server's reply to a request.
- Header: a labelled line of extra information sent with a request or response.
Originheader: a request header naming the website the request comes from.Access-Control-Allow-Origin: a response header naming the origin the server trusts to read the response.Access-Control-Allow-Credentials: a response header saying whether cookies may be sent and the response read by the trusted origin.- Cookie: a small piece of data a site stores in your browser so it can recognise you later.
- Session cookie: the cookie that proves you are logged in.
PHPSESSID: the name of a common session cookie used by PHP applications.- CVSS: a standard scoring system for the severity of a security bug; higher means more serious.
- Severity: a rating of how much harm a bug could cause.
- Bounty: the money paid for a valid report.
- Disclosure: the public release of a report.
- Reflection: copying a value from the request straight into the response without checking it.
- Allowlist: a fixed list of values that are permitted.
- Wildcard: a symbol such as
*meaning "anything", which is dangerous when combined with credentials. - Preflight: an automatic preliminary request the browser sends to ask permission before the real cross-origin request.
Vary: Origin: a response header telling caches that the answer differs depending on the request's origin.- Cache: a store that keeps copies of responses to serve them faster later.
- False positive: a suspected bug that turns out not to be exploitable.
- Exfiltration: getting data out of a system to a place the attacker controls.
- Recon: the early phase of looking around a target to find places worth testing.
- API: an interface through which software requests data or actions, often returning JSON.
- JSON: a common text format for structured data.
- Staging host: a non-production copy of a site used for testing.
- nginx: a popular web server software.