usd-2020-0023 (CVE-2020-14170) | Bitbucket Server 7.3
Advisory ID: usd-2020-0023
CVE Number: CVE-2020-14170
Affected Product: Bitbucket Server
Affected Version: 5.4.0 <= version < 7.3.1
Vulnerability Type: Server Side Request Forgery
Security Risk: Medium
Vendor URL: https://www.atlassian.com/de/software/bitbucket
Vendor Status: Fixed
A server side request forgery (SSRF) vulnerability was discovered in the „Webhooks“ section if the repository settings page. An authenticated attacker can set the URL field to internal IP addresses and retrieve data using the „Test connection“ feature.
Proof of Concept (PoC)
- A new webhook is created under „Repositoy settings -> Webhooks“ with a URL pointing to an internal IP / port combination. URL of the page is /plugins/servlet/webhooks/projects/PROJECT_NAME/repos/REPO_NAME/create.In our example we use a URL value of „http://127.0.0.1:22“ to connect to the local SSH daemon:
- The attacker uses the „Test Connection“ feature. There will be a link titled „View details“. Clicking it reveals the SSH version banner:
The last image shows the Apache MINA SSHD banner on port 15998 that we found running on this instance of Bitbucket Server.
Consider adding an instance-wide whitelisting feature or deploy a comprehensive filtering of local and internal IP addresses.
This security vulnerability was found by Marcus Nilsson of usd AG.
ABOUT usd SECURITY ADVISORIES
In order to protect businesses against hackers and criminals, we always have to keep our skills and knowledge up to date. Thus, security research is just as important for our work as is building up a security community to promote the exchange of knowledge. After all, more security can only be achieved if many individuals take on the task.
Our CST Academy and our usd HeroLab are essential parts of our security mission. We share the knowledge we gain in our practical work and our research through training courses and publications. In this context, the usd HeroLab publishes a series of papers on new vulnerabilities and current security issues.
Always for the sake of our mission: „more security.“
In accordance with usd AG’s Responsible Disclosure Policy, all vendors have been notified of the existence of these vulnerabilities.
The information provided in this security advisory is provided „as is“ and without warranty of any kind. Details of this security advisory may be updated in order to provide as accurate information as possible.