🇰🇷 한글 설명
Snyk CLI 1.1297.3 이전 버전에서 DEBUG 또는 TRACE 모드 실행 시 환경변수나 CLI 인자로 입력된 컨테이너 레지스트리 자격증명, API 토큰 등 민감한 정보가 로컬 로그 파일에 평문으로 기록되는 취약점입니다.
💡 쉬운 설명
Snyk 보안 도구를 디버그 모드로 실행하면 암호와 인증 토큰이 누구나 읽을 수 있는 로그 파일에 저장됩니다. 이 정보를 통해 공격자가 레지스트리나 클라우드 서비스에 접근할 수 있습니다.
🇺🇸 원문 (English)
Versions of the package snyk before 1.1297.3 are vulnerable to Insertion of Sensitive Information into Log File through local Snyk CLI debug logs. Container Registry credentials provided via environment variables or command line arguments can be exposed when executing Snyk CLI in DEBUG or DEBUG/TRACE mode.
The issue affects the following Snyk commands:
1. When snyk container test or snyk container monitor commands are run against a container registry, with debug mode enabled, the container registry credentials may be written into the local Snyk CLI debug log. This only happens with credentials specified in environment variables (SNYK_REGISTRY_USERNAME and SNYK_REGISTRY_PASSWORD), or in the CLI (--password/-p and --username/-u).
2. When snyk auth command is executed with debug mode enabled AND the log level is set to TRACE, the Snyk access / refresh credential tokens used to connect the CLI to Snyk may be written into the local CLI debug logs.
3. When snyk iac test is executed with a Remote IAC Custom rules bundle, debug mode enabled, AND the log level is set to TRACE, the docker registry token may be written into the local CLI debug logs.
📍 영향받는 시스템
Snyk CLI 패키지 1.1297.3 이전의 모든 버전
⚔️ 공격 벡터
로컬 시스템 접근 권한이 있는 공격자가 DEBUG/TRACE 모드 실행 중 생성된 로그 파일을 읽어 컨테이너 레지스트리 자격증명 또는 API 토큰 탈취
🛡️ 대응 방법
Snyk CLI를 1.1297.3 이상으로 업그레이드하고 프로덕션/개발 환경에서 DEBUG 및 TRACE 모드 사용 금지
🔧 검증 코드
설치된 Snyk CLI 버전이 1.1297.3 이상인지 확인하고, 시스템 로그에서 DEBUG/TRACE 모드 실행 흔적과 민감한 정보 기록 여부를 검토합니다.
snyk --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' && npm list -g snyk 2>/dev/null | grep snyk || echo 'Snyk not installed'