GHSA-jg6q-3qfh-r9f8: High severity npm/@insumermodel/mppx-token-gate vulnerability
Impact
Both packages wrap an mppx payment method so that a wallet meeting on-chain conditions is granted free access instead of being charged.
The free-access path reads the payer address from credential.source — a client-supplied DID in the payment credential — asks InsumerAPI whether that address satisfies the configured conditions, and on a pass returns a successful receipt without ever calling the wrapped payment verifier. Nothing in that path establishes that the caller controls the wallet it named.
Because qualifying wallets are public chain state, an attacker does not need to guess one. Naming any qualifying address in credential.source is sufficient to obtain free access to a route that should have been paid for. An in-process cache (default TTL 300s, keyed on wallet and conditions) then re-serves the grant without re-evaluating.
mppx documents this requirement explicitly. Its type definitions describe source as "an asserted identity, not independent proof of control", and state that methods relying on it "must validate the relationship to the credential payload". These packages did not.
This is a defect in these wrapper packages, not in the attestation they consume. The attestation answers one question — does this wallet satisfy these conditions — and answered it honestly about the address it was given. Binding that address to the caller was the wrapper's responsibility.
Affected versions
Every published version of both packages is affected. The vulnerable control flow is present from the first release of each.
Patches
Fixed releases will not grant free access unless the payer has been proven, and fall through to the paid path wherever no proven payer is available.
Workarounds
Remove the condition gate from the payment method until a fixed version is installed, so all requests take the normal paid path. Alternatively, ensure the wrapped payment method has already bound the credential to the payer before the gate is consulted.
Credit
Reported by @chenshj73, who identified the issue, traced the exact code path, and proposed correct remediations.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
npm/@insumermodel/mppx-token-gateto a version that resolves this vulnerability.Fixed in 1.0.4 - Upgrade
Upgrade
npm/@insumermodel/mppx-condition-gateto a version that resolves this vulnerability.Fixed in 3.0.0 - Configuration
Remove or disable the condition gate from the payment method until a fixed version is installed, so requests take the normal paid path.
mppx payment method condition gate = disabled - Compensating control
Ensure the wrapped payment method has already bound the credential to the payer before consulting the condition gate.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using either npm/@insumermodel/mppx-token-gate or npm/@insumermodel/mppx-condition-gate are exposed on routes where the wrapper grants free access based on configured on-chain wallet conditions. The issue is in these wrapper packages, not in the underlying attestation mechanism.
What does an attacker need to bypass payment?
The attacker only needs to supply a qualifying wallet address in credential.source. They do not need to control that wallet, because the packages treat the client-supplied DID as proof of ownership and do not call the wrapped payment verifier on the free-access path.
Are qualifying wallet addresses difficult for an attacker to obtain?
No. The qualifying conditions are based on public blockchain state, so an attacker can name any publicly visible wallet that meets the configured conditions.
How does caching affect exposure?
The in-process cache is keyed on wallet and conditions and has a default TTL of 300 seconds. Once a grant is cached, it can be returned during that period without re-evaluating the on-chain conditions.