Sourcetree Security Advisory 2020-09-02
Sourcetree - Malicious URLs may cause Git to present stored credentials to the wrong server
要約 | CVE-2020-5260 - Malicious URLs may cause Git to present stored credentials to the wrong server |
---|---|
勧告のリリース日 | 10 AM PDT (Pacific Time, -7 hours) |
製品 | Sourcetree for Windows Sourcetree for Mac |
Affected Sourcetree versions |
|
Fixed Sourcetree Versions |
|
CVE ID |
脆弱性の概要
This advisory discloses critical severity security vulnerabilities in the Sourcetree versions listed above ("Affected Sourcetree Versions").
customers who have upgraded Sourcetree to versions listed in the fixed Sourcetree versions are not affected.
Customers who have downloaded and installed any of the Sourcetree for Windows and Mac versions listed above ("Affected Sourcetree versions") are affected.
Please upgrade your Sourcetree for Windows and Mac immediately to fix this vulnerability.
深刻度
Atlassian has given this vulnerability a critical rating. This rating was given according to the Atlassian security levels, which rank vulnerabilities as critical, high, moderate, or low severity.
これはアトラシアンの評価であり、お客様自身の IT 環境への適用性を評価する必要があります。
説明
Sourcetree uses Git, which uses external "credential helper" programs to store and retrieve passwords or other credentials from secure storage provided by the operating system. Specially-crafted URLs that contain an encoded newline could inject unintended values into the credential helper protocol stream, causing the credential helper to retrieve the password for one server (e.g., good.example.com) for an HTTP request being made to another server (e.g., evil.example.com), resulting in credentials for the former being sent to the latter. There are no restrictions on the relationship between the two, meaning that an attacker can craft a URL that will present stored credentials for any hostname to a hostname of their choosing.
The vulnerability can be triggered by feeding a malicious URL to git clone
. However, the affected URLs look rather suspicious; the likely vector would be through systems which automatically clone URLs not visible to the user, such as Git submodules, or package systems built around Git.
All versions of Sourcetree for macOS 4.0.1 and earlier are affected by this vulnerability. This issue can be tracked here:
SRCTREE-7358 - Git submodules vulnerability in Sourcetree for Mac - CVE-2020-5260 CLOSED
All versions of Sourcetree for Windows 3.3.8 and earlier are affected by this vulnerability. This issue can be tracked here:
SRCTREEWIN-13182 - Git submodules vulnerability in Sourcetree for Windows - CVE-2020-5260 CLOSED
修正
弊社ではこれらの課題に対応するために次の対応を行いました。
- Released Sourcetree for macOS version 4.0.2 that contains fixes for these issues and can be downloaded from https://www.sourcetreeapp.com/.
- Released Sourcetree for Windows version 3.3.9 that contains fixes for these issues and can be downloaded from https://www.sourcetreeapp.com/.
必要なアクション
Atlassian recommends that you upgrade to the latest version. For a full description of the latest version of Sourcetree, see the release notes(Windows and Mac). You can download the latest version of Sourcetree from the Sourcetree website.
Upgrade to Sourcetree for macOS version 4.0.2 or Higher; Sourcetree for Windows version 3.3.9 or higher.
If you are running a version of Sourcetree for macOS earlier than 4.0.2, or Sourcetree for Windows earlier than 3.3.9 and cannot upgrade to the latest version immediately, the best workaround is to upgrade to the latest version of Git and select the option to use system Git.The patched versions of Git are: 2.17.4, 2.18.3, 2.19.4, 2.20.3, 2.21.2, 2.22.3, 2.23.2, 2.24.2, 2.25.3, 2.26.1.
問題の軽減策
If you can't upgrade the Sourcetree or Git immediately, an alternative is to avoid malicious URLs:
- examine the hostname and username portion of URLs fed to git clone
for the presence of encoded newlines (%0a) or evidence of
credential-protocol injections (e.g., host=github.com) - avoid using submodules with untrusted repositories (don't use the
clone
--recurse-submodules
; usegit submodule update
only after examining
the URLs found in .gitmodules)
参考
- https://bitbucket.org/blog/git-vulnerability-in-multiple-versions-including-2-26
- https://github.com/git/git/security/advisories/GHSA-qm7j-c969-7j4q
- https://bugs.chromium.org/p/project-zero/issues/detail?id=2021
サポート
Atlassian supports Sourcetree through the Atlassian Community. If you have questions or concerns regarding this advisory, please raise them via https://community.atlassian.com/t5/Sourcetree/ct-p/Sourcetree.