Skip to content
Info disclosure Disclosed report Beginner

Information disclosure (system username) in the x-amz-meta-s3cmd-attrs response header on federation.data.gov

The response header x-amz-meta-s3cmd-attrs exposed the system username (root) and other file metadata. An attacker could learn sensitive system information from this header.

sp1d3rs Follow

Originally disclosed on HackerOne

  • Paid in 28 hours
  • Disclosed after 24 days

Summary by the researcher

Thanks to the 18F team for the great experience, fast fix and the bounty!

It was a very simple finding - required only looking to the Response headers of the site. The issue classified as best-practice, because exposed username was default.

###References After discovering the issue, i googled it, and found that Arbaz Hussain already highlighted this issue here: https://medium.com/@arbazhussain/username-disclose-at-s3-balsamiq-d98336d4012d

The report

##Description Hi. I just noticed, that you are extended the scope for the bounty program. I looked to the first resource -

https://federation.data.gov/

I noticed, that the x-amz-meta-s3cmd-attrs response header returns sensitive information, like system username:

x-amz-meta-s3cmd-attrs:uid:0/gname:root/uname:root/gid:0/mode:33188/mtime:1482273904/atime:1482273904/md5:c9d60fd5a46044f7c58684a6c701ce54/ctime:1482273904
cxz.PNG
cxz.PNG From the original on HackerOne

##Impact The attacker can gain sensitive information about system username. In this case it was root, so i marked impact as Low. Still, the developers can have a good reason to not expose this information in the response header.

##Suggested fix I found the related article, written by other researcher: https://medium.com/@arbazhussain/username-disclose-at-s3-balsamiq-d98336d4012d and issue in the s3cmd repository: https://github.com/s3tools/s3cmd/issues/67 where sugested fix is adding the -- no-preserve comand.

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the file was uploaded using the s3cmd tool without the --no-preserve option, causing it to store and later expose system attributes such as the username in the object's metadata.

Impact

The attacker could gain sensitive information about the system username, though in this case it was root so the impact was marked as low.

What the attacker needed

None

How it was found

  1. Visit the site https://federation.data.gov/
  2. Inspect the response headers
  3. Observe the x-amz-meta-s3cmd-attrs header containing the system username

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When a file is uploaded to cloud storage, extra information called metadata can be attached. Here, that metadata included the name of the system user who uploaded the file, and it was sent back in a response header that anyone could see. This is a problem because it reveals details about the server's setup that should stay private.

What is Info disclosure?

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

More by sp1d3rs

View all

62 more disclosed reports, best first.

More from GSA Bounty

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.