Reusing Cookies
Several SaaS platforms that let customers host content on custom subdomains shared session cookies across all tenants, so a user could take their own session cookie, change its Domain attribute to a victim's subdomain, and be treated as that victim's user. This let the author view private articles, edit documentation and host attacker-controlled pages under customer domains.
Ricardo Iramar dos Santos Follow
Published on medium.com
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a story about one technique, cookie reuse across subdomains, applied to four different SaaS products. In each case the product issues a session cookie on a shared application host, and the same cookie is accepted on a customer-controlled subdomain that is CNAME'd to the provider. By changing the cookie's Domain attribute, a session created on the attacker's own tenant becomes valid on the victim's hostname.
The targets, as named in the write-up:
| Alias in the post | Product | Host pattern |
|---|---|---|
| Example | Geckoboard | dashboard.example.com |
| The Vulnerable Customer | Crusade Auditor | news.vulnerablecustomer.com |
| VHX | Help Scout | support.vhx.tv |
| (none) | ReadMe | *.readme.io |
Geckoboard provides hosted dashboards and lets customers point a custom domain at them. Crusade Auditor provides pages including a web preview of an email and a customisable signup form. Help Scout provides documentation sites (*.helpscoutdocs.com) that customers map to their own domains. ReadMe hosts API documentation projects with visibility levels such as Not Yet Active, Project Members Only and Site-wide Password.
Setup
The researcher's routine for every target is subdomain enumeration followed by a takeover check:
- Enumerate subdomains with Amass and SubFinder.
- Run
tko-subsagainst the results to look for subdomain takeover. - For the CNAME sweep across many customers, query a local copy of Rapid7's Project Sonar forward DNS dataset (
sonar.fdns_v2).
Accounts used:
- A Geckoboard trial account created with
[redacted], giving dashboards underhttps://app.geckoboard.com. - A Crusade Auditor trial account, which required approval to unlock all functionality; approval was never granted.
- Two Help Scout trial doc sites,
test1.helpscoutdocs.comandtest2.helpscoutdocs.com, the second holding one private Doc Site and Collection. - A ReadMe trial page,
https://any-attacker.readme.io, plus a second ReadMe account with three projects acting as the victim: Not Yet Active, Project Members Only and Password Protected.
Finding it
While checking dashboard.example.com for takeover, the researcher found it was not vulnerable but was a CNAME to Geckoboard, a service he had not seen before:
$ dig +short dashboard.example.comexample.geckoboard.com.34.195.20.13934.238.88.6935.169.145.217
Visiting https://dashboard.example.com redirects to https://dashboard.example.com/login/, which carries a link reading "Don't have an account? Start your free trial" pointing at https://www.geckoboard.com/try-geckoboard/. A large private company linking its own login page to a third party's registration page made no sense, so he registered a trial and compared cookies between https://app.geckoboard.com and https://dashboard.example.com. Both hosts carried a cookie named _geckoboard_session.
The screenshot shows the researcher's own dashboard rendered under the Example company domain, which is the result of the step below.
Exploitation
Step 1: Geckoboard, copy the session cookie across hosts
Copying the value of _geckoboard_session from https://app.geckoboard.com into the same cookie under https://dashboard.example.com produced admin access to his own account, now served from the company domain. From there he could publish any public dashboard under https://dashboard.example.com.
The impact he describes: an attacker with their own account can publish a malicious dashboard on the company's domain for phishing or to host malicious content, damaging the company's image. He adds that he did not research it deeply but that running JavaScript through a dashboard widget may be possible, which would amount to stored XSS.
He filed this on HackerOne; it was accepted as medium severity (4.9), closed, and paid $300.
Step 2: Find other Geckoboard customers
To look for other customers with public bug bounty programmes, he grepped the Sonar CNAME dataset for records pointing at *.geckoboard.com:
Only two results came back, which he reads as Geckoboard having few customers, or few of them using custom domains.
Step 3: Report to Geckoboard itself
Geckoboard publishes a policy for reporting vulnerabilities. On 8 October he sent essentially the same content to [redacted] and received a reply from Megan.

The next day a second email arrived from Megan.

Geckoboard's position was that this was a "function of the system", and by coincidence they were removing the feature anyway. After further discussion with Megan and Matt, both of Geckoboard, they offered $100 as a token of thanks. He asked for the reward to be donated to a non-profit helping poor children, and it went to the Against Malaria Foundation.

Step 4: Crusade Auditor, identify the shared host
Starting from the can-i-take-over-xyz list, he checked a few services and found another one vulnerable to the same technique, with a different and higher-impact attack surface. The company has a private Bugcrowd programme, so it is called Crusade Auditor here. Before reporting to the vendor he looked for a customer of theirs inside a public programme, and found one in the Verizon Media scope on HackerOne, called The Vulnerable Customer.
dig identified the customer subdomain news.vulnerablecustomer.com pointing at the shared vendor subdomain cname.crusadeauditor.com.

