🇰🇷 한글 설명
ash-project의 ash 라이브러리에서 발생하는 권한 누락 취약점입니다. Ash.update_many/4 함수가 원자적(atomic) 전략을 사용할 때 리소스 정책을 적용하지 않고 데이터를 업데이트하여, 권한이 없는 레코드를 수정할 수 있는 문제가 있습니다.
💡 쉬운 설명
데이터를 한꺼번에 수정하는 기능이 보안 규칙을 무시하고 작동하는 버그입니다. 이로 인해 다른 사용자의 정보나 허용되지 않은 데이터를 몰래 수정할 수 있습니다.
🇺🇸 원문 (English)
Missing Authorization vulnerability in ash-project ash allows an actor to update records forbidden by resource policies through the atomic path of Ash.update_many/4.
Ash.update_many/4 runs as a single atomic statement (a data-layer update_many, for example a SQL MERGE) whenever an atomic strategy is used and the data layer supports it. Ash.Actions.Update.UpdateMany (lib/ash/actions/update/update_many.ex) took that path even under authorize?: true without applying the resource's policies, so the statement updated every row matched by primary key regardless of the policy filter that authorization would impose. An actor could therefore update records the policies forbid, such as rows belonging to another actor or tenant. The fix restricts the atomic path to data layers supporting changeset filters when authorizing, authorizes each changeset, and merges the resulting policy filter into each changeset so the statement only touches authorized rows.
This issue affects ash: from 3.29.0 before 3.32.2.
📍 영향받는 시스템
ash: 3.29.0 버전부터 3.32.2 미만 버전
⚔️ 공격 벡터
권한이 없는 사용자가 Ash.update_many/4를 호출하여 정책 필터가 적용되지 않은 상태로 타인의 데이터를 업데이트함
🛡️ 대응 방법
ash 라이브러리를 3.32.2 이상의 최신 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 버전 번호가 3.32.2보다 낮으면 취약한 상태입니다.
mix deps info ash | grep -E 'ash' | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'