Skip to content
Info disclosure Disclosed report Beginner

Common response suggestion is sent to Google Analytics when user accepts duplicate comment Genius suggestion

The referrer-policy header on the hacktivity page was set to strict-origin-when-cross-origin, but when a user clicked a link to the blog on a different origin, the full URL of the hacktivity page was sent in the referer header. This could leak the URL path, including filter parameters, to a third-party hosted site.

bigbug Follow

Originally disclosed on HackerOne

Bounty$500 Low 2.6 View original
  • Triaged in 3 days
  • Fixed in 39 days
  • Paid in 24 days
  • Disclosed after 41 days

Summary

It was found that although the referrer-policy header for https://hackerone.com/hacktivity was set to strict-origin-when-cross-origin , a request to https://www.hackerone.com/blog contains full url path of the the hackivity page as the referer header eg. https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever. The www.hackerone.com being hosted on a third party, this can lead to private url information being passed to third party.

Description

A referrer policy header is set on all pages including /hacktivity to strict-origin-when-cross-origin wherein the full path of the url will be set as the referer only if the request is same-origin. But it was seen that although this header being set at /hacktivity page, it still sends a full url to an different origin ie www.hackerone.com. www.hackerone.com being hosted on a third party and also even after setting the referrer-policy header the hacktivity page sends full url in the referer header. This is something serious here.

Steps to reproduce

  • Sign-in to hackerone.
  • Start a web debugging proxy like burp to capture the request.
  • Click on hacktivity tab - https://hackerone.com/hacktivity. The url will contain filter parameters that are set default eg https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever. This is the popular hackivity page with default filters. capture the request and response. The response looks like this.
