# GHSA-P9FV-9W58-95X2: Summary Two coupled gaps in MPP.Methods.Tempo.KeyAuthorization / MPP.Methods.Tempo.Subscription, both closed upstream by mppx #882 (commit 43ec92c, 2026-09-09, "fix: bind subscription authorizations…

- Database: GitHub
- Severity: CVSS 5.9 (Medium)
- Published: 2026-09-11
- Modified: 2026-09-11

## Affected versions

- mpp (Hex): through 0.16.1

## Description

## Summary

Two coupled gaps in `MPP.Methods.Tempo.KeyAuthorization` / `MPP.Methods.Tempo.Subscription`, both closed upstream by **mppx #882** (commit 43ec92c, 2026-09-09, "fix: bind subscription authorizations to challenges"):

1. **No challenge binding (security).** The payer signs a Tempo `KeyAuthorization` over `[chainId, keyType, keyId, expiry, limits, scopes]` only. Our verifier (`KeyAuthorization.verify/3`) pins chain id, access key, key type, expiry, limit and scopes against the subscription request, and `Subscription.activate/4` dedups activations by **challenge id** (`activation_key/2` — `lib/mpp/methods/tempo/subscription.ex`). The access key is a static per-endpoint server key (`subscription_access_key_private_key`), so the same signed authorization verifies against **every** challenge the server issues for the same subscription terms. Anyone who captures the `keyAuthorization` credential (MITM on a non-TLS hop, a log, a compromised intermediary, the client's own retry buffer) can present it under a fresh challenge: the dedup key differs, `claim_activation` succeeds, `SubscriptionTransaction.build` + broadcast runs again, and the payer's wallet is charged a new first-period settlement and (re-)authorizes the server key. Bound only by `subscriptionExpires` and the chain's own keychain semantics for re-installing an existing key (not verified — treat as no guard).

2. **Wire interop (functional, same fix).** ox/tempo's `KeyAuthorization` tuple is `[chainId, keyType, keyId, expiry, limits, calls, witness?, isAdmin?, account?]` (verified against `wevm/ox` `src/tempo/KeyAuthorization.ts` `fromTuple` / `AuthorizationTuple`, fetched 2026-09-11 via `gh api repos/wevm/ox/contents/src/tempo/KeyAuthorization.ts`). Our `parse_authorization/1` matches exactly six elements, so any authorization carrying the 32-byte `witness` — which mppx clients now always emit for subscriptions (`getSubscriptionChallengeWitness(challenge.id)`, `src/tempo/subscription/KeyAuthorization.ts`) — is rejected with "keyAuthorization contains unsupported or missing fields". Current mppx subscription clients cannot activate against our server.

mpp-rs has no subscription implementation, so ox + mppx are the only reference; ox is the Tempo wire authority.

## Affected code

- `lib/mpp/methods/tempo/key_authorization.ex` — `parse_authorization/1` (6-element match), `verify/3` (no witness / challenge check), `wallet_params/2` and `from_rpc/1` (no witness on the RPC path).
- `lib/mpp/methods/tempo/subscription.ex` — `activate/4` / `activation_key/2` (challenge-keyed dedup with a static access key).
- `test/mpp/methods/tempo/subscription_test.exs` covers replay for the **same** challenge only ("rejects a replayed activation credential for the same challenge"); there is no cross-challenge test.

## Fix to port (mppx #882 shape)

- Codec: accept the trailing optional `witness` (32 bytes), `isAdmin` (strictly `0x01` when present), `account` (20 bytes) elements per ox `fromTuple`; keep the signed digest = keccak(RLP(full authorization tuple)) — `verify_signature/2` already hashes the list as-is, so accepting 7+ elements makes the witness part of the signed payload automatically.
- Verifier: require `authorization.witness == base64url-decode(challenge.id)` (32 bytes; our challenge ids are HMAC-SHA256 so the size holds) and fail with "keyAuthorization challenge mismatch"; reject `isAdmin`/`account`-bearing authorizations on the subscription path (not a subscription shape).
- Wallet path: include `witness` in `wallet_params/2` and carry it through `from_rpc/1` so server-driven `wallet_authorizeAccessKey` flows produce bound authorizations.
- Tests: cross-challenge replay rejected; a real mppx-signed authorization (QuickBEAM `:cross_validation`) verifies; Moderato integration activation with a witness-bound key.
- Until the client side is updated, our built-in client (if/when it signs subscriptions) must emit the witness too.

## Severity

Medium: requires capture of a credential in transit or at rest (AC:H), then causes repeated on-chain settlement against the payer (I:H on the payer's funds, bounded by the subscription limit per period and by `subscriptionExpires`). Suggested CVSS 3.1: AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N (5.9).

## Disclosure

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

## References

- https://github.com/ZenHive/mpp/security/advisories/GHSA-p9fv-9w58-95x2

Page: https://cve.now/GHSA-P9FV-9W58-95X2

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