Skip to content
Misconfiguration Disclosed report Beginner

Exposed Cortex API at https://cortex-ingest.shopifycloud.com/

A Cortex metrics server was exposed without authentication, allowing anyone to view its configuration and access a Golang pprof debugger. An attacker could read command-line arguments and potentially cause a denial of service.

ian Follow

Originally disclosed on HackerOne

Bounty$6,300 Medium 5.7 View original
  • Triaged in 18 hours
  • Fixed in 16 days
  • Paid in 10 days
  • Disclosed after 17 months

Summary by the program

@ian found a misconfigured cortex instance that was unintentionally available without employee authentication. Our team has deployed a fix and put the instance behind authentication within the first 24 hours of receiving the report.

The report

Hi there, to be honest this is the first time I have seen this type of asset, but I think it is interesting/not supposed to be exposed. There is a Cortex metrics server running without authentication on https://cortex-ingest.shopifycloud.com/. This allows us to see the config for the server, call various Cortex APIs, and also exposes a Golang pprof debugger where we can see all the command-line arguments and DoS the server.

Example URLs:

I see that the Cortex API offers many endpoints, some of which work and some of which do not: https://cortexmetrics.io/docs/api/#endpoints. I will take a look and see what impact I can find there.

Impact

Information disclosure, no authentication

The original report as published on HackerOne, by ian. 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. 4 min read.

Context

Cortex is an open-source, horizontally scalable, long-term storage backend for Prometheus metrics. It exposes an HTTP API for ingesting and querying metrics, a /config endpoint that renders the running configuration, and, because it is written in Go, the standard net/http/pprof debug handlers under /debug/pprof/.

The asset in this report is a Cortex instance on the *.shopifycloud.com wildcard, at https://cortex-ingest.shopifycloud.com/. The name suggests an ingest-facing deployment, but the report does not describe the internal architecture or what data the instance held. What matters is that the instance was reachable from the internet without employee authentication, which is not how an internal metrics service should behave.

Setup

The report describes no accounts, roles, tooling or versions. The report does not describe the tooling used to reach the host. The only precondition is network access to the public hostname.

Finding it

The researcher says this was the first time they had encountered this type of asset, and that it looked like something that should not be exposed. The researcher identified the Cortex server as running without authentication on the public hostname. From there, the standard Cortex and Go debug paths were reachable, which confirmed that the deployment was not sitting behind an authentication layer.

Exploitation

Step 1: Confirm the Cortex instance is unauthenticated

The researcher requested the Cortex home page:

The response is not reproduced in the report. The report lists the Cortex home page as one of the reachable URLs.

Step 2: Read the server configuration

The configuration endpoint was also reachable:

Cortex serves its running configuration at /config. The report does not reproduce the contents, but notes that this endpoint lets a visitor see the configuration for the server. Configuration files for metrics infrastructure commonly describe storage backends, limits and cluster topology, so this is a direct information disclosure primitive.

Step 3: Reach the Go pprof debugger

The Go runtime's profiling handlers were exposed as well:

This is the pprof index page. Because the service is written in Go and imports net/http/pprof, these handlers are registered on the default mux unless the deployment removes them.

Step 4: Read the process command line

The most sensitive pprof endpoint in this context is cmdline, which returns the arguments the process was started with:

The researcher notes that this exposes all of the command-line arguments of the running process.

Step 5: Assess the wider Cortex API surface

The researcher then looked at the Cortex API documentation, which lists many endpoints, and observed that some of them worked against this instance while others did not. The report does not enumerate which endpoints responded and which did not, and does not describe any further exploitation beyond the four URLs above. The stated plan was to keep looking for impact across that API surface.

Root cause

The instance was deployed without an authentication layer in front of it. Here, none of those controls were in place, so the Cortex UI, /config and the Go pprof handlers were all reachable by anyone on the internet.

Impact

The report classifies the issue as information disclosure with no authentication. Concretely, an unauthenticated visitor could:

  • view the server configuration via /config;
  • call various Cortex APIs, some of which worked and some of which did not;
  • read the process command-line arguments through the pprof cmdline endpoint;
  • reach the pprof debugger, which the researcher notes could be used to DoS the server.

The DoS claim is the researcher's assessment; the report does not include a demonstration of it. The scope of what the exposed configuration and arguments contained is not described, so the sensitivity of the disclosed information cannot be judged from the report alone.

Fix

The program states that its team deployed a fix and put the instance behind authentication within the first 24 hours of receiving the report.

Variants to test

  • Other Cortex or Prometheus-compatible deployments on wildcard domains. Request /config and /debug/pprof/ on hosts whose names suggest metrics ingestion or querying. A positive result is configuration content or the pprof index rather than a login page.
  • /debug/pprof/cmdline?debug=1 on any Go service. Many Go applications import net/http/pprof for convenience. A positive result is the argument list of the running process.
  • Other Go debug endpoints. /debug/pprof/goroutine?debug=1, /debug/pprof/heap and /debug/pprof/profile are part of the same handler set; if the index is reachable, these usually are too. The report does not test these, so treat them as follow-ups rather than confirmed findings.
  • Cortex API endpoints from the documentation. The researcher observed that some documented endpoints worked and some did not. Enumerating them on a similar host and recording which respond without authentication gives a map of the exposed surface.

