Missing robots exclusion header for user uploads
User-uploaded text files on a CDN could be indexed by search engines because the server did not send an X-Robots-Tag header. An attacker could link to these files from external sites, causing them to appear in search results.
Originally disclosed on HackerOne
- Fixed in 18 days
- Paid in 18 days
- Disclosed after 19 days
Summary by the program
User uploaded text files can be linked from external websites and end up appearing in search engine result pages if you perform a search such as: site:*.irccloud-cdn.com ext:txt
It's not possible to completely prevent such listings on all search engines, but some search crawlers support the X-Robots-Tag header which can be used to indicate indexing is disallowed.
This header was added as a result of this report.
What the report shows
The target is IRCCloud's user upload feature, served from the asset range *.irccloud-cdn.com. The program's summary explains that text files uploaded by users can be linked from external websites and can then appear in search engine result pages. The example search given is:
site:*.irccloud-cdn.com ext:txt
The program's summary explains that some search crawlers support the X-Robots-Tag header, which can be used to indicate that indexing is disallowed, and that this header was added as a result of the report. The program notes that it is not possible to completely prevent listings on all search engines, but that some search crawlers support the X-Robots-Tag header, which can be used to indicate that indexing is disallowed. That header was added as a result of this report.
The report was filed by d0rkerdevil, rated low severity under the weakness category "Improper Access Control - Generic", and paid a bounty of 50.00 USD. It was disclosed on 2017-10-27.
Root cause
The report does not describe a root cause; it notes that the X-Robots-Tag header was added as a result of the report. Because the files are user supplied and publicly reachable by URL, any external page that links to one gives a crawler both a path to it and a reason to fetch it.
Impact
The impact is unwanted public discoverability of user uploaded content. Anyone can run a site-restricted search for text files on the CDN and see whatever the crawler has indexed. The program is careful about the limits here: no header can stop every search engine, and the fix only asks crawlers that support the directive to refrain from indexing. The report was rated low severity.
How this kind of bug works
Search engines discover content by following links and by crawling hosts they already know about. When a file is served from a shared CDN hostname, a single link from anywhere on the web can be enough for a crawler to find it, and a site: query then turns the index into a listing of everything the crawler has stored for that host. Crawlers honour a small set of conventions: robots.txt at the host root, the X-Robots-Tag HTTP response header, and HTML <meta name="robots"> tags. For non-HTML content such as text files, images or PDFs there is no markup to carry a meta tag, so the response header is the only per-file control available. The header applies to the response it is attached to, which makes it suitable for a CDN that serves arbitrary user files from paths the application does not control.
This class of issue arises whenever user content is published on a predictable, linkable host and the operator has not thought about indexing. It is a configuration gap, not a memory or logic flaw, and its severity depends entirely on what the content is and who expected it to stay quiet.
How to test for it
- Identify hosts that serve user supplied content: CDN hostnames, upload buckets, attachment endpoints, avatar and media paths. Recon tools that collect hostnames and response headers are useful here.
- Request a known user file directly and inspect the response headers for
X-Robots-Tag, and check the host root for arobots.txtthat disallows the relevant paths. - Run a site-restricted search against the host, filtering by file extension, to see whether content is already indexed. Try several extensions and both the bare host and subdomains.
- Confirm that the file is genuinely user controlled and publicly reachable without authentication, and that its URL is stable enough to be linked and crawled.
A positive result looks like an indexed user file on a host that returns no robots directive for it. Common false positives: the host already sends X-Robots-Tag: noindex, the root robots.txt disallows the path, the indexed page is a generic error or directory listing rather than user content, or the content is intentionally public and the program treats it as such. Search results can also lag behind configuration changes, so check the live headers rather than relying on the index alone.
How it is fixed
The program added the X-Robots-Tag header as a result of this report. Neither measure prevents a determined party from fetching a file they already have the URL for, so operators should also treat upload URLs as public and avoid relying on obscurity.
Hunting notes
This bug class hides wherever user content is served from infrastructure the application does not fully control: CDN domains, object storage buckets, attachment and export endpoints, and preview or thumbnail services. Recon signals include hostnames that differ from the main application domain, responses with content types such as text/plain, application/pdf or images served without an application session, and directory-style paths containing identifiers. Comparing headers between the main site and the CDN often shows the gap.
Explain what kind of content the files hold and why listing them matters, without overstating it: as this report shows, a header only asks cooperating crawlers to stay away, and programs rate the issue accordingly.
What happened, in plain words
IRCCloud is a service where people connect to chat networks through a web client. Part of the product lets users upload files, and those files are stored and served from a separate set of servers called a CDN (content delivery network), under hostnames ending in irccloud-cdn.com. A CDN is a network of servers that hands out files quickly to visitors; think of it as a public warehouse where each file has its own address.
The problem the report describes is that text files uploaded by users can be linked from external websites and end up appearing in search engine result pages. Once indexed, the file shows up in search results. The program gave this example search, which anyone can type into a search engine:
site:*.irccloud-cdn.com ext:txt
Line by line: site: restricts the results to one website or set of hostnames, here every subdomain of irccloud-cdn.com because of the *. wildcard. ext:txt asks only for files with the .txt extension. Together the query lists text files that the search engine has already stored for that CDN. Running it is a way to see what is publicly discoverable, without guessing any URLs.
The program added a response header as a result of this report. When a browser or a crawler asks a server for a file, the server answers with the file plus a set of headers: short labelled lines of metadata about the response. One of those headers, X-Robots-Tag, is a message to search engine crawlers. The program explains that it is not possible to completely prevent listings on all search engines, but that some crawlers support this header, and it can be used to say that indexing is disallowed. That header was added as a result of this report.
The report was filed by d0rkerdevil, rated low severity under the weakness category "Improper Access Control - Generic", and paid a bounty of 50.00 USD. It was disclosed on 2017-10-27.
Why it matters
Text files uploaded by users can be linked from external websites and appear in search engine result pages. The program is careful about the limits: no header can stop every search engine, and the fix only asks crawlers that support the directive to refrain from indexing. The report was rated low severity.
The report does not describe a root cause; it notes that the X-Robots-Tag header was added as a result of the report. Because the files are user supplied and publicly reachable by URL, any external page that links to one gives a crawler both a path to it and a reason to fetch it.
In general, how this kind of bug works
Search engines discover content by following links and by crawling hosts they already know about. When a file is served from a shared CDN hostname, a single link from anywhere on the web can be enough for a crawler to find it, and a site: query then turns the index into a listing of everything the crawler has stored for that host.
Crawlers honour a small set of conventions: robots.txt at the host root, the X-Robots-Tag HTTP response header, and HTML <meta name="robots"> tags. For non-HTML content such as text files, images or PDFs there is no markup to carry a meta tag, so the response header is the only per-file control available. The header applies to the response it is attached to, which makes it suitable for a CDN that serves arbitrary user files from paths the application does not control.
This class of issue arises whenever user content is published on a predictable, linkable host and the operator has not thought about indexing. It is a configuration gap, not a memory or logic flaw, and its severity depends entirely on what the content is and who expected it to stay quiet.
How to test for it
- Identify hosts that serve user supplied content: CDN hostnames, upload buckets, attachment endpoints, avatar and media paths. Recon tools that collect hostnames and response headers are useful here.
- Request a known user file directly and inspect the response headers for
X-Robots-Tag, and check the host root for arobots.txtthat disallows the relevant paths. - Run a site-restricted search against the host, filtering by file extension, to see whether content is already indexed. Try several extensions and both the bare host and subdomains.
- Confirm that the file is genuinely user controlled and publicly reachable without authentication, and that its URL is stable enough to be linked and crawled.
A positive result looks like an indexed user file on a host that returns no robots directive for it. Common false positives: the host already sends X-Robots-Tag: noindex, the root robots.txt disallows the path, the indexed page is a generic error or directory listing rather than user content, or the content is intentionally public and the program treats it as such. Search results can also lag behind configuration changes, so check the live headers rather than relying on the index alone.
How it is fixed
The program added the X-Robots-Tag header as a result of this report. Neither measure prevents a determined party from fetching a file they already have the URL for, so operators should also treat upload URLs as public and avoid relying on obscurity.
Where to look
This bug class hides wherever user content is served from infrastructure the application does not fully control: CDN domains, object storage buckets, attachment and export endpoints, and preview or thumbnail services. Recon signals include hostnames that differ from the main application domain, responses with content types such as text/plain, application/pdf or images served without an application session, and directory-style paths containing identifiers. Comparing headers between the main site and the CDN often shows the gap.
Explain what kind of content the files hold and why listing them matters, without overstating it: as this report shows, a header only asks cooperating crawlers to stay away, and programs rate the issue accordingly.
Glossary
- CDN (content delivery network): a set of servers spread across locations that serves files to visitors quickly, often on a different domain from the main application.
- Crawler (search engine bot): a program that follows links, fetches pages and files, and stores what it finds for a search engine.
- Index: the search engine's stored copy of what it has crawled, which is what search results are drawn from.
- Response header: a short labelled line of metadata that a server sends alongside a file or page, describing it or giving instructions about it.
X-Robots-Tag: a response header used to tell cooperating crawlers whether a file may be indexed.noindex: the directive value that asks a crawler not to add the content to its index.robots.txt: a file at the root of a host that tells crawlers which paths they should not crawl.site:query: a search operator that limits results to a given website or hostname.ext:query: a search operator that limits results to files with a given extension.- Wildcard (
*): a symbol meaning "any"; in*.irccloud-cdn.comit matches every subdomain. - Information exposure: a weakness where content that was not meant to be widely seen becomes reachable or discoverable.
- Authentication: proving who you are, for example by logging in.
- Authorisation: deciding what an identified user is allowed to do or see.
- Severity: a rating of how serious a finding is, here low.
- Bounty: a payment made by a program to a researcher for a valid report.
- False positive: a finding that looks like a problem but is not one on closer inspection.