In this application the reused cookie is called ABLoginx9. An attacker signs up to the service to obtain a valid ABLoginx9 for their own account, then changes the cookie's Domain attribute to news.vulnerablecustomer.com and manages that same account under https://news.vulnerablecustomer.com.
Step 5: Host a malicious image
The direct impact is close to none, but the attacker can serve any public image from https://news.vulnerablecustomer.com. That is useful for bypassing domain-based access control and underpins the later scenarios. Since the image can be anything, he points out it could be a large advert from the customer's biggest competitor.

Step 6: Open redirect
An attacker can create pages under https://news.vulnerablecustomer.com and redirect to another domain they fully control. This can bypass a content-security-policy such as the one on http://accounts.vulnerablecustomer.com. The redirect works because the page is a preview of the web version of an email. For the PoC he created a trial account, which needs approval for full functionality, and approval never came; with a fully valid account an attacker would probably be able to serve arbitrary content under the subdomain.
Step 7: Stored XSS and clickjacking in the signup form
The service offers a signup form feature where any user can build a custom form to sign new users up to a list. The form has two custom URL fields, Privacy policy URL and Cookie policy URL, filtered on the client side only. Intercepting and editing the raw HTTP request lets the fields take the value:
javascript:alert(document.domain)
That is effectively stored XSS under https://news.vulnerablecustomer.com, requiring one click of user interaction: the links to the two policy URLs execute JavaScript in the victim's browser. The page includes rel="noopener" on the anchor tag, which restricts the issue to IE11 and the latest Edge version.
The same signup form page does not return an X-Frame-Options response header, so clickjacking is possible, which makes combining it with the XSS easier. For this PoC he reused the same form as in the next scenario, purely for demonstration; a creative attacker would build a completely different page that fits a different malicious context.


Step 8: Phishing and credential theft with the same form
His favourite scenario. The signup form is fully customisable, so instead of a real signup process the attacker builds a form that fakes a login page, using the name field as the password field, and receives the credentials by email or in their own Crusade Auditor account. The one drawback is that characters echo inside the form while the password is typed. The "Click Here!" links from the previous scenario can be removed to make it more realistic.



The notification email also carries the victim's GeoIP location and IP address.
Step 9: Outcome on HackerOne
A few weeks later the HackerOne report was closed as Informative.
Because the Bugcrowd report against the vendor was still open, the issue remained exploitable on The Vulnerable Customer at the time of writing.
Step 10: The Bugcrowd submission
He submitted the same issue to Bugcrowd through the vendor's form on 8 October and received a confirmation email.

The submission could be claimed, but nothing appeared under Submissions in his Bugcrowd account. On 29 October he contacted Bugcrowd; Wellington replied.
A few days later the report was marked DUPLICATE.

He asked for access to the original report, both to verify the duplicate and to learn from it. The first engineer sent an ID that returned 404. A second engineer, San, commented on something unrelated to the report and asked for a video demonstrating an exploit other than the one described. He replied by pasting the relevant part of his own report and explaining it again.
San replied with another wrong assumption, and the exchange deteriorated. He asked: "Could you please give me access to the original report or can I talk to another security engineer from Bugcrowd?" The remaining comments are reproduced in the post.
The report stayed unresolved and access to the original was never granted.

Step 11: Help Scout, enumerate the customer base
A grep of the same Sonar dataset for CNAMEs pointing at *.helpscoutdocs.com returned 3766 subdomains. From those he found many companies with a proper vulnerability reporting channel and reported to several. Through this issue he obtained credentials, sensitive documents, internal diagrams and process documentation. Only one of those companies has a public HackerOne programme, VHX, and the impact there was almost nil, so he reported the underlying issue to Help Scout directly; since it was fixed and VHX's programme is public, he can name it.
He confirmed the issue on VHX with the same technique. support.vhx.tv is a CNAME to vhxsupport.helpscoutdocs.com.
Step 12: Help Scout, move the cookie to the victim host
He created an account (Test1) to compare https://support.vhx.tv/ with his own trial instance. His trial doc site test1.helpscoutdocs.com carried the same cookies as support.vhx.tv: PLAY_SESSION and hs.login.link.
To test whether write protections were enforced on https://support.vhx.tv/, he changed the Domain attribute of his instance's cookies to support.vhx.tv. After that, the "Edit this Article" control appeared, and the HTML source leaked the URL https://secure.helpscout.net/docs/5307a75ae4b0479ea072e554/article/54f63981e4b034c37ea934c2, which contains the document's internal ID.
Clicking "Edit this Article" redirected to https://secure.helpscout.net/ooops/ with an error, which is expected since he has no access to that document.

He did not report that URL to the programme because the impact there is almost nil, and investigated further instead.
Step 13: Help Scout, read another tenant's private article
Help Scout's documentation states that Doc Sites and Collections can be Public or Private, so he created a second account (Test2) with a single private Doc Site and Collection at test2.helpscoutdocs.com. Logged in as Test1 in another browser, he tried to open Test2's Doc Site and got an access denied error, as expected.
He then replaced the Domain attribute of the PLAY_SESSION cookie from test1.helpscoutdocs.com with test2.helpscoutdocs.com, and could read Test2's private article while logged in as Test1.

