CVE-2026-63634: EVM Calldata Padding Gas Drainage in pympp Fee-Payer Verification
Vulnerability ID: CVE-2026-63634
CVSS Score: 6.9
Published: 2026-11-17
CVE-2026-63634 is an improper input validation vulnerability (CWE-20) in pympp, the official Python SDK for the Machine Payments Protocol (MPP) developed by tempoxyz. In versions prior to 0.9.1, servers acting as transaction fee payers validate incoming Ethereum Virtual Machine (EVM) transaction calldata using minimum-length thresholds rather than exact byte-length assertions. Because EVM smart contract dispatchers ignore trailing unparsed bytes while the protocol charges intrinsic gas for every byte in a transaction payload, an unauthenticated attacker can append thousands of non-zero padding bytes to legitimate payment requests. The server cosigns and broadcasts the oversized transaction, forcing the fee-payer wallet to expend inflated gas costs up to the policy limit and depleting its native token reserves.
TL;DR
Versions of the pympp Python SDK prior to 0.9.1 fail to enforce strict upper bounds on ABI-encoded transaction calldata during fee-payer sponsorship validation. Unauthenticated attackers can append arbitrary non-zero byte padding to valid payment transactions, inflating intrinsic EVM gas costs and draining the server's fee-payer wallet.
⚠️ Exploit Status: POC
Technical Details
- Vulnerability ID: CVE-2026-63634 / GHSA-v858-xh7w-8jr5
- CWE Classification: CWE-20 (Improper Input Validation)
- CVSS v4.0 Score: 6.9 Medium (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N)
- EPSS Score: 0.291% (22.01st Percentile)
- Attack Vector: Network (Unauthenticated Sponsored Transaction Submission)
- Primary Impact: Economic Gas Drainage of Server Fee-Payer Wallet
- Affected Versions: pympp < 0.9.1
- Patched Version: pympp 0.9.1
Affected Systems
- tempoxyz/pympp (PyPI: pympp)
- pympp: < 0.9.1 (Fixed in:
0.9.1)
Code Analysis
Commit: 57a750d
fix: enforce exact calldata length in fee payer validation (#160)
diff --git a/src/mpp/methods/tempo/intents.py b/src/mpp/methods/tempo/intents.py index 9ba39e9f..cf213e16 100644 --- a/src/mpp/methods/tempo/intents.py +++ b/src/mpp/methods/tempo/intents.py @@ -37,6 +37,10 @@ TRANSFER_WITH_MEMO_SELECTOR = "95777d59" APPROVE_SELECTOR = "095ea7b3" SWAP_EXACT_AMOUNT_OUT_SELECTOR = "b30d91d5" +TRANSFER_CALLDATA_HEX_LENGTH = 8 + (2 * 64) +TRANSFER_WITH_MEMO_CALLDATA_HEX_LENGTH = 8 + (3 * 64) +APPROVE_CALLDATA_HEX_LENGTH = 8 + (2 * 64) +SWAP_EXACT_AMOUNT_OUT_CALLDATA_HEX_LENGTH = 8 + (4 * 64) TRANSFER_TOPIC = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" TRANSFER_WITH_MEMO_TOPIC = "0x57bc7354aa85aed339e000bccffabbc529466af35f0772c8f8ee1145927de7f0" @@ -151,18 +155,20 @@ def _match_single_transfer_calldata( memo: bytes | None, ) -> bool: """Check if ABI-encoded calldata matches a single expected transfer.""" - if len(call_data_hex) < 136: - return False - selector = call_data_hex[:8].lower() if memo is not None: if selector != TRANSFER_WITH_MEMO_SELECTOR: return False + if len(call_data_hex) != TRANSFER_WITH_MEMO_CALLDATA_HEX_LENGTH: + return False elif selector == TRANSFER_WITH_MEMO_SELECTOR: - if len(call_data_hex) < 200: + if len(call_data_hex) != TRANSFER_WITH_MEMO_CALLDATA_HEX_LENGTH: return False - elif selector != TRANSFER_SELECTOR: + elif selector == TRANSFER_SELECTOR: + if len(call_data_hex) != TRANSFER_CALLDATA_HEX_LENGTH: + return False + else: return False decoded_to = "0x" + call_data_hex[32:72] @@ -174,8 +180,6 @@ def _match_single_transfer_calldata( return False if memo is not None: - if len(call_data_hex) < 200: - return False decoded_memo = bytes.fromhex(call_data_hex[136:200]) if decoded_memo != memo: return False @@ -248,19 +252,21 @@ def _is_already_known_transaction_error(result: dict[str, Any]) -> bool: def _match_transfer_calldata(call_data_hex: str, request: ChargeRequest) -> bool: """Check if ABI-encoded calldata matches the expected transfer parameters.""" - if len(call_data_hex) < 136: - return False - selector = call_data_hex[:8].lower() expected_memo = request.methodDetails.memo if expected_memo: if selector != TRANSFER_WITH_MEMO_SELECTOR: return False + if len(call_data_hex) != TRANSFER_WITH_MEMO_CALLDATA_HEX_LENGTH: + return False elif selector == TRANSFER_WITH_MEMO_SELECTOR: - if len(call_data_hex) < 200: + if len(call_data_hex) != TRANSFER_WITH_MEMO_CALLDATA_HEX_LENGTH: return False - elif selector != TRANSFER_SELECTOR: + elif selector == TRANSFER_SELECTOR: + if len(call_data_hex) != TRANSFER_CALLDATA_HEX_LENGTH: + return False + else: return False decoded_to = "0x" + call_data_hex[32:72] @@ -272,8 +278,6 @@ def _match_transfer_calldata(call_data_hex: str, request: ChargeRequest) -> bool return False if expected_memo: - if len(call_data_hex) < 200: - return False decoded_memo = "0x" + call_data_hex[136:200] memo_clean = expected_memo.lower() if not memo_clean.startswith("0x"): @@ -321,6 +325,10 @@ def _validate_call_scope(calls: list[tuple[str, int, str]]) -> int: if has_swap_prefix: approve_to, _, approve_data = calls[0] swap_to, _, swap_data = calls[1] + if len(approve_data) != APPROVE_CALLDATA_HEX_LENGTH: + raise VerificationError("Invalid transaction: malformed approve call data") + if len(swap_data) != SWAP_EXACT_AMOUNT_OUT_CALLDATA_HEX_LENGTH: + raise VerificationError("Invalid transaction: malformed swap call data") approve_spender = _decode_call_address_arg(approve_data, 0) swap_token_in = _decode_call_address_arg(swap_data, 0) Exploit Details
- GitHub: Official regression tests in tests/test_tempo_Validation.py demonstrating padded transfer, approve, and swap calldata payloads.
Mitigation Strategies
- Upgrade pympp to version 0.9.1 or later to enforce exact ABI calldata length validation.
- Tighten FeePayerPolicy gas caps by lowering max_gas_limit from the 2,000,000 default to match actual expected execution costs (e.g., 100,000 to 200,000 gas).
- Enforce strict HTTP request body and header size limits at the web server or WAF layer to block oversized serialized transaction envelopes.
- Monitor fee-payer wallet gas expenditure per transaction and alert on VerificationError exceptions indicating malformed call data.
Remediation Steps:
- Audit Python environments and dependency lockfiles (requirements.txt, pyproject.toml, poetry.lock, uv.lock) for pympp versions prior to 0.9.1.
- Run
pip install --upgrade "pympp>=0.9.1"to install the patched release. - Verify the installed version by running
python -c "import mpp; print(mpp.__version__)"and confirming the output is 0.9.1 or higher. - Review historical transactions signed by the server's fee-payer wallet on-chain to verify whether any sponsored transactions consumed abnormally high gas limits.
References
- GitHub Security Advisory: GHSA-v858-xh7w-8jr5
- GitHub Commit: 57a750d0d980b8e6c3bea62a40b7621f176ff1f0
- pympp Release v0.9.1
- NVD - CVE-2026-63634
- CVE.org Record: CVE-2026-63634
- CVEListV5 JSON Record: CVE-2026-63634
Read the full report for CVE-2026-63634 on our website for more details including interactive diagrams and full exploit analysis.