Skip to content
Info disclosure Disclosed report Beginner

Credential gets exposed

When a repository's mirror origin URI contained embedded credentials, Phabricator's git pull error message printed the full URI including the password in plain text. Anyone able to edit a repository but not view its credentials could trigger this error and read the password.

luke081515 Follow

Originally disclosed on HackerOne

  • Triaged in 3 hours
  • Disclosed after 2 days
  1. Create a repo
  2. Mirror it to an URL
  3. Assign a credential to the mirror
  4. I've now had an existing repo, and wanted to change it to mirror only, so that phabricator pulls from an URL instead of self-hosting.

I now recived this error msg: Pull of 'Luke081515Bot' failed: Working copy at "/srv/repos/LUKE" has a mismatched origin URI, "https://Luke081515:<redacted>@bitbucket.org/Luke081515/lukebot". The expected origin URI is "https://newUrl/Luke/Luke081515Bot.git". Fix your configuration, or set the remote URI correctly. To avoid breaking anything, Phabricator will not automatically fix this.

In this case the <redacted> part was my password for bitbucket, completly visible for everyone who is able to see the repo. Phabricator should not expose the whole URLs including passwords.

So in theory everyone who can edit a repo, but can't view a credential can get access to it by producing this git error and then see the password at the raw error.

Attachments

PhabExpose.PNG
PhabExpose.PNG From the original on HackerOne

The original report as published on HackerOne, by luke081515. 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 error message echoed the raw configured origin URI, including embedded credentials, without redacting them.

Impact

A user who can edit a repository but cannot view its credentials could read the stored password from the error message.

What the attacker needed

Ability to edit a repository; a mirror configured with a credential

How it was found

  1. Create a repository and mirror it to a URL.
  2. Assign a credential to the mirror.
  3. Change an existing repository to mirror-only so Phabricator pulls from the URL.
  4. Observe the pull failure error message showing the full origin URI with the password.

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.

Some web tools store a username and password inside a web address (URL) so they can fetch code from another service. Here, when the fetch failed, the tool showed an error message that included that whole address, password and all. Anyone allowed to change the repository settings could make the error appear and read the secret.

What is Info disclosure?

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

More by luke081515

View all

1 more disclosed report, best first.

More from Phabricator

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.