Skip to content
Info disclosure Write-up Beginner

How I was Able to see someone’s all private files with a single file share link through Atom feed & Never Give Up #togetherwehitharder HackerOne

A file-sharing service exposed private file metadata and thumbnails through an Atom feed URL that could be accessed without authentication. An attacker with a share link could append the .atom extension to view information about password-protected files.

Yogendra Jaiswal Follow

Published on medium.com

{{media:0}}

Yogendra Jaiswal (Vulnholic), on medium.com

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.

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

The researcher found some programmes through Twitter hashtags (#bugbounty, #bounty) rather than through a HackerOne programme page. The site had many clients, most of them HackerOne programmes, and two of its programmes looked strange to him. The report does not name the site, the programme, the file-sharing product or the exact URL structure beyond a generic example.

The weakness is information disclosure. A file that is protected by a password hides its content and its metadata by default. By appending an .atom extension to the image URL, the researcher could read the file's thumbnail and metadata without the password.

Setup

  • The researcher had a HackerOne profile and was waiting for invitations to private programmes.
  • He found the site by crawling it to understand its functionality, then decided to hunt on it.
  • He first contacted the site by email after finding some vulnerabilities. The team replied asking him to submit through HackerOne because they run a private programme there, and he sent his details for an invitation.
  • After the invite he used the site simply as one of its users. The report does not list any special tools, versions or accounts beyond a normal user account on the site.

Finding it

The researcher first found an IDOR, which he describes as a moment of happiness. The next day the report was marked Informative, which left him hopeless. He then went back to look at the proof-of-concept image, meaning the request and response pair he had captured.

In that response he noticed some juicy information: a URL of an image with an .atom extension. He opened those URLs and got Page Not Found. He then searched for what atom means for files, found a page on fileinfo.com describing it as XML-based atom, and then read the W3C Atom documentation at https://validator.w3.org/feed/docs/atom.html. From that he learned what an Atom feed is.

His own summary of Atom, quoted from the write-up:

Atom is the name of an XML-based Web content and metadata syndication format, and an application-level protocol for publishing and editing Web resources belonging to periodically updated websites.

All Atom feeds must be well-formed XML documents, and are identified with the application/atom+xml media type.

Exploitation

Step 1: Take the image URL from the response

The starting point was the image URL that appeared in the response body of the earlier request. The report does not reproduce that request or response, only says that the response contained a URL of an image with an .atom extension.

Step 2: Open the URL with the .atom extension

The researcher's example of the URL shape is:

Text
https://example.com/folder/image_token.atom

Opening that URL gave him the information described below. The report does not show the response body, only the fields that were disclosed.

Step 3: Read the disclosed fields

The information disclosed was:

  • content
  • media;content
  • media:thumbnail

Through these fields the researcher could get lots of information, including the file thumbnail, so files could be accessed without a password. The metadata of a file cannot be seen if the image is password protected, because it is hidden by default, but by adding the .atom extension to the image URL the juicy information becomes visible.

Step 4: Report and get rewarded

He reported the vulnerability to the programme. The next day he got a reply with a reward, a bounty on triaged.

Timeline

The report gives this timeline:

Date Event
6 September 2017 Reported
7 September 2017 Got response from team
7 September 2017 Triaged
7 September 2017 Rewarded bounty (cool bounty)
13 September Resolved

On 13 September the team said:

We released the fix for this issue. You can confirm it if you please.

But the researcher found it was not fixed, so he replied:

what you have fix please clear me i am not getting you

On 13 September the team replied:

FYI: We rollbacked the fix by some release management reason. I’ll let you know when it back. EDIT: also I’ll try to explain the fix.

On 14 September the team replied again and gave him more information about the patch:

We got back the fix again. So you can confirm it now. Maybe my Bad english confused you . I’ll try in another words

The report also quotes Frans Rosén of HackerOne, from How to Win Over Security Teams and Gain Influence as a Hacker, at this point. It was fixed on 14 September. On 10 October he requested permission for a blog post, on 12 October he provided the content to the team, and on 13 October permission was granted.

Root cause

What it shows is that the same file resource is reachable through a second representation, an Atom feed, identified by the .atom extension on the image URL. The feed returns content, media;content and media:thumbnail for a file whose metadata is otherwise hidden.

Impact

With a single file share link, the thumbnail and metadata of a password-protected image were disclosed without the password.

Fix

The team released a fix, rolled it back for release management reasons, and restored it on 14 September. What should be ensured is that the Atom representation of a file enforces the same authorisation as the normal file view, so that a password-protected file does not expose content, media;content or media:thumbnail through the feed.

Variants to test

  1. Other alternate representations of the same resource. Take a protected file URL and try appending other extensions or format suffixes that produce a feed or metadata view, for example .atom, .rss or .json. A positive result is a response that contains the file's content, thumbnail or metadata without the password being supplied.
  2. Feed endpoints referenced in responses. Crawl authenticated and unauthenticated responses for URLs ending in .atom or similar, as the researcher did from the PoC response. A positive result is a feed URL that returns data for a resource the current session is not authorised to see.
  3. Password-protected shares. Create a share with a password, then request the feed representation directly without the password. A positive result is a 200 response with content, media;content or media:thumbnail fields populated.
  4. Thumbnail and metadata fields. Where a feed is reachable, check whether media:thumbnail or other metadata fields leak information about files that the normal view hides. A positive result is any metadata for a file the user cannot open.

I would like to thank HackerOne for the platform, and Arbaz Hussain and Ak1T4 for the article 10 Rules of Bug Bounty, which reminded the researcher not to give up easily and to give time to a programme for many days.

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

What happened, in plain words

A security researcher found a website that lets people share files with a link. Some of those files were protected by a password: you needed the password before you could see the file. He discovered that by adding a small piece of text to the end of the file's web address, he could see information about the file, including a small preview picture called a thumbnail, without typing the password. He reported it, the company paid him a reward, and the problem was eventually fixed.

This article walks through the whole story slowly, for someone who has never done security testing. Every technical word is explained the first time it appears, and there is a glossary at the end.

Yogendra Jaiswal (Vulnholic)
Yogendra Jaiswal (Vulnholic) From the original on medium.com

Background: how the researcher got there

The researcher had a profile on HackerOne. HackerOne is a platform where companies invite security researchers to test their websites and pay for problems that are found. Many companies run what is called a private programme: the testing is only open to researchers the company has invited, not to the public.

He was waiting for invitations and, after a long wait, decided to go looking for private programmes on his own. He searched Google with some dorks. A dork is just a clever search query that turns up pages matching a pattern, often used to find websites with particular features. He found some programmes but did not want to test them, so he went to Twitter and searched for the hashtags #bugbounty and #bounty. There he found a few programmes, including one where a person had posted that they had received money for reporting a security issue.

He decided to hunt on the website of those two programmes. Before testing anything, he crawled the whole website. Crawling means visiting page after page, following links, to understand what the site does and what features it offers. He saw that the site had many clients, and most of them were HackerOne programmes, but two of the programmes looked strange to him. He decided to go to their website and hunt there.

He found some vulnerabilities and contacted the company by email. The next day they replied:

Thanks for Reporting the issue , can you please submit the Vulnerabilities through hackerone as we are running Private program there .

He answered that he had a HackerOne profile and sent his details so they could invite him. After the invitation arrived, he landed on a thank-you page that listed HackerOne's top 100 researchers. Seeing all those experienced people made him think there was little chance left for him to find anything more.

He spent some hours and found no further issues. He was thinking about giving up and moving on, but the HackerOne slogan #togetherwehitharder reminded him to keep trying. So he started again, this time simply using the website the way an ordinary user would, and after some hours he came back to hunting.

The first finding, and why it was not enough

He found an IDOR. IDOR stands for Insecure Direct Object Reference. In plain terms: a website lets you ask for something by its identifier, such as a number or a code in the address, and it does not check whether you are allowed to see that particular thing. Imagine a hotel where every room key is numbered and the reception hands out any key you ask for, without checking that the room is yours. That is an IDOR.

He was delighted. The next day, though, the report was marked Informative. On a bug bounty platform, Informative usually means the report did not qualify as a security vulnerability, so no reward is given. He felt hopeless.

Then he decided to look again at his proof of concept. A proof of concept, or PoC, is the evidence you attach to a report: the exact request you sent and the exact response you got back, so the company can reproduce what you did. In that response he noticed something interesting: a URL of an image that ended with the extension .atom.

What an Atom feed is

He opened those URLs and got Page Not Found, meaning the address did not lead to a working page. So he searched the web for what "atom" means for files. He found a page on fileinfo.com that described it as "XML-based atom", and then he read the official documentation at https://validator.w3.org/feed/docs/atom.html. After reading it all, he understood what an Atom feed is.

His own summary, quoted from his write-up:

Atom is the name of an XML-based Web content and metadata syndication format, and an application-level protocol for publishing and editing Web resources belonging to periodically updated websites.

All Atom feeds must be well-formed XML documents, and are identified with the application/atom+xml media type.

That paragraph is dense, so let us unpack it word by word.

  • XML is a way of writing data as text using tags, like <title>My photo</title>. It is similar in shape to HTML, the language web pages are written in, but XML is meant for carrying data rather than for display.
  • Metadata is data about data. A photo is the data; the date it was taken, its size, its title and a small preview of it are metadata. Think of the label on a jar: the jar holds the food, the label describes it.
  • Syndication means publishing content in a standard format so that other programs can pick it up automatically. News readers are the classic example: instead of visiting ten websites, you subscribe to their feeds and the reader collects new articles for you.
  • A feed is therefore a machine-readable list of items, each with fields such as a title, a date and a link. An Atom feed is one standard flavour of that idea.
  • application/atom+xml is a media type, also called a content type. It is a label a web server attaches to a response to say what kind of data is inside, the way a food packet says what is in it. This label tells the browser or program that the body is an Atom feed written in XML.

So an Atom feed is a standard, text-based way for a website to publish a list of things, with details about each thing, so that software can read it. The researcher's insight was simple: if a file-sharing site can produce an Atom feed for a file, that feed might contain details about the file that the normal page hides.

Trying it on the file

He then thought: let me open the file with the .atom extension. His example of the address shape is:

Text
https://example.com/folder/image_token.atom

Line by line:

  • https:// is the secure version of the protocol browsers use to fetch web pages. The s means the traffic is encrypted.
  • example.com stands for the website's domain name, the human-friendly name of the server. The real site is not named in the report.
  • /folder/ is a path on the server, like a folder on your own computer.
  • image_token is the identifier of the particular file. A token here is a long, hard-to-guess string that acts as the file's name in the address. It is a bit like a claim ticket at a cloakroom: whoever holds the ticket can ask for the coat.
  • .atom is the extension, the part after the dot that hints at the format. Normally you see .jpg or .png for pictures. Here it asks the server for the Atom representation of the file instead of the picture itself.

When he opened that address, he got the information described below. His reaction, in his own words, was "wow, woot woot".

The information disclosed was:

  • content
  • media;content
  • media:thumbnail

These are field names inside the feed. content holds the item's content. media;content and media:thumbnail belong to the media description of the item; a thumbnail is the small preview picture of a larger image. The report does not show the response body itself, only these field names.

Through these fields he could get lots of information, including the file thumbnail. So files could be accessed without a password. Normally, if an image is password protected, its metadata cannot be seen because it is hidden by default. By adding the .atom extension to the image URL, that hidden information became visible.

Reporting it and getting paid

He reported the vulnerability to the programme straight away. The next day he got a reply with a reward: a bounty paid once the report was triaged. Triaged means the company's security team has looked at the report, confirmed it is a real issue and put it into their workflow for fixing. It is the difference between "we received your letter" and "we have read it and agree there is a problem".

The timeline, and the fix that came and went

The report gives this timeline:

Date Event
6 September 2017 Reported
7 September 2017 Got response from team
7 September 2017 Triaged
7 September 2017 Rewarded bounty (cool bounty)
13 September Resolved

On 13 September the team said:

We released the fix for this issue. You can confirm it if you please.

A fix is a change to the website's code or configuration that closes the hole. "You can confirm it" means: please test again and tell us whether the problem is gone. That is normal practice, because the person who found a bug is often the best person to check that it is really closed.

But the researcher found it was not fixed, so he replied:

what you have fix please clear me i am not getting you

He was asking what exactly had been changed, because from his side the problem still worked.

On 13 September the team replied:

FYI: We rollbacked the fix by some release management reason. I’ll let you know when it back. EDIT: also I’ll try to explain the fix.

To roll back means to undo a change and put the previous version back. Release management is the process a company uses to decide when and how changes go live; sometimes a change is ready but has to be pulled because of how it fits with other releases. So the fix had existed briefly and then been removed, which is why the researcher could still see the problem.

On 14 September the team replied again and gave him more information about the patch. A patch is the same idea as a fix: a small change applied to software to correct a problem.

We got back the fix again. So you can confirm it now. Maybe my Bad english confused you . I’ll try in another words

At this point the report quotes Frans Rosén of HackerOne, from How to Win Over Security Teams and Gain Influence as a Hacker. The point of quoting it here is about communication: a report is a conversation with another team, and clear, patient back-and-forth helps both sides.

It was fixed on 14 September. On 10 October he asked for permission to write a blog post about it, on 12 October he sent the content to the team, and on 13 October permission was granted.

Why the bug existed

The report does not describe the server-side code, so we cannot say exactly which line was wrong. What it shows is that the same file could be reached in two ways. One way is the normal file view, which asks for the password. The other is the Atom feed, reached by putting .atom on the end of the image URL. The feed handed back content, media;content and media:thumbnail for a file whose details were otherwise hidden.

A useful comparison is a building with a front door that has a guard and a side door that nobody watches. Both doors lead to the same room, but only one is checked. The team only said they would explain the fix, that they had rolled it back for release management reasons, and that they had restored it.

What the impact was

With a single file share link, the thumbnail and metadata of a password-protected image were disclosed without the password.

How it was fixed

The team released a fix, rolled it back for release management reasons, and restored it on 14 September. The principle to aim for is that the Atom representation of a file should enforce the same permission check as the normal file view, so that a password-protected file does not expose content, media;content or media:thumbnail through the feed.

Other things worth trying

These are variations on the same idea, useful if you want to look for similar bugs yourself. In each case, a positive result means you got data you should not have been able to get.

  1. Other alternate representations of the same resource. Take a protected file URL and try appending other extensions or format suffixes that produce a feed or metadata view, for example .atom, .rss or .json. A positive result is a response that contains the file's content, thumbnail or metadata without the password being supplied.
  2. Feed endpoints referenced in responses. Crawl authenticated and unauthenticated responses for URLs ending in .atom or similar, as the researcher did from the PoC response. A positive result is a feed URL that returns data for a resource the current session is not authorised to see.
  3. Password-protected shares. Create a share with a password, then request the feed representation directly without the password. A positive result is a 200 response with content, media;content or media:thumbnail fields populated. A 200 is the standard HTTP status code meaning "OK, here is your content".
  4. Thumbnail and metadata fields. Where a feed is reachable, check whether media:thumbnail or other metadata fields leak information about files that the normal view hides. A positive result is any metadata for a file the user cannot open.

Thanks

The researcher thanks HackerOne for the platform, and Arbaz Hussain and Ak1T4 for the article 10 Rules of Bug Bounty, which reminded him not to give up easily and to give a programme time over many days.

Glossary

  • API: a defined way for one piece of software to ask another for data or actions, like a menu of requests a program is allowed to make.
  • Atom feed: a standard XML format for publishing a list of items with details about each, so software can read them automatically.
  • Bounty: money paid by a company to a researcher for reporting a valid security problem.
  • Content type (media type): a label on a web response saying what kind of data it contains, such as application/atom+xml.
  • Crawl: to visit pages automatically or manually, following links, to map out what a website does.
  • Dork: a crafted search query used to find pages matching a particular pattern.
  • Extension: the part of a file name after the dot, such as .jpg or .atom, hinting at the format.
  • Feed: a machine-readable list of items, usually with titles, dates and links, meant to be read by software rather than people.
  • Fix / patch: a change to software that corrects a problem.
  • HackerOne: a platform where companies run bug bounty programmes and researchers submit reports.
  • IDOR (Insecure Direct Object Reference): a flaw where a site lets you request an item by its identifier without checking that you are allowed to see it.
  • Informative: a report status meaning the submission was not accepted as a security vulnerability.
  • Metadata: data that describes other data, such as a photo's title, date, size or preview.
  • Media type: see content type.
  • Password-protected share: a file link that requires a password before the file can be viewed.
  • PoC (proof of concept): the evidence attached to a report, usually the exact request and response, so the issue can be reproduced.
  • Private programme: a bug bounty programme open only to invited researchers.
  • Rollback: undoing a change and restoring the previous version.
  • Syndication: publishing content in a standard format so other programs can collect it automatically.
  • Thumbnail: a small preview image of a larger picture.
  • Token: a long, hard-to-guess string used as an identifier, here the part of the URL that names the file.
  • Triage: the step where a security team reviews a report, confirms it is real and starts handling it.
  • XML: a text format for structured data using tags, similar in shape to HTML but meant for carrying data.
  • 200: the HTTP status code meaning the request succeeded and the content is being returned.

More by Yogendra Jaiswal

View all

1 more disclosed report, best first.

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.