🇰🇷 한글 설명
ZenHive mpp의 MPP.Session.Actions.accept_voucher/3 함수에서 입력된 수량 검증이 부적절하게 이루어지는 취약점입니다. 공격자는 이미 사용된 바우처를 새로운 챌린지 하에서 재사용함으로써, 비용을 지불하지 않고도 무제한으로 유료 리소스를 획득할 수 있습니다.
💡 쉬운 설명
한 번 결제한 영수증을 계속해서 다시 제출하면, 시스템이 이를 새로운 결제로 착각하여 계속해서 서비스를 무료로 제공하는 문제입니다. 이를 통해 공격자는 돈을 내지 않고도 유료 서비스를 무제한으로 이용할 수 있습니다.
🇺🇸 원문 (English)
Improper Validation of Specified Quantity in Input in ZenHive mpp allows a client holding an open payment channel to obtain paid resources without being charged.
MPP.Session.Actions.accept_voucher/3 in lib/mpp/session/actions.ex treats a voucher whose cumulativeAmount equals the channel's already-accepted cumulative amount as an idempotent success, returning the channel unchanged without calling maybe_spend/2. The credential verifies, the protected resource is served, and spent and units stay where they were. Because the server issues a fresh challenge per request and the credential replay store keys on challenge id and payload, the same signed voucher can be re-presented under every new challenge, so one paid voucher yields an unbounded number of paid units. The path is reachable from any method built on MPP.Session.Method through the Plug, MCP, JSON-RPC and WebSocket transports.
This issue affects mpp: from 0.14.0 before 0.16.2.
📍 영향받는 시스템
mpp: 0.14.0 버전부터 0.16.2 미만 버전
⚔️ 공격 벡터
이미 사용된 유효한 바우처를 새로운 서버 챌린지에 맞춰 재전송하여 결제 없이 리소스를 요청하는 방식
🛡️ 대응 방법
mpp 버전을 0.16.2 이상으로 업데이트하여 바우처 검증 로직을 수정해야 합니다.
🔧 검증 코드
출력된 버전 번호가 0.14.0 이상 0.16.2 미만인지 확인합니다.
elixir -S mix exec iex -S mpp -e 'Mix.Project.version()' 2>/dev/null