CVE-2021-21251 ZipSlip Arbitrary File Upload
ZipSlip 임의의 파일 업로드
설명
OneDev is an all-in-one devops platform. In OneDev before version 4.0.3 there is a critical "zip slip" vulnerability. This issue may lead to arbitrary file write. The KubernetesResource REST endpoint untars user controlled data from the request body using TarUtils. TarUtils is a custom library method leveraging Apache Commons Compress. During the untar process, there are no checks in place to prevent an untarred file from traversing the file system and overriding an existing file. For a successful exploitation, the attacker requires a valid __JobToken__ which may not be possible to get without using any of the other reported vulnerabilities. But this should be considered a vulnerability in `io.onedev.commons.utils.TarUtils` since it lives in a different artifact and can affect other projects using it. This issue was addressed in 4.0.3 by validating paths in tar archive to only allow them to be in specified folder when extracted.
OneDev는 올인원 Devops 플랫폼입니다. 버전 4.0.3 이전 OneDev에는 중요한 "zip slip" 취약점이 있습니다. 이 문제는 임의의 파일 쓰기로 이어질 수 있습니다. KubernetesResource REST 엔드포인트는 TarUtils를 사용하여 요청 본문에서 사용자 제어 데이터를 해제합니다. TarUtils는 Apache Commons Compress를 사용하는 사용자 정의 라이브러리 방법입니다. Untar 프로세스 중에, untarred 파일이 파일 시스템을 순회하고 기존 파일을 덮어쓰는 것을 방지하는 검사가 없습니다. 성공적인 익스플로잇을 위해 공격자는 유효한 __JobToken__을 필요로 하며, 이는 보고된 다른 취약점을 사용하지 않고는 얻을 수 없습니다. 하지만 이것은 `io.onedev.commons.utils.TarUtils`의 취약점으로 간주되어야 하는데, 이는 다른 아티팩트에 살고 있고 그것을 사용하는 다른 프로젝트에 영향을 줄 수 있기 때문입니다. 이 문제는 4.0.3에서 tar 아카이브의 경로를 검증하여 추출할 때 지정된 폴더에만 있도록 허용했습니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
theonedev
onedev
영향 받는 버전
- 4.0.3 미만
해결 버전
- 4.0.3 이상