kcve.ai취약점 정보 · 내 자산 확인

CVE-2022-23642 Code Injection in Sourcegraph

소스그래프에서의 코드 주입

설명

Sourcegraph is a code search and navigation engine. Sourcegraph prior to version 3.37 is vulnerable to remote code execution in the `gitserver` service. The service acts as a git exec proxy, and fails to properly restrict calling `git config`. This allows an attacker to set the git `core.sshCommand` option, which sets git to use the specified command instead of ssh when they need to connect to a remote system. Exploitation of this vulnerability depends on how Sourcegraph is deployed. An attacker able to make HTTP requests to internal services like gitserver is able to exploit it. This issue is patched in Sourcegraph version 3.37. As a workaround, ensure that requests to gitserver are properly protected.

Sourcegraph는 코드 검색 및 탐색 엔진입니다. 버전 3.37 이전의 Sourcegraph는 `gitserver` 서비스에서의 원격 코드 실행에 취약하다. 서비스는 git exec 프록시 역할을 하며, `git config` 호출을 제대로 제한하지 못한다. 이것은 공격자가 git`core.sshCommand` 옵션을 설정할 수 있게 해주며, git은 원격 시스템에 연결할 때 ssh 대신 지정된 명령을 사용하도록 설정한다. 이 취약점의 악용은 Sourcegraph가 배포되는 방식에 따라 다릅니다. gitserver와 같은 내부 서비스에 HTTP 요청을 할 수 있는 공격자는 이를 악용할 수 있습니다. 이 문제는 Sourcegraph 버전 3.37에서 패치되었습니다. 해결 방법으로 gitserver에 대한 요청이 제대로 보호되는지 확인하십시오.

영향 받는 제품 제품 1개

  • sourcegraph

    sourcegraph

    해결 버전 있음

    영향 받는 버전

    • 3.37 미만

    해결 버전

    • 3.37 이상

참고 자료 4건

‹ 목록

점검 지원 범위 문의

도입 문의