date:                              Tue, 12 Dec 2017 05:42:21 GMT
content-type:                      text/html; charset=utf-8
cache-control:                     private, no-cache, no-store, must-revalidate
content-disposition:               inline; filename="response.html"
x-request-id:                      d7905553-8780-4731-93b8-021b4761817a
set-cookie:                        __Host-session=<Redacted value>; path=/; secure; HttpOnly
strict-transport-security:         max-age=31536000; includeSubDomains; preload
expect-ct:                         enforce, max-age=86400
content-security-policy:           <Redacted as long for clarity>
referrer-policy:                   strict-origin-when-cross-origin
x-content-type-options:            nosniff
x-download-options:                noopen
x-frame-options:                   DENY
x-permitted-cross-domain-policies: none
x-xss-protection:                  1; mode=block
server:                            cloudflare-nginx
cf-ray:                            3cbe5c199a952db5-BOM
content-encoding:                  gzip```

**Note** - If we look at the `referrer-policy:` header it is set to `strict-origin-when-cross-origin`.

+ Click on `blog` link at the bottom of the page and capture the request. The request looks like this. 

```:method:         GET
:path:           /blog
:authority:      www.hackerone.com
:scheme:         https
user-agent:      Mozilla/5.0 (Windows NT 6.3; rv:46.0) Gecko/20100101 Firefox/46.0
accept:          text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate, br
referer:         https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever
cookie:          <Redacted cookie values>
if-none-match:   "1513035467"```

**Note** - The `referer:` header contains the full url path inspite of referrer-policy header being set to strict-origin-when-cross-origin. This is a security violation as www.hackerone.com is not a `same-origin` and also hosted on a third party.

## Impact

The hackivity url does not contain any private or hidden paths. But even after a strict header being set, this behaviour is a threat as it violates the policy. If a header is set, the policy must be followed and enforced. This is to be ensured for better security.

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

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

HackerOne's public hacktivity page at https://hackerone.com/hacktivity lists disclosed reports and other activity. When you open it without choosing filters, the page applies a default set: the URL becomes https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever, which is the popular view with all types, page one, all time. At the bottom of the page there is a link to the blog, which lives on a different origin, https://www.hackerone.com/blog. That blog is hosted on a third party.

The application sets a referrer-policy header on its pages, including /hacktivity, with the value strict-origin-when-cross-origin. Under that policy, a browser should send the full URL as the referer only for same-origin requests; for cross-origin requests it should send only the origin. The report is about the browser sending the full URL, query string included, as the referer to the blog on the other origin anyway.

Setup

  • A signed-in HackerOne account.
  • A web debugging proxy such as Burp to capture requests and responses.
  • A browser, in this case Firefox 46.0 on Windows NT 6.3, as shown in the captured request.

No special role or privilege is needed beyond being signed in.

Finding it

The researcher compared the referrer-policy header returned by the hacktivity page with the referer header actually sent when following the blog link. The policy says strict-origin-when-cross-origin, yet the request to www.hackerone.com carried the full hacktivity URL, including its filter parameters, as the referrer. Since www.hackerone.com is a different origin and is hosted on a third party, the full URL of the hacktivity page was being passed to that third party. That is the discrepancy: a policy was declared but not honoured.

Exploitation

Step 1: Sign in and start the proxy

Sign in to HackerOne and start a web debugging proxy such as Burp so that requests and responses can be captured.

Step 2: Open the hacktivity page and capture the response

Click the hacktivity tab at https://hackerone.com/hacktivity. The URL contains the default filter parameters:

Text
https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever

This is the popular hacktivity page with default filters. Capture the request and response. The response headers look like this:

HTTP
:status:                           200
date:                              Tue, 12 Dec 2017 05:42:21 GMT
content-type:                      text/html; charset=utf-8
cache-control:                     private, no-cache, no-store, must-revalidate
content-disposition:               inline; filename="response.html"
x-request-id:                      d7905553-8780-4731-93b8-021b4761817a
set-cookie:                        __Host-[redacted] value>; path=/; secure; HttpOnly
strict-transport-security:         max-age=31536000; includeSubDomains; preload
expect-ct:                         enforce, max-age=86400
content-security-policy:           <Redacted as long for clarity>
referrer-policy:                   strict-origin-when-cross-origin
x-content-type-options:            nosniff
x-download-options:                noopen
x-frame-options:                   DENY
x-permitted-cross-domain-policies: none
x-xss-protection:                  1; mode=block
server:                            cloudflare-nginx
cf-ray:                            3cbe5c199a952db5-BOM
content-encoding:                  gzip

The important line is referrer-policy: strict-origin-when-cross-origin. The response also sets the session cookie with the __Host- prefix, Secure and HttpOnly, and returns a strict transport security header, a content security policy, and the usual anti-sniffing and framing headers.

Step 3: Follow the blog link and capture the request

Click the blog link at the bottom of the page and capture the request. It looks like this:

HTTP
:method:         GET
:path:           /blog
:authority:      www.hackerone.com
:scheme:         https
user-agent:      Mozilla/5.0 (Windows NT 6.3; rv:46.0) Gecko/20100101 Firefox/46.0
accept:          text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate, br
referer:         https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever
cookie:          <Redacted cookie values>
if-none-match:   "1513035467"

The request goes to a different authority, www.hackerone.com, over HTTPS. The referer header contains the full hacktivity URL, query string and all, even though the page that linked to it declared strict-origin-when-cross-origin. Because www.hackerone.com is not the same origin as hackerone.com and is hosted on a third party, the full path and parameters of the hacktivity page reach that third party.

Root cause

The report does not identify the code or configuration responsible. What it establishes is the observable mismatch: the referrer-policy header is present on the hacktivity response with the value strict-origin-when-cross-origin, yet the browser sends the full URL as the referrer on a cross-origin navigation to www.hackerone.com. Under the declared policy, a cross-origin request should carry only the origin, so the behaviour contradicts the header.

Why the existing defence did not take effect is not determined in the report. The researcher's point is that if a header is set, the policy must be followed and enforced, and this needs to be ensured for better security.

Impact

The hacktivity URL in this case does not contain any private or hidden paths; the parameters shown are the default filters. The concern is therefore not the disclosure of sensitive data in this specific URL, but the violation of the declared policy: if a header is set, the policy must be followed and enforced. The report rates this as a threat on that basis rather than as a demonstrated leak of secrets.

Fix

The report does not describe a fix or a change made in response. It states that if a header is set, the policy must be followed and enforced.

Variants to test

  • Check other pages that declare referrer-policy and link to a different origin. A positive result is a cross-origin request whose referer contains the full path and query string despite the header.
  • Check links to third-party hosted subdomains or marketing sites, which are common cross-origin destinations. A positive result is the full source URL appearing in the referer of the request to that host.
  • Check pages whose URLs carry identifiers, tokens or filter values in the query string. A positive result is those values arriving at the third party in the referer header.
  • Compare the policy value in the response with the referrer actually sent for same-origin and cross-origin navigations separately, since strict-origin-when-cross-origin treats the two differently.

Hunting notes

This kind of bug hides at the boundary between a first-party application and anything it links to on another origin, especially third-party hosted blogs, help centres and marketing sites. During recon, look for pages that set a referrer-policy header and then follow their outbound links through a proxy, comparing the declared policy with the referer actually sent. The signal is a header that promises origin-only on cross-origin requests while the captured request shows the full URL.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 12 min read.

What happened, in plain words

HackerOne runs a public page called hacktivity at https://hackerone.com/hacktivity. It is a feed of disclosed bug reports and other activity, so anyone can browse it. At the bottom of that page there is a link to the HackerOne blog, which lives at https://www.hackerone.com/blog. The blog is not run on HackerOne's own servers: it is hosted by a third party, meaning another company runs the machines that serve it.

When your browser moves from one page to another, it can tell the destination page where you came from. It does this with a small piece of information called the referer header (the spelling with one "r" is the historical one used in the protocol). Think of it like a visitor signing a guest book at the door: the new page can see which page sent you.

A website can control how much of that information the browser shares, using a setting called the referrer policy. HackerOne set this policy on the hacktivity page to a value called strict-origin-when-cross-origin. In plain terms, that value says: if the next page is on the same site, the browser may share the full address; if the next page is on a different site, the browser should share only the site name, not the full address with all its details.

The researcher found that this did not happen. When they clicked the blog link, the browser sent the full hacktivity address, including all the filter settings in it, to www.hackerone.com. Since that blog is on a different site and is hosted by a third party, the full address of the hacktivity page was being handed to that third party. The page had promised one behaviour and delivered another.

Context

The hacktivity page lists disclosed reports and other activity. If you open it without choosing any filters, the page fills in a default set for you, and the address in your browser bar becomes:

Text
https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever

Everything after the ? is called the query string. It is a list of settings, each written as a name and a value joined by =, with & between them. Here they mean: sort by popular, include all types, show page one, cover all time. This is simply the popular view with the default filters.

At the bottom of the page there is a link to the blog, which lives on a different origin, https://www.hackerone.com/blog. An origin is the combination of scheme (here https), host name (here www.hackerone.com versus hackerone.com) and port. Two addresses with different host names are different origins even if they belong to the same company. That blog is hosted on a third party.

The application sets a referrer-policy header on its pages, including /hacktivity, with the value strict-origin-when-cross-origin. A header is a line of extra information that a web server sends along with a page, or that a browser sends along with a request. Under that policy, a browser should send the full URL as the referer only for same-origin requests; for cross-origin requests it should send only the origin. The report is about the browser sending the full URL, query string included, as the referer to the blog on the other origin anyway.

Setup

  • A signed-in HackerOne account.
  • A web debugging proxy such as Burp to capture requests and responses.
  • A browser, in this case Firefox 46.0 on Windows NT 6.3, as shown in the captured request.

A web debugging proxy is a program that sits between your browser and the internet. Your browser sends its requests to the proxy, the proxy shows you exactly what was sent and what came back, and then passes it on. It is like a post office that opens every letter, copies it for you, and then delivers it. Burp is one such program.

No special role or privilege is needed beyond being signed in.

Finding it

The researcher compared the referrer-policy header returned by the hacktivity page with the referer header actually sent when following the blog link. The policy says strict-origin-when-cross-origin, yet the request to www.hackerone.com carried the full hacktivity URL, including its filter parameters, as the referrer. Since www.hackerone.com is a different origin and is hosted on a third party, the full URL of the hacktivity page was being passed to that third party. That is the discrepancy: a policy was declared but not honoured.

Exploitation

Step 1: Sign in and start the proxy

Sign in to HackerOne and start a web debugging proxy such as Burp so that requests and responses can be captured.

Step 2: Open the hacktivity page and capture the response

Click the hacktivity tab at https://hackerone.com/hacktivity. The URL contains the default filter parameters:

Text
https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever

This is the popular hacktivity page with default filters. Capture the request and response. The response headers look like this:

HTTP
:status:                           200
date:                              Tue, 12 Dec 2017 05:42:21 GMT
content-type:                      text/html; charset=utf-8
cache-control:                     private, no-cache, no-store, must-revalidate
content-disposition:               inline; filename="response.html"
x-request-id:                      d7905553-8780-4731-93b8-021b4761817a
set-cookie:                        __Host-[redacted] value>; path=/; secure; HttpOnly
strict-transport-security:         max-age=31536000; includeSubDomains; preload
expect-ct:                         enforce, max-age=86400
content-security-policy:           <Redacted as long for clarity>
referrer-policy:                   strict-origin-when-cross-origin
x-content-type-options:            nosniff
x-download-options:                noopen
x-frame-options:                   DENY
x-permitted-cross-domain-policies: none
x-xss-protection:                  1; mode=block
server:                            cloudflare-nginx
cf-ray:                            3cbe5c199a952db5-BOM
content-encoding:                  gzip

Line by line, in plain words:

  • :status: 200 means the server answered successfully; 200 is the standard code for "here is the page".
  • date: is the moment the server produced the response.
  • content-type: says the body is an HTML page in UTF-8 character encoding, so the browser knows how to display it.
  • cache-control: tells browsers and caches not to store this page, because it is private to the user.
  • content-disposition: suggests a filename if the response were saved as a file.
  • x-request-id: is a unique label for this one request, useful when tracing problems in logs.
  • set-cookie: asks the browser to store a cookie, a small piece of data the browser sends back on later requests so the site can recognise you. This one is the session cookie, which is what keeps you logged in. The __Host- prefix is a naming rule that makes browsers enforce extra safety on that cookie; secure means it is only sent over HTTPS; HttpOnly means page scripts cannot read it. The value itself is redacted here.
  • strict-transport-security: tells the browser to always use HTTPS for this site for the stated time, including subdomains.
  • expect-ct: relates to certificate transparency, a system for publicly logging HTTPS certificates.
  • content-security-policy: is a long list of rules about which scripts and resources the page may load; it is redacted here for length.
  • referrer-policy: strict-origin-when-cross-origin is the line that matters. It is the promise about how much address information the browser may share when you leave this page.
  • x-content-type-options: nosniff stops the browser from guessing that a file is a different type than declared.
  • x-download-options: noopen tells Internet Explorer not to open downloaded files directly.
  • x-frame-options: DENY stops other sites from embedding this page inside a frame.
  • x-permitted-cross-domain-policies: none restricts old-style cross-domain policy files.
  • x-xss-protection: 1; mode=block turns on an old browser filter against cross-site scripting and tells it to block rather than sanitise.
  • server: names the web server software in use.
  • cf-ray: is an identifier added by Cloudflare, a content delivery network that sits in front of the site.
  • content-encoding: gzip says the body was compressed to save bandwidth and should be decompressed by the browser.

The important line is referrer-policy: strict-origin-when-cross-origin. The response also sets the session cookie with the __Host- prefix, Secure and HttpOnly, and returns a strict transport security header, a content security policy, and the usual anti-sniffing and framing headers.

Step 3: Follow the blog link and capture the request

Click the blog link at the bottom of the page and capture the request. It looks like this:

HTTP
:method:         GET
:path:           /blog
:authority:      www.hackerone.com
:scheme:         https
user-agent:      Mozilla/5.0 (Windows NT 6.3; rv:46.0) Gecko/20100101 Firefox/46.0
accept:          text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
accept-language: en-US,en;q=0.5
accept-encoding: gzip, deflate, br
referer:         https://hackerone.com/hacktivity?sort_type=popular&filter=type%3Aall&page=1&range=forever
cookie:          <Redacted cookie values>
if-none-match:   "1513035467"

Line by line, in plain words:

  • :method: GET means the browser is asking to fetch a page, as opposed to sending data to the server.
  • :path: /blog is the part of the address after the host name, pointing at the blog section.
  • :authority: www.hackerone.com is the host the request is going to. Note that it differs from hackerone.com, which is what makes this a cross-origin request.
  • :scheme: https means the connection is encrypted with HTTPS.
  • user-agent: identifies the browser and operating system that made the request.
  • accept: lists the kinds of content the browser is willing to receive.
  • accept-language: says the browser prefers US English.
  • accept-encoding: lists the compression formats the browser can handle.
  • referer: is the key line. It tells the blog which page the visitor came from, and here it contains the full hacktivity address with all its filter settings, not just the site name.
  • cookie: carries the stored cookies back to the server; the values are redacted here.
  • if-none-match: lets the browser say "I already have a copy of this page from that version; only send it again if it has changed", which saves bandwidth.

The request goes to a different authority, www.hackerone.com, over HTTPS. The referer header contains the full hacktivity URL, query string and all, even though the page that linked to it declared strict-origin-when-cross-origin. Because www.hackerone.com is not the same origin as hackerone.com and is hosted on a third party, the full path and parameters of the hacktivity page reach that third party.

Root cause

The report does not identify the code or configuration responsible. What it establishes is the observable mismatch: the referrer-policy header is present on the hacktivity response with the value strict-origin-when-cross-origin, yet the browser sends the full URL as the referrer on a cross-origin navigation to www.hackerone.com. Under the declared policy, a cross-origin request should carry only the origin, so the behaviour contradicts the header.

Why the existing defence did not take effect is not determined in the report. The researcher's point is that if a header is set, the policy must be followed and enforced, and this needs to be ensured for better security. A useful comparison is a building that puts up a sign saying "staff only" but never locks the door: the sign alone changes nothing.

Impact

The hacktivity URL in this case does not contain any private or hidden paths; the parameters shown are the default filters. The concern is therefore not the disclosure of sensitive data in this specific URL, but the violation of the declared policy: if a header is set, the policy must be followed and enforced. The report rates this as a threat on that basis rather than as a demonstrated leak of secrets.

Fix

The report does not describe a fix or a change made in response. It states that if a header is set, the policy must be followed and enforced.

Variants to test

  • Check other pages that declare referrer-policy and link to a different origin. A positive result is a cross-origin request whose referer contains the full path and query string despite the header.
  • Check links to third-party hosted subdomains or marketing sites, which are common cross-origin destinations. A positive result is the full source URL appearing in the referer of the request to that host.
  • Check pages whose URLs carry identifiers, tokens or filter values in the query string. A positive result is those values arriving at the third party in the referer header.
  • Compare the policy value in the response with the referrer actually sent for same-origin and cross-origin navigations separately, since strict-origin-when-cross-origin treats the two differently.

Hunting notes

This kind of bug hides at the boundary between a first-party application and anything it links to on another origin, especially third-party hosted blogs, help centres and marketing sites. During recon, look for pages that set a referrer-policy header and then follow their outbound links through a proxy, comparing the declared policy with the referer actually sent. The signal is a header that promises origin-only on cross-origin requests while the captured request shows the full URL.

Glossary

  • Header: a line of extra information sent with a web request or response, such as the page type or a security setting.
  • Referer header: the part of a request that tells the destination page which page the visitor came from.
  • Referrer policy: a setting that tells the browser how much of the source address it may share when following a link.
  • strict-origin-when-cross-origin: a referrer policy value meaning full address for same-site links, only the site name for links to other sites.
  • Origin: the combination of scheme, host name and port that identifies a site; different host names mean different origins.
  • Same-origin / cross-origin: a request to the same origin as the page, versus a request to a different one.
  • Query string: the part of a URL after the ?, holding settings as name and value pairs separated by &.
  • Hacktivity page: HackerOne's public feed of disclosed reports and activity.
  • Third party: a company other than the site owner that runs some part of a service, such as a hosted blog.
  • Web debugging proxy: a program that sits between browser and internet and shows every request and response, such as Burp.
  • Cookie: a small piece of data a site asks the browser to store and send back on later requests, often used to keep you logged in.
  • Session cookie: the cookie that identifies your logged-in session.
  • __Host- prefix: a cookie naming rule that makes browsers enforce extra safety conditions on that cookie.
  • Secure: a cookie flag meaning the cookie is only sent over HTTPS.
  • HttpOnly: a cookie flag meaning page scripts cannot read the cookie.
  • HTTPS: the encrypted version of the web protocol.
  • Strict transport security: a header telling the browser to always use HTTPS for a site.
  • Content security policy: a header listing rules about which scripts and resources a page may load.
  • nosniff: a header value stopping the browser from guessing a file is a different type than declared.
  • x-frame-options: a header controlling whether other sites may embed the page in a frame.
  • x-xss-protection: an old browser setting against cross-site scripting.
  • Cloudflare: a content delivery network that sits in front of many sites.
  • gzip: a compression format used to shrink pages for transfer.
  • User agent: the header identifying the browser and operating system.
  • if-none-match: a request header asking the server to send the page only if it has changed since the stored version.
  • Redacted: removed or hidden, usually because the value is sensitive.
  • Recon: the early stage of security testing where you map out what a site does and where its boundaries are.

More by bigbug

View all

7 more disclosed reports, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.