Hunting notes

This kind of bug tends to hide on infrastructure hostnames that are not part of the main product: metrics ingestion, query frontends, internal tooling and anything on a cloud wildcard such as *.shopifycloud.com. During recon, the useful signals are hostnames whose names imply a backend service, and responses that return framework default pages (the Cortex UI, the pprof index) instead of a login form or a generic 403. A quick probe of /config and /debug/pprof/ on such hosts costs little and distinguishes an authenticated deployment from an open one.

The report itself is short: the researcher demonstrated reachability of four endpoints and described what each one exposes, and the program accepted it as a medium-severity misconfiguration with a 6,300 USD bounty. The report describes information disclosure with no authentication.

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. 9 min read.

What happened, in plain words

A security researcher found a web server belonging to Shopify that was supposed to be private but was open to anyone on the internet. The server runs a piece of software called Cortex, which stores measurements (metrics) collected from other systems. Nobody had put a login in front of it, so a stranger could simply open it in a browser.

Once inside, a visitor could read the server's settings, poke at the various functions the software offers, and reach a built-in debugging area that Go programs carry. That debugging area can reveal how the program was started and, according to the researcher, can also be used to overload the server. Shopify's team fixed it and put the server behind authentication within a day of receiving the report.

This article walks through the same steps the researcher took, explaining each idea from scratch.

Context

What Cortex is

Cortex is free, open-source software. Its job is to store metrics for the long term. A metric is just a number recorded over time with a label, for example how many requests a website received each minute, or how much memory a server is using. A related tool called Prometheus collects those numbers; Cortex is a place to keep them at scale, spread across many machines.

Cortex speaks over HTTP, the same protocol your browser uses to load web pages. It offers an HTTP API. An API (application programming interface) is a set of addresses a program exposes so that other programs can ask it to do things or give it data. Think of a restaurant: the menu is the API, the kitchen is the software, and you order by naming a dish. Here the "dishes" are web addresses such as /config.

Cortex also has two features that matter for this story:

  • A /config address that shows the configuration the server is currently running with. Configuration is the set of settings that tell the software where to store data, what limits to apply and how the cluster is arranged.
  • Because Cortex is written in Go (a programming language), it can carry Go's standard debugging handlers under /debug/pprof/. These are diagnostic pages that the Go runtime provides so developers can inspect a running program.

The asset

The server in question lives at https://cortex-ingest.shopifycloud.com/, which is one hostname under the wildcard domain *.shopifycloud.com. A wildcard like that means any name ending in shopifycloud.com can exist, and companies often use such domains for internal infrastructure rather than for the public shop. The name suggests a server that receives (ingests) metrics, but the report does not describe the internal setup or what data the server held. The important part is simple: the server could be reached from the internet without any employee login, which is not how an internal metrics service should behave.

Setup

The report mentions no accounts, roles, tools or software versions. The report does not describe the tooling used to reach the host. HTTPS is the encrypted version of HTTP, the one with the padlock in your browser. No credentials, special headers or configuration were needed. The only precondition was being able to reach the public hostname from the internet.

Finding it

The researcher says this was the first time they had come across this kind of asset, and that it looked like something that should not be exposed. The researcher identified the Cortex server as running without authentication on the public hostname. From there, the usual Cortex and Go debugging addresses were reachable too, which confirmed that nothing was standing in front of the service asking visitors to identify themselves.

Exploitation

Step 1: Confirm the Cortex instance is unauthenticated

The researcher requested the Cortex home page:

Line by line:

  • GET / HTTP/1.1 is a request for the root page of the site, the same thing your browser asks for when you type a domain name and press Enter. GET means "give me this", / means "the main page", and HTTP/1.1 is the version of the protocol being used.
  • Host: cortex-ingest.shopifycloud.com tells the server which website you are asking for. One physical server can host many sites, so this line says which one you mean.

The response is not shown in the report. The report lists the Cortex home page as one of the reachable URLs.

Step 2: Read the server configuration

The configuration address was reachable as well:

Line by line:

  • GET /config asks for the page that lists the server's current settings.
  • Host: cortex-ingest.shopifycloud.com again names the site being asked.

Cortex serves its running configuration at /config. The report does not reproduce what that page contained, but notes that it lets a visitor see the configuration of the server. Settings for metrics infrastructure commonly describe where data is stored, what limits apply and how the machines are arranged, so this is a direct leak of information. A useful comparison: it is like finding the maintenance cupboard of a building unlocked, with the wiring diagram and the list of rooms inside.

Step 3: Reach the Go pprof debugger

The Go profiling handlers were exposed too:

Line by line:

  • GET /debug/pprof/ asks for the index page of Go's built-in debugging area. "pprof" is the name of Go's profiling tool; profiling means measuring what a running program is doing, such as which functions use the most memory or processor time.
  • Host: cortex-ingest.shopifycloud.com names the site.

