🇰🇷 한글 설명
WACRM 0.7.0 및 이전 버전에서 흐름(flow) 및 자동화(automation) 관련 API가 사용자 역할을 제대로 검증하지 않고 권한이 높은 서비스 역할 데이터베이스 클라이언트를 사용하여 행 수준 보안을 우회합니다. 이로 인해 읽기 전용 권한을 가진 사용자가 워크플로우를 수정, 삭제하거나 승인되지 않은 WhatsApp 메시지를 발송할 수 있습니다.
💡 쉬운 설명
단순히 내용을 보기만 해야 하는 사용자가 시스템의 중요한 설정을 바꾸거나 마음대로 메시지를 보낼 수 있는 보안 결함입니다. 권한 확인 절차를 건너뛰고 관리자 권한으로 데이터를 수정할 수 있는 상태입니다.
🇺🇸 원문 (English)
WACRM is a self-hostable CRM template for WhatsApp. In version 0.7.0 and earlier, WACRM flow and automation write routes authenticate account viewers but do not enforce the agent role before using a service-role database client that bypasses row-level security. In src/app/api/flows/[id]/route.ts, src/app/api/flows/[id]/activate/route.ts, and src/app/api/flows/route.ts, a viewer can create, edit, activate, or delete flows because membership-only checks are followed by service-role writes. In src/app/api/automations/route.ts and src/app/api/automations/engine/route.ts, a viewer can create active automations and trigger outbound WhatsApp actions without the role required by the underlying write policies. This can permit unauthorized workflow changes, destructive flow deletion, and outbound actions from a role intended to be read-only. This vulnerability is fixed with commit 03e851bea56dcf6bb21ff1b80ba531372bf3269f.
📍 영향받는 시스템
WACRM version 0.7.0 and earlier
⚔️ 공격 벡터
인증된 뷰어(Viewer) 권한을 가진 사용자가 특정 API 경로를 통해 권한 검증을 우회하여 데이터베이스에 직접 쓰기 작업을 수행
🛡️ 대응 방법
커밋 03e851bea56dcf6bb21ff1b80ba531372bf3269f가 적용된 최신 버전으로 업데이트
🔧 검증 코드
명령어 실행 결과가 'Fixed'이면 패치된 상태이며, 'Vulnerable'이면 취약한 상태입니다.
git rev-parse HEAD | grep -q 03e851bea56dcf6bb21ff1b80ba531372bf3269f && echo 'Fixed' || echo 'Vulnerable'