🇰🇷 한글 설명
Charmed MySQL K8s operator 221 버전 미만에서 mysql-shell 스크립트 실행 시 사용자 자격증명이 포함된 임시 파일이 644 권한으로 생성되어 특권 없는 사용자가 읽을 수 있습니다. Operator 사용자 생성 시에도 DDL 문에 자격증명이 포함되어 같은 방식으로 유출될 수 있습니다.
💡 쉬운 설명
MySQL 작업을 위해 임시 파일에 비밀번호를 저장했는데, 이 파일을 누구나 읽을 수 있게 설정되어 있습니다. 일반 사용자가 이 파일을 찾으면 데이터베이스 비밀번호를 탈취할 수 있습니다.
🇺🇸 원문 (English)
Charmed MySQL K8s operator is a Charmed Operator for running MySQL on Kubernetes. Before revision 221, the method for calling a SQL DDL or python based mysql-shell scripts can leak database users credentials. The method mysql-operator calls mysql-shell application rely on writing to a temporary script file containing the full URI, with user and password. The file can be read by a unprivileged user during the operator runtime, due it being created with read permissions (0x644). On other cases, when calling mysql cli, for one specific case when creating the operator users, the DDL contains said users credentials, which can be leak through the same mechanism of a temporary file. All versions prior to revision 221 for kubernetes and revision 338 for machine operators.
📍 영향받는 시스템
Charmed MySQL K8s operator revision <221 (kubernetes), revision <338 (machine operators)
⚔️ 공격 벡터
임시 스크립트 파일을 읽어 자격증명 탈취 후 데이터베이스 접근
🛡️ 대응 방법
Charmed MySQL operator를 revision 221 이상(kubernetes) 또는 338 이상(machine)으로 업데이트
🔧 검증 코드
설치된 Charmed MySQL의 revision 버전을 확인하여 권장 버전 이상으로 업데이트되었는지 검증합니다.
snap list 2>/dev/null | grep mysql || helm list -A 2>/dev/null | grep mysql