🇰🇷 한글 설명
Zarf 0.23.0~0.74.1의 패키지 검사 기능에서 untrusted 패키지의 zarf.yaml 내 Metadata.Name 필드를 경로 순회(../../) 또는 절대 경로(/etc/)로 조작하여 임의의 파일시스템 위치에 공격자 제어 콘텐츠를 쓸 수 있는 취약점입니다. 0.74.2에서 수정되었습니다.
💡 쉬운 설명
Zarf 도구가 패키지 파일의 경로를 제대로 검증하지 않아 공격자가 시스템 임의의 위치에 악성 파일을 저장할 수 있습니다. SSH 인증키나 크론 작업 파일 같은 중요한 시스템 파일을 덮어쓸 수 있게 됩니다.
🇺🇸 원문 (English)
Zarf is an Airgap Native Packager Manager for Kubernetes. Versions 0.23.0 through 0.74.1 contain an arbitrary file write vulnerability in the zarf package inspect sbom and zarf package inspect documentation subcommands. These subcommands output file paths are constructed by joining a user-controlled output directory with the package's Metadata.Name field read directly from the untrusted package's zarf.yaml manifest. Although Metadata.Name is validated against a regex on package creation, an attacker can unarchive a package to modify the Metadata.Name field to contain path traversal sequences such as ../../etc/cron.d/malicious or absolute paths like /home/user/.ssh/authorized_keys, along with the corresponding files inside SBOMS.tar. This allows writing attacker-controlled content to arbitrary filesystem locations within the permissions of the user running the inspect command. This issue has been fixed in version 0.74.2.
📍 영향받는 시스템
Zarf 버전 0.23.0 ~ 0.74.1
⚔️ 공격 벡터
untrusted Zarf 패키지의 zarf.yaml을 수정하여 Metadata.Name에 경로 순회 시퀀스(../../etc/cron.d/) 또는 절대 경로(/home/user/.ssh/) 포함 후 inspect 서브커맨드 실행
🛡️ 대응 방법
Zarf를 0.74.2 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 0.74.2 이상이면 취약점이 패치되었고, 0.74.1 이하이면 긴급 업그레이드 필요
zarf version 2>/dev/null | grep -oP 'v?\d+\.\d+\.\d+'