Skip to content
Info disclosure Disclosed report Beginner

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

A web endpoint on data.gov returned an S3 metadata response header that exposed the system username and other file attributes used when the object was uploaded. An attacker could read this to learn internal system details such as the account name used to place files in the bucket.

ninja_cyber007 Follow

Originally disclosed on HackerOne

  • Disclosed after 2 days

Hi Team,

I noticed, that the x-amz-meta-s3cmd-attrs response header returns sensitive information, like system username on data.gov

x-amz-meta-s3cmd-attrs: uid:0/gname:root/uname:root/gid:0/mode:33184/mtime:1513269652/atime:1513269652/md5:2049644b6b833f5dbb826f60a4721f64/ctime:1513269652

Server: AmazonS3

Steps to reproduce:

  1. POST https://www.data.gov/app/plugins/advanced-custom-fields/core/api.php
  2. Intercept the request in burp and see the response header values with system username information

Suggested fix This issue lies in the s3cmd repository: https://github.com/s3tools/s3cmd/issues/67 where suggested fix is adding the -- no-preserve command.

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.

Attachments

info_disclosure.PNG
info_disclosure.PNG From the original on HackerOne

The original report as published on HackerOne, by ninja_cyber007. 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 upload tool s3cmd preserved local file attributes as S3 object metadata by default, and the application returned that metadata in response headers.

Impact

The attacker could learn the system username and file attributes; the reporter rated this as low impact because the exposed account was root and no direct access was gained.

What the attacker needed

None

The fix

The upload tool should be run with the option that stops it preserving local file attributes as object metadata.

How it was found

  1. Send a POST request to the advanced-custom-fields API endpoint on data.gov.
  2. Inspect the response headers in an intercepting proxy.

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 files are uploaded to Amazon S3 storage, extra labels called metadata can be attached to them. Here the upload tool stored details about the computer that did the upload, including the account name, and the server sent those details back to anyone who asked. That leaks information about the internal system, though not passwords or direct access.

What is Info disclosure?

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

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.