🇰🇷 한글 설명
Stacklok의 Minder 0.0.51 이전 버전은 sigstore 검증자가 응답 본문 크기 제한 없이 메모리에 로드할 때 발생하는 DoS 취약점이 있습니다. 공격자는 대용량 응답을 반환하는 악의적 엔드포인트로 Minder를 유도하여 서버 메모리 고갈로 충돌시킬 수 있습니다.
💡 쉬운 설명
Minder 서버가 외부 소스의 큰 파일을 메모리에 모두 읽어들이면서 서버가 다운될 수 있습니다. 공격자는 이를 악용하여 서버를 의도적으로 중단시킬 수 있습니다.
🇺🇸 원문 (English)
Minder by Stacklok is an open source software supply chain security platform. Minder prior to version 0.0.51 is vulnerable to a denial-of-service (DoS) attack which could allow an attacker to crash the Minder server and deny other users access to it. The root cause of the vulnerability is that Minders sigstore verifier reads an untrusted response entirely into memory without enforcing a limit on the response body. An attacker can exploit this by making Minder make a request to an attacker-controlled endpoint which returns a response with a large body which will crash the Minder server. Specifically, the point of failure is where Minder parses the response from the GitHub attestations endpoint in `getAttestationReply`. Here, Minder makes a request to the `orgs/$owner/attestations/$checksumref` GitHub endpoint (line 285) and then parses the response into the `AttestationReply` (line 295). The way Minder parses the response on line 295 makes it prone to DoS if the response is large enough. Essentially, the response needs to be larger than the machine has available memory. Version 0.0.51 contains a patch for this issue.
The content that is hosted at the `orgs/$owner/attestations/$checksumref` GitHub attestation endpoint is controlled by users including unauthenticated users to Minders threat model. However, a user will need to configure their own Minder settings to cause Minder to make Minder send a request to fetch the attestations. The user would need to know of a package whose attestations were configured in such a way that they would return a large response when fetching them. As such, the steps needed to carry out this attack would look as such:
1. The attacker adds a package to ghcr.io with attestations that can be fetched via the `orgs/$owner/attestations/$checksumref` GitHub endpoint.
2. The attacker registers on Minder and makes Minder fetch the attestations.
3. Minder fetches attestations and crashes thereby being denied of service.
📍 영향받는 시스템
Minder by Stacklok < 0.0.51
⚔️ 공격 벡터
공격자가 ghcr.io에 대용량 응답을 반환하도록 설정된 패키지를 추가하고, Minder 사용자로 등록하여 해당 패키지의 증명서를 가져오도록 유도
🛡️ 대응 방법
Minder를 0.0.51 이상 버전으로 업그레이드
🔧 검증 코드
명령어 실행 후 0.0.51 이상의 버전이 출력되면 안전하고, 이전 버전이나 아무것도 출력되지 않으면 업그레이드 필요
minder version 2>/dev/null | grep -oE '0\.(0\.5[1-9]|[1-9])'