# GHSA-8C63-R789-XRRF: Session voucher that adds no new funds is accepted and the request is served without a charge — unlimited free units after one paid voucher

- Database: GitHub
- Severity: CVSS 7.5 (High)
- Published: 2026-09-11
- Modified: 2026-09-11

## Affected versions

- mpp (Hex): through 0.16.1

## Description

## Summary

`MPP.Session.Actions.accept_voucher/3` treats a voucher whose `cumulativeAmount` equals the channel's already-accepted cumulative amount as an idempotent success: it returns `{:ok, channel}` **without** calling `maybe_spend/2`, so the request is verified and the protected resource is served while `spent` and `units` stay unchanged. Because the server issues a fresh challenge per request and the credential-level replay dedup (`MPP.Replay`) is keyed on challenge id + payload, a client can re-present the same signed voucher under every new challenge and receive an unbounded number of paid units for the price of one.

Upstream mpp-rs had the identical silent-accept branch and fixed it in **mpp-rs #415** (commit d859a13, 2026-09-10, `src/protocol/methods/tempo/session_method.rs`): a voucher with `cumulative_amount <= state.highest_voucher_amount` is now rejected with `DeltaTooSmall` ("voucher does not add new funds"), and the minimum-delta check is re-run inside the atomic store update so concurrent identical vouchers have exactly one winner.

## Affected code

- `lib/mpp/session/actions.ex` — `accept_voucher/3`: the first `cond` branch `payload.cumulative_amount == channel.cumulative_amount -> {:ok, channel}` (no spend, no error).
- The behaviour is pinned by `test/mpp/session/actions_test.exs` "treats an equal cumulative voucher as idempotent", which asserts `channel.units == 1` after a second request — i.e. the test ratifies the free request.
- Reachable from any method built on `MPP.Session.Method` (documented public API, README module map) via `MPP.Plug` / MCP / JSON-RPC / WebSocket transports with a session intent.

## Reproduction (unit level)

1. `open` with `cumulativeAmount = 50`, `request_amount = 10` → `spent = 10`, `units = 1`.
2. Present `voucher` with `cumulativeAmount = 50` (same signature) under a new challenge → `{:ok, receipt}`, resource served, `spent = 10`, `units = 1`.
3. Repeat step 2 indefinitely: every request is served, nothing is charged.

The upstream test `test_concurrent_voucher_acceptance_has_one_winner` (mpp-rs #415) is the reference for the concurrent case; our `Store.update/3` closure already runs the checks atomically, so only the equal-amount branch needs to change.

## Fix to port

In `accept_voucher/3`: reject `payload.cumulative_amount <= channel.cumulative_amount` with `delta-too-small` ("voucher does not add new funds") — the `<` branch already errors, so collapse `==` into it — and keep the `delta < min_delta` check inside the atomic update. Flip the "idempotent" test to assert rejection, and add a concurrent-identical-voucher test showing one winner. Consider whether a voucher that adds funds but less than `request_amount` should still be served from the remaining `available_balance` (current `apply_spend` semantics) — that path is unchanged by this fix.

## Severity

High: payment bypass in a money-handling library; requires only a legitimately opened channel (low privileges), no user interaction, integrity impact high (unpaid service delivery). Suggested CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N (6.5) — bump to High given the direct revenue-loss consequence.

## Disclosure

Draft until the fix ships; publish with the patched release per SECURITY.md. Found by the 2026-09-11 sdk-delta-watch sweep (mpp-rs #415).

## References

- https://github.com/ZenHive/mpp/security/advisories/GHSA-8c63-r789-xrrf

Page: https://cve.now/GHSA-8C63-R789-XRRF

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
