CVE-2020-5260 malicious URLs may cause Git to present stored credentials to the wrong server
악성 URL로 인해 Git이 저장된 자격 증명을 잘못된 서버에 표시할 수 있음
설명
Affected versions of Git have a vulnerability whereby Git can be tricked into sending private credentials to a host controlled by an attacker. Git 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 can 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 host to a host 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. The problem has been patched in the versions published on April 14th, 2020, going back to v2.17.x. Anyone wishing to backport the change further can do so by applying commit 9a6bbee (the full release includes extra checks for git fsck, but that commit is sufficient to protect clients against the vulnerability). The patched versions 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.
영향을 받는 Git 버전에는 취약점이 있어서 Git은 공격자가 제어하는 호스트에 개인 자격 증명을 전송하도록 속일 수 있습니다. Git은 외부의 "신용 도우미" 프로그램을 사용하여 운영 체제가 제공하는 안전한 저장소에서 암호나 다른 자격 증명을 저장하고 검색한다. 인코딩된 새 줄을 포함하는 특수 제작된 URL은 의도하지 않은 값을 자격 증명 도우미 프로토콜 스트림에 삽입할 수 있으며, 이로 인해 자격 증명 도우미는 다른 서버(예: evil.example.com)에 HTTP 요청이 이루어지도록 한 서버(예: good.example.com)에 대한 암호를 검색하여 전자가 후자에 전송되도록 합니다. 둘 사이의 관계에는 제한이 없으므로 공격자는 호스트에 저장된 자격 증명을 제공하는 URL을 만들 수 있습니다. 이 취약점은 git clone에 악성 URL을 제공하여 발생할 수 있습니다. 그러나 영향을 받는 URL은 다소 의심스러운 것으로 보인다. 사용자에게 보이지 않는 URL(예: Git 하위 모듈 또는 Git을 중심으로 구축된 패키지 시스템)을 자동으로 복제하는 시스템을 통해 이러한 벡터가 발생할 가능성이 높다. 이 문제는 2020년 4월 14일에 게시된 버전에서 패치되었으며 v2.17.x로 돌아갑니다. 변경 사항을 추가로 백포트하려는 사람은 커밋 9a6bbee를 적용하면 된다(전체 릴리스에는 git fsck에 대한 추가 검사가 포함되어 있지만, 이 커밋은 취약점으로부터 클라이언트를 보호하기에 충분하다). 패치된 버전은 다음과 같습니다: 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.
영향 받는 제품 제품 1개
-
해결 버전 있음
git
git
영향 받는 버전
- 2.17.4 미만
- 2.18.0 이상 2.18.3 미만
- 버전 정보 확인 필요
- 2.20.0 이상 2.20.3 미만
- 2.21.0 이상 2.21.2 미만
- 2.22.0 이상 2.22.3 미만
- 2.23.0 이상 2.23.2 미만
- 2.24.0 이상 2.24.2 미만
외 2개 구간 펼치기
- 2.25.0 이상 2.25.3 미만
- 2.26.0 이상 2.26.1 미만
해결 버전
- 2.17.4 이상
- 2.18.3 이상
- 2.20.3 이상
- 2.21.2 이상
- 2.22.3 이상
- 2.23.2 이상
- 2.24.2 이상
- 2.25.3 이상
외 1개 구간 펼치기
- 2.26.1 이상
참고 자료 19건
- lists.opensuse.org http://lists.opensuse.org/opensuse-security-announce/2020-04/msg00027.html (새 창)
- lists.opensuse.org http://lists.opensuse.org/opensuse-security-announce/2020-05/msg00003.html (새 창)
- packetstormsecurity.com http://packetstormsecurity.com/files/157250/Git-Credential-Helper-Protocol-Newline-Injection.html (새 창)
- github.com https://github.com/git/git/commit/9a6bbee8006c24b46a85d29e7b38cfa79e9ab21b (새 창)
- github.com https://github.com/git/git/security/advisories/GHSA-qm7j-c969-7j4q (새 창)
- lists.debian.org https://lists.debian.org/debian-lts-announce/2020/04/msg00010.html (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/74Q7WVJ6FKLIN62VS2JD2XCNWK5TNKOW/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7TVS5UG6JD3MYIGSBKMIOS6AF7CR5IPI/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MOCTR2SEHCPSCOVUQJAGFPGKFMI2VE6V/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PN3FUOXKX3AXTULYV53ACABER2W2FSOU/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XPCEOIFLLEF24L6GLVJVFZX4CREDEHDF/ (새 창)
- lore.kernel.org https://lore.kernel.org/git/xmqqy2qy7xn8.fsf%40gitster.c.googlers.com/ (새 창)
- security.gentoo.org https://security.gentoo.org/glsa/202004-13 (새 창)
- support.apple.com https://support.apple.com/kb/HT211141 (새 창)
- usn.ubuntu.com https://usn.ubuntu.com/4329-1/ (새 창)
- debian.org https://www.debian.org/security/2020/dsa-4657 (새 창)
- openwall.com http://www.openwall.com/lists/oss-security/2020/04/15/5 (새 창)
- openwall.com http://www.openwall.com/lists/oss-security/2020/04/15/6 (새 창)
- openwall.com http://www.openwall.com/lists/oss-security/2020/04/20/1 (새 창)