In general terms, by reusing the same cookie and changing its Domain attribute, an attacker can read private articles belonging to any Help Scout customer. The report was sent on 7 October; after five different people were involved, someone understood the problem, and on 30 October Help Scout sent the notification below to its customers.

He received no reward for this one.
Step 14: ReadMe, reach restricted projects
Following ReadMe's bug bounty instructions, he reported that the platform incorrectly restricts access to internal documentation (Project Members Only and Site-wide Password) and to Not Yet Active published projects from an unauthorised user. An attacker signs up at https://readme.com/ to get a valid trial documentation page such as https://any-attacker.readme.io/, then targets a specific company or searches subdomains under readme.io. For the PoC he created a second account with three projects as the victim.
Accessing those three projects from the attacker page produces the messages below.

From his own page at https://any-attacker.readme.io, the attacker changes the domain attribute of his own connect.sid cookie from any-attacker.readme.io to the target page not-yet-active.readme.io. He then opens https://not-yet-active.readme.io without any restrictions. The same attack works on https://project-members-only.readme.io and https://password-protected.readme.io.



He characterises this as a design flaw rather than an application vulnerability: from the attacker's perspective ReadMe does not behave like a multi-tenant solution but like one single application where each customer is a single user. The attacker can also change documentation and add questions, apparently with exactly the same rights as on their own pages. After several emails, escalations and fixes he received $250.
Root cause
In every case the session cookie is issued on a shared application host and is not bound to the tenant it was created for. The server accepts a cookie minted for one tenant on another tenant's custom domain. Because the cookie's Domain attribute is set by the client, the attacker simply widens or redirects its scope to the victim hostname.
Existing defences did not stop it. On Help Scout, write protection on the victim host was enforced somewhere, since the edit attempt bounced to /ooops/, but read protection on private articles was not: the same cookie read Test2's private article. On ReadMe the visibility settings did not stop the attacker's own session from opening the target projects. On Crusade Auditor the only barrier to the signup form abuse was client-side filtering of the two URL fields, and the page lacked X-Frame-Options; rel="noopener" limited the XSS to IE11 and Edge but did nothing for the phishing scenario.
Impact
- Geckoboard / Example: publishing arbitrary public dashboards on the company's domain, usable for phishing or hosting malicious content, with possible stored XSS through a widget (not confirmed). Medium severity, 4.9, $300.
- Crusade Auditor / The Vulnerable Customer: hosting arbitrary images on the customer domain, open redirect usable to bypass CSP on
accounts.vulnerablecustomer.com, one-click stored XSS in IE11 and Edge, clickjacking, and a fully customisable fake login form that delivers credentials, GeoIP location and IP address to the attacker. Closed as Informative on HackerOne; still exploitable while the Bugcrowd report was open. - Help Scout: reading private articles of any Help Scout customer, and across the 3766 enumerated subdomains, obtaining credentials, sensitive documents, internal diagrams and process documentation. No reward.
- ReadMe: reading and modifying documentation in Not Yet Active, Project Members Only and Password Protected projects. $250.
All of this requires the attacker to hold a valid account on the same provider, and the victim to serve the provider on a custom domain (or, for ReadMe, to rely on the project visibility settings).
Fix
Help Scout notified customers on 30 October. ReadMe fixed it after escalation. Geckoboard said the custom domain capability was a "function of the system" and was being removed anyway. The post does not describe the code changes any of them made.
What the behaviour calls for: bind the session to the tenant it was issued for, for example by validating the cookie against the hostname on every request, or by issuing host-only cookies per tenant so a cookie from one host is never sent to another. Enforce authorisation on the server for every visibility level rather than relying on the hostname, and do not let client-supplied Domain attributes decide which tenant a session belongs to. On the form features, validate the policy URL fields server-side against an allowlist of schemes, and send X-Frame-Options (or a frame-ancestors CSP) on pages that accept input.
Variants to test
- CNAME sweep for shared SaaS hosts. Grep a passive DNS dataset for CNAMEs to the provider's shared host, as done here with
egrep '"type":"cname","value":".*geckoboard.com"}'. A positive result is a list of customer domains you can test with your own trial account. - Cookie name comparison across hosts. Register a trial, load both the provider host and a customer host, and compare cookie names and values. Identical session cookies on both hosts is the precondition.
- Domain attribute rewrite. Change the cookie's
Domainto the victim host and reload. A positive result is your own account's content rendered under the victim's hostname, or access to content you should not see. - Write versus read separation. Try an edit action as well as a read action, as with "Edit this Article" versus the private article. A redirect to an error page on write but successful reads still means data exposure.
- Visibility levels. On documentation platforms, create projects in each state (Not Yet Active, Members Only, Password Protected) and try each from the attacker session. Any state that renders instead of prompting is a finding.
- Custom form fields. On any customisable form, intercept the request and try
javascript:alert(document.domain)in URL fields. Check the anchor forrel="noopener"to judge browser reach, and check forX-Frame-Optionsto judge clickjacking. - Credential capture via form reuse. Build a form that mimics a login page and confirm whether submitted values arrive in the attacker's account or email, including any metadata such as GeoIP and IP address.
What happened, in plain words
This is the story of one simple trick that turned out to work against four different online services, though the last was called a design flaw. The trick is: take a login cookie from one website and use it on a different website that belongs to the same company. If the second website trusts that cookie, you end up logged in there too, as if the account were yours on that site.
A few words before we start, because everything below depends on them.
A cookie is a small piece of text that a website asks your browser to store and send back on every later visit. It is how a website remembers who you are between page loads. When you log in, the site puts a session cookie in your browser; on each following request the browser shows that cookie, and the server says "ah, this is that user". Think of it as a cloakroom ticket: you hand in your coat, you get a ticket, and later the ticket is enough to get the coat back. The ticket itself is just a number; the value is in the cloakroom's record.
A session cookie is exactly that kind of ticket. It usually has a name (like _geckoboard_session or PLAY_SESSION) and a value (a long random-looking string). It also has attributes, which are settings that tell the browser when and where to send it. One of those attributes is Domain: it says which hostnames the cookie belongs to. If Domain is example.com, the browser sends the cookie to example.com and to subdomains like dashboard.example.com. If Domain is dashboard.example.com, it only goes there.
A subdomain is a name that sits under a bigger name. In dashboard.example.com, the example.com part is the main domain and dashboard is the subdomain. Companies often use subdomains for different services: mail.example.com for email, shop.example.com for the shop, and so on.
A CNAME is a DNS record. DNS is the internet's phone book: it turns names into addresses. A CNAME says "this name is really just another name, go look that one up instead". Companies use CNAMEs to point their own subdomain at a service run by somebody else. For example, dashboard.example.com might be a CNAME to example.geckoboard.com, meaning the actual servers belong to Geckoboard but visitors see the company's own name in the address bar.
A SaaS product (software as a service) is a product you use over the internet instead of installing it. Geckoboard, Crusade Auditor, Help Scout and ReadMe are all SaaS products in this story. Several of them let a customer attach their own domain name to the product, so the customer's users see the customer's brand rather than the provider's.
A bug bounty programme is a scheme where a company invites outsiders to look for security problems in its systems and pays for good reports. HackerOne and Bugcrowd are platforms that run such programmes. A private programme means only invited researchers can take part; a public one is open to anyone.
Severity is a rough score for how bad a bug is. CVSS is a standard scoring system; 4.9 is a middling score, usually called medium.
With those words in hand, here is the story.
The accident
The author does bug bounty work in his spare time. For every target he follows the same routine. First he looks for subdomains: all the names under a company's main domain. He uses two tools for that, Amass and SubFinder. Then he runs a tool called tko-subs against the list to check for subdomain takeover.
Subdomain takeover deserves a sentence of its own. Sometimes a company creates a subdomain and points it at an outside service, then later stops using that service but forgets to remove the DNS record. An attacker can then claim the abandoned name at the outside service and start serving their own content under the company's subdomain. It is like cancelling your flat but leaving the key under the mat: anyone who finds the key can walk in and put their own name on the door.
One target was a private bug bounty programme run by a large private company. The author calls it Example because he cannot reveal the real name. While checking subdomains for takeover, he found dashboard.example.com. It was not vulnerable to takeover, but it was interesting: it had a CNAME pointing at a service called Geckoboard, which he had never heard of.
$ dig +short dashboard.example.comexample.geckoboard.com.34.195.20.13934.238.88.6935.169.145.217
This is a command-line session. dig is a small program that asks DNS questions; +short tells it to print only the answer, without the extra detail. The line after the $ is the output: the name example.geckoboard.com followed by four IP addresses. In plain words: dashboard.example.com is not a machine of its own, it is an alias for example.geckoboard.com, which lives at those addresses. The output is shown run together on one line in the post, but the meaning is that the CNAME resolves to those addresses.
When he opened https://dashboard.example.com, it redirected to https://dashboard.example.com/login/. That login page had a link reading "Don't have an account? Start your free trial" pointing at https://www.geckoboard.com/try-geckoboard/. A large private company sending its own users to a third party's sign-up page made no sense to him, so he dug further.
He created a trial account with the email [redacted], which gave him his own dashboards under https://app.geckoboard.com. While looking around, he noticed that both https://app.geckoboard.com and https://dashboard.example.com used a cookie with the same name: _geckoboard_session.
The screenshot shows his own dashboard rendered under the Example company's domain. That is the result of the step described next: the same account, the same content, but served from the company's name instead of Geckoboard's.
Exploitation
Step 1: Geckoboard, copy the session cookie across hosts
He copied the value of the _geckoboard_session cookie from https://app.geckoboard.com into the same cookie under https://dashboard.example.com. The result was admin access to his own account, now served from the company's domain. From there he could publish any public dashboard under https://dashboard.example.com.
Why does this matter? Because the address bar said dashboard.example.com. A visitor has no way to tell that the dashboard was made by an outsider with a free trial account. The author lists the consequences: an attacker with their own account can publish a malicious dashboard on the company's domain, either to phish (trick people into handing over details) or to host malicious content, and either way it damages the company's image. He adds that he did not research it deeply, but that running JavaScript through a dashboard widget might be possible, which would amount to stored XSS.
XSS stands for cross-site scripting: getting a website to run JavaScript that the site's owners did not write. Stored means the malicious script is saved on the server (in a dashboard widget, say) and runs for every visitor who loads the page, rather than being slipped in through a single link.
He filed this on HackerOne. It was accepted as medium severity, 4.9, closed, and paid $300.
Step 2: Find other Geckoboard customers
Having one valid report, he wanted to know whether other Geckoboard customers had public bug bounty programmes. To find them he used a local copy of Rapid7's Project Sonar dataset. Project Sonar is a public collection of internet scan data; the fdns_v2 part is a record of DNS answers, including CNAMEs, gathered across the internet. Having it locally means you can search millions of records in seconds instead of querying the internet one name at a time.
He searched it for CNAME records pointing at *.geckoboard.com:
Line by line: egrep is a search tool that prints lines matching a pattern. The pattern here looks for lines containing "type":"cname" and a "value" ending in geckoboard.com. The file being searched is fdns_cname_2019-08-23-1566518677.json, a JSON file from the Sonar dataset. The output shown is two JSON records, each with a timestamp, a name (the customer's domain) and a value (the Geckoboard host it points at). The names in the output are redacted in the post, which is why they read redacted1.com and so on.
Only two results came back. He reads that as Geckoboard having few customers, or few of them using custom domains.
Step 3: Report to Geckoboard itself
Geckoboard publishes a policy describing how to report a vulnerability. On 8 October he sent essentially the same content to [redacted] and got a reply from Megan.

The image is captioned as the first reply from Geckoboard to his report.
The next day a second email arrived from Megan.

This one is captioned as the second reply.
Geckoboard's position was that this was a "function of the system", and by coincidence they were removing the feature anyway. After further discussion with Megan and Matt, both of Geckoboard, they offered $100 as a token of thanks. He asked for the reward to be donated to a non-profit helping poor children, and it went to the Against Malaria Foundation.

The image is captioned "What?", which sums up his reaction to the answer.
Step 4: Crusade Auditor, identify the shared host
He started from a page called can-i-take-over-xyz, a list of services and how to claim subdomains whose DNS records are dangling. After checking a few services he found another one vulnerable to the same technique, with a different and more serious set of attacks. That company runs a private Bugcrowd programme, so he calls it Crusade Auditor. Before reporting to the vendor, he looked for a customer of theirs that sat inside a public programme, and found one in the Verizon Media scope on HackerOne. He calls that customer The Vulnerable Customer.
dig identified the customer subdomain news.vulnerablecustomer.com pointing at the shared vendor subdomain cname.crusadeauditor.com.

The screenshot is captioned as The Vulnerable Customer subdomain, showing the DNS relationship between the customer name and the vendor's shared host.
In this application the reused cookie is called ABLoginx9. The attack works like this: an attacker signs up to the service and gets a valid ABLoginx9 cookie for their own account. Then they change the cookie's Domain attribute to news.vulnerablecustomer.com. Now the browser sends that cookie to the customer's subdomain, and the attacker manages their own account under https://news.vulnerablecustomer.com.
Step 5: Host a malicious image
The direct impact is close to none, but the attacker can serve any public image from https://news.vulnerablecustomer.com. That is useful for getting past access controls that trust the domain name, and it underpins the later scenarios. Since the image can be anything, he points out it could be a large advert from the customer's biggest competitor.

The screenshot shows a public image being served under https://news.vulnerablecustomer.com, which is the point: content the customer never chose, on the customer's own name.
Step 6: Open redirect
An attacker can create pages under https://news.vulnerablecustomer.com and redirect visitors to another domain they fully control. This can bypass a content-security-policy, such as the one on http://accounts.vulnerablecustomer.com.
A content-security-policy is a set of rules a site sends to the browser saying which sources of content are allowed. It is a bit like a guest list at a door: if a script or a page comes from a source not on the list, the browser refuses it. An open redirect on a trusted domain can help an attacker get around such a list, because the first hop is on a name the policy trusts.
The redirect works because the page is a preview of the web version of an email. For the proof of concept he created a trial account, which needs approval to unlock full functionality, and approval never came. With a fully valid account an attacker would probably be able to serve arbitrary content under the subdomain.
The screenshot is captioned Open Redirect and shows the redirect in action.
Step 7: Stored XSS and clickjacking in the signup form
The service offers a signup form feature: any user can build a custom form to sign new users up to a list. The form has two custom URL fields, Privacy policy URL and Cookie policy URL, and those fields are filtered on the client side only.
"Client side only" is the key phrase. Filtering in the browser (client side) can be bypassed, because the attacker controls the browser. The check has to happen on the server, which the attacker does not control. It is like a bouncer who only checks invitations at the door of the guest's own house.
By intercepting and editing the raw HTTP request, the fields can be made to take this value:
javascript:alert(document.domain)
This is a URL whose scheme is javascript: instead of http: or https:. When a browser follows such a link, it does not fetch a page; it runs the JavaScript that follows. alert(document.domain) opens a pop-up showing the domain of the current page. It is the standard harmless demonstration: if the pop-up appears, the attacker's code ran on the site's page, and a real attacker would put something more useful there.
That is effectively stored XSS under https://news.vulnerablecustomer.com, with one click of user interaction: the links to the two policy URLs run JavaScript in the victim's browser. The page includes rel="noopener" on the anchor tag, which restricts the issue to IE11 and the latest Edge version.
rel="noopener" is an attribute on a link that stops the newly opened page from getting a handle on the page that opened it. The author says this restricts the issue to IE11 and the latest Edge version.
The same signup form page does not return an X-Frame-Options response header, so clickjacking is possible, which makes combining it with the XSS easier.
X-Frame-Options is a response header a server sends to say whether its pages may be shown inside a frame on another site. Clickjacking is the trick of loading a victim site invisibly inside a frame on the attacker's page and placing your own buttons on top, so the victim thinks they are clicking one thing and actually click another. Without X-Frame-Options, the browser allows the page to be framed.
For this proof of concept he reused the same form as in the next scenario, purely for demonstration. A creative attacker would build a completely different page that fits a different malicious context.

The screenshot is captioned Stored XSS and shows the script running from the form.

The screenshot is captioned Clickjacking and shows the form embedded in another page.
Step 8: Phishing and credential theft with the same form
This is his favourite scenario. The signup form is fully customisable, so instead of a real signup process the attacker builds a form that fakes a login page, using the name field as the password field, and receives the credentials by email or in their own Crusade Auditor account. The one drawback is that characters echo inside the form while the password is typed. The "Click Here!" links from the previous scenario can be removed to make it more realistic.

The screenshot is captioned Fake Login Page and shows the form dressed up as a login screen.

The screenshot is captioned Credentials leaked in the attacker's Crusade Auditor account, showing what the attacker sees after a victim submits the form.

The screenshot is captioned Credentials leaked in the attacker's email, the other delivery route.
The notification email also carries the victim's GeoIP location and IP address. GeoIP is the practice of guessing where a visitor is from their IP address, the number that identifies their connection.
Step 9: Outcome on HackerOne
A few weeks later the HackerOne report was closed as Informative.
The screenshot is captioned Hackerone report closed as Informative.
"Informative" is a status meaning the report was read and judged not to be a security issue worth acting on. Because the Bugcrowd report against the vendor was still open, the issue remained exploitable on The Vulnerable Customer at the time of writing.
Step 10: The Bugcrowd submission
He submitted the same issue to Bugcrowd through the vendor's form on 8 October and received a confirmation email.

The screenshot is captioned Bugcrowd email notification.
The submission could be claimed, but nothing appeared under Submissions in his Bugcrowd account. On 29 October he contacted Bugcrowd; Wellington replied.
The screenshot is captioned Bugcrowd email reply.
A few days later the report was marked DUPLICATE.

The screenshot is captioned Duplicate.
A duplicate means somebody else reported the same issue first. He asked for access to the original report, both to check the duplicate was real and to learn from it. The first engineer sent an ID that returned 404, meaning the page did not exist for him. A second engineer, San, commented on something unrelated to the report and asked for a video demonstrating an exploit other than the one described. He replied by pasting the relevant part of his own report and explaining it again.
The screenshot is captioned as his comment with the whole report explained again.
San replied with another wrong assumption, and the exchange deteriorated. He asked: "Could you please give me access to the original report or can I talk to another security engineer from Bugcrowd?" The remaining comments are reproduced in the post.
These six images are the rest of the comment thread, shown without captions.
The report stayed unresolved and access to the original was never granted.

The screenshot is captioned with a face, which matches the tone of the section.
Step 11: Help Scout, enumerate the customer base
A search of the same Sonar dataset for CNAMEs pointing at *.helpscoutdocs.com returned 3766 subdomains. From those he found many companies with a proper vulnerability reporting channel and reported to several. Through this issue he obtained credentials, sensitive documents, internal diagrams and process documentation. Only one of those companies has a public HackerOne programme, VHX, and the impact there was almost nil, so he reported the underlying issue to Help Scout directly. Since it was fixed and VHX's programme is public, he can name it.
He confirmed the issue on VHX with the same technique. support.vhx.tv is a CNAME to vhxsupport.helpscoutdocs.com.
The screenshot is captioned VHX CNAME and shows the DNS record.
Step 12: Help Scout, move the cookie to the victim host
He created an account (Test1) to compare https://support.vhx.tv/ with his own trial instance. His trial doc site test1.helpscoutdocs.com carried the same cookies as support.vhx.tv: PLAY_SESSION and hs.login.link.
The screenshot is captioned Help Scout Cookies and shows the two cookies present on both hosts.
To test whether write protections were enforced on https://support.vhx.tv/, he changed the Domain attribute of his instance's cookies to support.vhx.tv. After that, the "Edit this Article" control appeared, and the HTML source leaked the URL https://secure.helpscout.net/docs/5307a75ae4b0479ea072e554/article/54f63981e4b034c37ea934c2, which contains the document's internal ID.
The screenshot is captioned Edit this Article visible, showing the control that should not have been there.
Clicking "Edit this Article" redirected to https://secure.helpscout.net/ooops/ with an error, which is expected since he has no access to that document.

The screenshot is captioned Oooops and shows the error page.
He did not report that URL to the programme because the impact there is almost nil, and investigated further instead.
Step 13: Help Scout, read another tenant's private article
Help Scout's documentation states that Doc Sites and Collections can be Public or Private, so he created a second account (Test2) with a single private Doc Site and Collection at test2.helpscoutdocs.com. Logged in as Test1 in another browser, he tried to open Test2's Doc Site and got an access denied error, as expected.
The screenshot is captioned Access Denied.
He then replaced the Domain attribute of the PLAY_SESSION cookie from test1.helpscoutdocs.com with test2.helpscoutdocs.com, and could read Test2's private article while logged in as Test1.

The screenshot is captioned with a smiley, which fits: the private article opened for the wrong account.
In general terms, by reusing the same cookie and changing its Domain attribute, an attacker can read private articles belonging to any Help Scout customer. The report was sent on 7 October. After five different people were involved, someone understood the problem, and on 30 October Help Scout sent the notification below to its customers.

The screenshot is captioned Help Scout Email and shows the customer notification.
He received no reward for this one.
Step 14: ReadMe, reach restricted projects
Following ReadMe's bug bounty instructions, he reported that the platform incorrectly restricts access to internal documentation (Project Members Only and Site-wide Password) and to Not Yet Active published projects from an unauthorised user. An attacker signs up at https://readme.com/ to get a valid trial documentation page such as https://any-attacker.readme.io/, then targets a specific company or searches subdomains under readme.io. For the proof of concept he created a second account with three projects as the victim.
The screenshot is captioned PoC Account and shows the three projects set up as the victim.
Accessing those three projects from the attacker page produces the messages below.
The screenshot is captioned Not Yet Active.
The screenshot is captioned Members Only.

The screenshot is captioned Password Protected.
From his own page at https://any-attacker.readme.io, the attacker changes the domain attribute of his own connect.sid cookie from any-attacker.readme.io to the target page not-yet-active.readme.io. He then opens https://not-yet-active.readme.io without any restrictions. The same attack works on https://project-members-only.readme.io and https://password-protected.readme.io.

The screenshot is captioned Not Yet Active and shows the project opening for the attacker.


He characterises this as a design flaw rather than an application vulnerability. From the attacker's perspective ReadMe does not behave like a multi-tenant solution but like one single application where each customer is a single user. Multi-tenant means one system serving many separate customers with their data kept apart; here the separation was not real. The attacker can also change documentation and add questions, apparently with exactly the same rights as on their own pages. After several emails, escalations and fixes he received $250.
The screenshot is captioned ReadMe Reward.
Root cause
In every case the session cookie is issued on a shared application host and is not tied to the tenant it was created for. The server accepts a cookie minted for one tenant on another tenant's custom domain. So a cookie minted for tenant A is accepted on tenant B's custom domain. Because the cookie's Domain attribute is set by the client, the attacker simply widens or redirects its scope to the victim hostname.
The existing defences did not stop it. On Help Scout the edit attempt bounced to /ooops/, but the same cookie read Test2's private article.: the same cookie read Test2's private article. On ReadMe the visibility settings did not stop the attacker's own session from opening the target projects. On Crusade Auditor the only barrier to the signup form abuse was client-side filtering of the two URL fields, and the page lacked X-Frame-Options; rel="noopener" limited the XSS to IE11 and Edge but did nothing for the phishing scenario.
Impact
- Geckoboard / Example: publishing arbitrary public dashboards on the company's domain, usable for phishing or hosting malicious content, with possible stored XSS through a widget (not confirmed). Medium severity, 4.9, $300.
- Crusade Auditor / The Vulnerable Customer: hosting arbitrary images on the customer domain, open redirect usable to bypass CSP on
accounts.vulnerablecustomer.com, one-click stored XSS in IE11 and Edge, clickjacking, and a fully customisable fake login form that delivers credentials, GeoIP location and IP address to the attacker. Closed as Informative on HackerOne; still exploitable while the Bugcrowd report was open. - Help Scout: reading private articles of any Help Scout customer, and across the 3766 enumerated subdomains, obtaining credentials, sensitive documents, internal diagrams and process documentation. No reward.
- ReadMe: reading and modifying documentation in Not Yet Active, Project Members Only and Password Protected projects. $250.
All of this requires the attacker to hold a valid account on the same provider, and the victim to serve the provider on a custom domain (or, for ReadMe, to rely on the project visibility settings).
Fix
Help Scout notified customers on 30 October. ReadMe fixed it after escalation. Geckoboard said the custom domain capability was a "function of the system" and was being removed anyway. The post does not describe the code changes any of them made.
What the behaviour calls for: tie the session to the tenant it was issued for, for example by checking the cookie against the hostname on every request, or by issuing host-only cookies per tenant so a cookie from one host is never sent to another. Enforce authorisation on the server for every visibility level rather than relying on the hostname, and do not let client-supplied Domain attributes decide which tenant a session belongs to. On the form features, validate the policy URL fields server-side against an allowlist of schemes, and send X-Frame-Options (or a frame-ancestors CSP) on pages that accept input.
Variants to test
- CNAME sweep for shared SaaS hosts. Search a passive DNS dataset for CNAMEs to the provider's shared host, as done here with
egrep '"type":"cname","value":".*geckoboard.com"}'. A positive result is a list of customer domains you can test with your own trial account. - Cookie name comparison across hosts. Register a trial, load both the provider host and a customer host, and compare cookie names and values. Identical session cookies on both hosts is the precondition.
- Domain attribute rewrite. Change the cookie's
Domainto the victim host and reload. A positive result is your own account's content rendered under the victim's hostname, or access to content you should not see. - Write versus read separation. Try an edit action as well as a read action, as with "Edit this Article" versus the private article. A redirect to an error page on write but successful reads still means data exposure.
- Visibility levels. On documentation platforms, create projects in each state (Not Yet Active, Members Only, Password Protected) and try each from the attacker session. Any state that renders instead of prompting is a finding.
- Custom form fields. On any customisable form, intercept the request and try
javascript:alert(document.domain)in URL fields. Check the anchor forrel="noopener"to judge browser reach, and check forX-Frame-Optionsto judge clickjacking. - Credential capture via form reuse. Build a form that mimics a login page and confirm whether submitted values arrive in the attacker's account or email, including any metadata such as GeoIP and IP address.
Glossary
- Cookie: a small piece of text a website asks your browser to store and send back on later visits, used to remember who you are.
- Session cookie: a cookie that identifies a logged-in session; it usually holds a long random value.
- Domain attribute: the cookie setting that says which hostnames the browser may send the cookie to.
- Subdomain: a name under a main domain, such as
dashboardindashboard.example.com. - CNAME: a DNS record saying one name is an alias for another name.
- DNS: the internet's name-to-address lookup system.
- SaaS: software you use over the internet rather than installing on your own machine.
- Bug bounty programme: a scheme where a company pays outsiders for reporting security problems.
- Private programme: a bug bounty programme open only to invited researchers.
- Public programme: a bug bounty programme open to anyone.
- Severity: a rough measure of how bad a security issue is.
- CVSS: a standard scoring system for severity; 4.9 is medium.
- Subdomain takeover: claiming an abandoned DNS name that still points at an outside service, so you can serve content under someone else's subdomain.
- Amass and SubFinder: tools that enumerate subdomains.
- tko-subs: a tool that checks a list of subdomains for takeover.
- Project Sonar: a public collection of internet scan data, including DNS records, published by Rapid7.
- egrep: a command-line search tool that prints lines matching a pattern.
- JSON: a text format for structured data, made of names and values in braces.
- Stored XSS: cross-site scripting where the malicious script is saved on the server and runs for every visitor.
- XSS: cross-site scripting; getting a site to run JavaScript its owners did not write.
- Content-security-policy: rules a site sends to the browser listing which sources of content are allowed.
- Open redirect: a page on a trusted site that will send visitors on to any other address an attacker chooses.
- Client-side filtering: checks done in the browser, which the attacker controls and can bypass.
- HTTP request: the message a browser sends to a server to ask for a page or submit data.
javascript:URL: a link whose target is JavaScript code rather than a page; following it runs the code.rel="noopener": a link attribute that stops the opened page from getting a handle on the page that opened it.X-Frame-Options: a response header saying whether a page may be shown inside a frame on another site.- Clickjacking: loading a victim site invisibly in a frame and placing your own buttons on top so the victim clicks the wrong thing.
- Phishing: tricking someone into handing over details, often with a fake login page.
- GeoIP: guessing a visitor's location from their IP address.
- IP address: the number that identifies a connection on the internet.
- Informative: a report status meaning the report was read but judged not to be a security issue worth acting on.
- Duplicate: a report of an issue somebody else already reported.
- Multi-tenant: one system serving many separate customers with their data kept apart.
- Proof of concept (PoC): a small demonstration that an attack works.
- Tenant: one customer's separate space inside a shared service.