Skip to content
Info disclosure Disclosed report Beginner

Admin Page's AWS Secret Key is Shown in Plain Text

The Elasticsearch AWS secret key was masked on the admin integrations page but present in plaintext in the HTML source, so other admins could read it.

GitLab

Originally disclosed on GitLab

  • Fixed in 5 months
  • Disclosed after 5 months

HackerOne report #631207 by ngalog on 2019-06-28, assigned to dappelt:

Summary

Normally, gitlab's way of handling private token/password/sensitive informations are consistent, i.e. only shown once and you will never be able to see it again afterwards.

I found that the Elasticsearch AWS secret key in not implemented in the same way. In https://:gitlabinstance/admin/application_settings/integrations, after admin saving the aws secret key, when other admins revisit the same page, the secret key is shown as •••••••••. I suppose the intention is to hide this value from other admins.

However I found that if you view the source code of this page, the secret key is actually stored in plaintext.

Steps to reproduce

  • As an admin, visit https://:gitlab/admin/application_settings/integrations to save a dummy aws secret key and access key
  • As another admin, visit https://:gitlab/admin/application_settings/integrations and click click view source, search for application_setting_elasticsearch_aws_secret_access_key
  • And you will find your aws secret key is in <input value="YOUR_AWS_SECRET_KEY">

Impact

AWS secret key is saved and shown in plain text to other admins

Output of checks

This should be happening in gitlab.com as well

Results of GitLab environment info

Reproduced on 12.0.2-ee (ef76b54fc1e)

Impact

.

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

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 application rendered the secret value into the HTML input's value attribute instead of omitting it or using a placeholder when displaying the settings form.

Impact

AWS secret key is saved and shown in plain text to other admins.

What the attacker needed

Admin access to GitLab instance; another admin views page source

How it was found

  1. As an admin, visit the integrations settings page and save a dummy AWS secret key and access key.
  2. As another admin, visit the same integrations settings page and view the page source.
  3. Search the source for the Elasticsearch AWS secret access key field name.
  4. Observe the AWS secret key in plaintext inside the input element's value attribute.

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 you save a secret like an AWS key, the website should not send it back to your browser in a readable form. Here, the page showed dots to hide the key, but the real key was still in the page's code, so anyone who looked at the source could see it.

What is Info disclosure?

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

More from GitLab

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.