Private RSA key for Vagrant exposed in GitHub repository
A private RSA key used for SSH access to a Vagrant virtual machine was committed to a public GitHub repository. An attacker with the key could access the Vagrant VM pretending to be the legitimate user.
Originally disclosed on HackerOne
- Disclosed after 3 days
Summary:
The private RSA key used for SSH on Vagrant is exposed in sifnode GitHub repository.
Steps To Reproduce:
- Visit this link which shows the
private_keyfile used for your Vagrant virtual machine
Suggested solution
Remove the private key from the repository. Even though you remove it, it will still be in the commit history. Therefore, refer to the article by GitHub on removing sensitive data from a repository
Impact
By having the private SSH key published onto your GitHub repo, an attacker would be able to access your Vagrant virtual machine pretending to be you. The private key has the word "private" for reason and therefore it shouldn't be accessible by unauthorized people.
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 private key file was accidentally committed to the repository because it was not excluded via .gitignore or similar safeguards.
Impact
An attacker could access the Vagrant virtual machine pretending to be the legitimate user.
What the attacker needed
Access to the public GitHub repository
The fix
The private key should be removed from the repository and from its commit history, following GitHub's guidance on removing sensitive data.
How it was found
- Visit the provided GitHub link to the private_key file in the repository.
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.
A private key is like a secret password that proves your identity when connecting to a computer. Here, that secret key was accidentally uploaded to a public code repository, so anyone could download it and use it to log in as the owner. The report asks the developers to remove the key and clean up the repository history.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.