This is the index page of Go's built-in debugging area. Because the service is written in Go and includes the standard net/http/pprof package, these handlers are switched on by default unless the people deploying the software deliberately remove them. A package, in programming, is a bundle of ready-made code that a program can reuse.

Step 4: Read the process command line

The most sensitive debugging address in this situation is cmdline, which returns the arguments the program was started with:

Line by line:

  • GET /debug/pprof/cmdline asks for the command line of the running program, meaning the exact instruction that launched it, including every option passed to it.
  • ?debug=1 is a parameter appended to the address. Parameters are extra instructions sent with a request, a bit like ticking a box on a form. Here it asks for the human-readable version of the output.

The researcher notes that this exposes all of the command-line arguments of the running process.

Step 5: Assess the wider Cortex API surface

The researcher then looked at the Cortex API documentation, which lists many addresses, and observed that some of them worked against this server while others did not. The report does not list which ones responded and which did not, and describes no further exploitation beyond the four addresses above. The stated plan was to keep looking for impact across that API surface.

Root cause

The server was deployed without an authentication layer in front of it. Authentication means proving who you are, usually with a username and password or a token. Here, none of those controls were in place, so the Cortex interface, /config and the Go debugging handlers were all reachable by anyone on the internet.

A listener is the part of a program that waits for incoming connections.

Impact

The report classifies the issue as information disclosure with no authentication. Information disclosure means private information can be read by someone who should not see it. Concretely, an unauthenticated visitor could:

  • view the server configuration via /config;
  • call various Cortex APIs, some of which worked and some of which did not;
  • read the process command-line arguments through the pprof cmdline endpoint;
  • reach the pprof debugger, which the researcher notes could be used to DoS the server.

DoS stands for denial of service: making a service so busy or so overloaded that legitimate users can no longer use it. The DoS claim is the researcher's assessment; the report does not include a demonstration of it. The report also does not describe what the exposed configuration and arguments contained, so the sensitivity of the leaked information cannot be judged from the report alone.

Fix

The program states that its team deployed a fix and put the server behind authentication within the first 24 hours of receiving the report.

Variants to test

These are follow-up ideas in the same spirit, not confirmed findings from the report.

  • Other Cortex or Prometheus-compatible deployments on wildcard domains. Request /config and /debug/pprof/ on hosts whose names suggest metrics ingestion or querying. A positive result is configuration content or the debugging index rather than a login page.
  • /debug/pprof/cmdline?debug=1 on any Go service. Many Go applications include net/http/pprof for convenience.
  • Other Go debug endpoints. /debug/pprof/goroutine?debug=1, /debug/pprof/heap and /debug/pprof/profile belong to the same set of handlers; if the index is reachable, these usually are too. The report does not test these, so treat them as follow-ups rather than confirmed findings.
  • Cortex API endpoints from the documentation. The researcher observed that some documented endpoints worked and some did not. Going through them on a similar host and noting which respond without authentication gives a map of what is exposed.

Hunting notes

This kind of bug tends to hide on infrastructure hostnames that are not part of the main product: metrics ingestion, query frontends, internal tooling and anything on a cloud wildcard such as *.shopifycloud.com. During reconnaissance (the early stage of looking around for targets), the useful signals are hostnames whose names imply a backend service, and responses that return a framework's default pages (the Cortex interface, the debugging index) instead of a login form or a generic refusal. A quick check of /config and /debug/pprof/ on such hosts costs little and separates a protected deployment from an open one.

The report itself is short: the researcher demonstrated that four addresses were reachable and described what each one exposes, and the program accepted it as a medium-severity misconfiguration with a 6,300 USD bounty. The report describes information disclosure with no authentication.

Glossary

  • API: a set of addresses a program exposes so other programs can ask it to do things or give it data.
  • Authentication: proving who you are, usually with a username and password or a token.
  • Command line: the exact instruction, including all options, used to start a program.
  • Configuration: the settings that tell software how to behave, such as where to store data and what limits to apply.
  • Cortex: open-source software for storing metrics for the long term, spread across many machines.
  • DoS (denial of service): making a service so overloaded that legitimate users can no longer use it.
  • Go: a programming language; programs written in it can carry built-in debugging handlers.
  • HTTP: the protocol browsers and programs use to request and receive web content.
  • HTTPS: HTTP with encryption, shown by the padlock in a browser.
  • Information disclosure: a flaw that lets someone read private information they should not see.
  • Listener: the part of a program that waits for incoming network connections.
  • Metric: a number recorded over time with a label, such as requests per minute or memory in use.
  • Misconfiguration: a setting or deployment choice that leaves a system less protected than intended.
  • Package: a bundle of ready-made code a program can reuse.
  • Parameter: an extra instruction appended to a web address, such as ?debug=1.
  • pprof: Go's built-in profiling and debugging tool, reachable under /debug/pprof/.
  • Prometheus: a tool that collects metrics; Cortex stores metrics for it at scale.
  • Reverse proxy: a server that sits in front of the real one and checks visitors before letting them through.
  • Wildcard domain: a domain setting that allows any name ending in it, such as *.shopifycloud.com.

More by ian

View all

16 more disclosed reports, best first.

More from Shopify

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.