Four real problems in the Python runtime — all about money
Bindu Core is the Python runtime. The thing bindufy() actually wraps around your handler — the HTTP server, the middleware, the scheduler, all of it.Four high-severity bugs live here right now. Every single one of them is in the x402 payment middleware. That’s not a coincidence — payment code is new, and payment code is the kind of code where small mistakes lose real money. So if you’re using x402 to charge for agent work, please read all four of these before you deploy.
Short version of the whole page: don’t treat x402 as your only line of revenue protection in the current release. Put something in front of it, or use a different payment model. We’ll explain why, one scenario at a time.
Bug #1: the locked door that opens on a bad knock
Slug:x402-middleware-fails-open-on-body-parseImagine a door with a card reader. Badge works, door opens. Badge doesn’t work, door stays shut. Simple.Now imagine a door with a card reader that, if it can’t read the badge at all (badge is broken, magnetic strip is damaged, whatever), just… opens. That’s what this bug does.Here’s the setup. Your agent has an x402 payment check in front of it. A request comes in with a body that fails to parse — maybe it’s truncated, maybe it’s bad UTF-8, maybe it’s deliberately malformed. Python’s json.loads throws an exception.The middleware catches the exception with a bare except Exception:. And then — this is the part that hurts — it calls await call_next(request) anyway. The request reaches your agent. The agent runs. No payment was ever checked.There’s a related trap right after that. The next check is “is the method in the protected_methods list?” If a request parses but reports an unknown method name, same thing — payment is bypassed.The code is at bindu/server/middleware/x402/x402_middleware.py lines 213–215. The right behavior is “if I can’t tell whether this is paid, reject it.” The current behavior is “let it through.”What to do today. If you’re running x402, make sure every path to your agent’s paid methods has to go through the parse check. Treat x402 as advisory — put something in front of it that actually enforces payment, like a reverse-proxy rule. x402 becomes your second line, not your only one.The real fix is to return a 402 on parse failure, and to narrow the except to just json.JSONDecodeError and UnicodeDecodeError.
Bug #2: one ticket, many shows
Slug:x402-no-replay-preventionConcert ticket scenario. You buy one ticket to a concert. You show it at the door. They scan it. You walk in. Great.Now imagine you walk out, walk back in, and they scan the same ticket again. And again. And again. All night. You bought one ticket; you got unlimited entries.That’s this bug.Alice pays $10 once. The server returns her a payment token. She attaches it as `X-PAYMENT` to Request A. All five checks pass — scheme, authorization, amount, network, balance. The task runs. The $10 clears on-chain. Everything looks right.Then she sends Request B with the exact same token. All five checks pass again. Task runs. No additional charge — the on-chain authorization already cleared, and nobody is tracking whether the token has been used before. She sends Request C. Request D. As many requests as she wants, until the token’s validBefore timestamp finally expires. That could be seconds. Or minutes. That’s a lot of free work for one payment.The function does five things, all of which are useful. What it doesn’t do is remember. The (nonce, payer) pair is never recorded. The (txhash, chain) pair is never recorded. The payment session token is never marked consumed.What to do today. Set very short validBefore windows on the authorizations your clients issue. Seconds, not minutes. That caps how much damage one replay can do.The real fix is to save (nonce, payer_address) in a dedupe store — something like Redis SETNX, keyed by the nonce, with a TTL that outlasts validBefore. Reject any payload whose nonce is already there.
Bug #3: the bouncer who doesn’t check the signature
Slug:x402-no-signature-verificationThis is the bad one. Pay attention.Mallory looks up Alice’s wallet address on-chain. That’s public information — she can just search for it. She also knows Alice holds USDC, because that’s also public. Now Mallory writes a plausible-looking EIP-3009 payment payload. She names Alice as the payer. She picks whatever amount she wants. And for the signature field — the bytes that cryptographically prove Alice actually authorized this — Mallory types in whatever she feels like.She sends it to your agent. The middleware checks: scheme good, network good, amount good, Alice has a balance. Four out of four. Request accepted. Your agent does the work. Mallory gets the result.Alice? Alice never gets charged. The forged authorization never clears on-chain, because it wasn’t really signed by her. But your agent already did the work. You burned real compute for free.Look at the validation routine at bindu/server/middleware/x402/x402_middleware.py lines 282–394. The docstring at line 292 literally labels the signature check “optional.” And the actual code skips it. Combined with the replay bug above, there is no cryptographic link between the caller and the payment at all.What to do today. Do not rely on x402 for revenue protection in the current release. Two decent options:
Sit x402 behind a proxy that verifies the signature out-of-band, before the request ever reaches your agent.
Turn x402 off and use a pre-paid credits model tied to an authenticated account.
The real fix is to call eth_account.Account.recover_message (or equivalent) on the EIP-3009 digest and reject the payment if the recovered address doesn’t match the claimed payer.
Bug #4: “no contract here” means “payment’s fine”
Slug:x402-balance-check-skipped-on-missing-contract-codeOne more scenario. You set up x402. You configure the token address. You typo the address — you copy-pasted from the wrong chain, or you fat-fingered a character. The token address you configured points at nothing.Or maybe your config is perfect, but your RPC provider has a hiccup and eth.get_code() briefly returns empty bytes. Same outcome from the gateway’s perspective.Here’s what the middleware does. It notices “there’s no contract at this address.” It logs a warning — "Skipping balance check". And then it returns True. Payment valid, according to the middleware. Attacker with a zero-balance wallet can now pay nothing and get work.The code is at bindu/server/middleware/x402/x402_middleware.py lines 348–352. Tiny thing to note: if the balance call throws an exception, the outer except Exception does fail closed — that part is correct. But the specific “no code at this address” branch doesn’t throw. It just logs a warning and falls through to “ok.”What to do today. Watch your logs for the string "No contract found at … Skipping balance check". If you see that in production, your payment check is effectively disabled. Pin a known-good RPC endpoint and verify the token address at startup before you accept any paid traffic.The real fix is to fail closed when the contract is missing, and to check the asset against a hardcoded list of known USDC addresses per chain at startup.
That’s the four
Those are the big ones, and they’re all about money. The Core medium page covers the rest — authentication edges, CORS config, a classic concurrency race. One click away in the sidebar.
{"docsConfig":{"theme":"linden","$schema":"https://mintlify.com/docs.json","name":"Bindu","colors":{"primary":"#8B5CF6","light":"#A78BFA","dark":"#7C3AED"},"logo":{"light":"https://mintcdn.com/pebbling/x2BFCGEbWywg69kQ/logo/light.svg?fit=max\u0026auto=format\u0026n=x2BFCGEbWywg69kQ\u0026q=85\u0026s=a69e734bb925e661b3c2ca2a20a050a9","dark":"https://mintcdn.com/pebbling/x2BFCGEbWywg69kQ/logo/dark.svg?fit=max\u0026auto=format\u0026n=x2BFCGEbWywg69kQ\u0026q=85\u0026s=626cbc8f4576b4f041a7757f563d178f"},"favicon":"https://mintcdn.com/pebbling/x2BFCGEbWywg69kQ/logo/light.svg?fit=max\u0026auto=format\u0026n=x2BFCGEbWywg69kQ\u0026q=85\u0026s=a69e734bb925e661b3c2ca2a20a050a9","background":{"color":{"light":"#FFFFFF","dark":"#111113"}},"navbar":{"links":[{"href":"https://discord.com/invite/3w5zuYUuwt","label":"Discord"}],"primary":{"type":"github","href":"https://github.com/getbindu/bindu"}},"footer":{"socials":{"x":"https://x.com/raahulrahl","github":"https://github.com/getbindu","discord":"https://discord.com/invite/3w5zuYUuwt","website":"https://getbindu.com"}},"seo":{"metatags":{"charset":"UTF-8","viewport":"width=device-width, initial-scale=1.0","description":"Bindu - A2A Protocol compliant agent framework for building intelligent, interoperable AI agents with DID support, skills system, and payment integration","keywords":"bindu, ai agents, a2a protocol, agent framework, did, decentralized identity, agent orchestration, skills system, x402 payment, agent-to-agent communication, multi-agent systems, python agents, autonomous agents, agent interoperability, decentralized agents, agent skills, agent payments, openai agents, langchain alternative, agent networking","author":"getbindu.com","canonical":"https://docs.getbindu.com","robots":"index, follow","googlebot":"index, follow","google":"notranslate","generator":"Mintlify","language":"en","distribution":"global","coverage":"Worldwide","category":"Technology","rating":"general","format-detection":"telephone=no","referrer":"origin-when-cross-origin","HandheldFriendly":"True","MobileOptimized":"320","theme-color":"#8B5CF6","color-scheme":"light dark","mobile-web-app-capable":"yes","apple-mobile-web-app-status-bar-style":"black-translucent","apple-mobile-web-app-title":"Bindu Docs","application-name":"Bindu Documentation","msapplication-TileColor":"#8B5CF6","og:title":"Bindu - A2A Protocol Compliant AI Agent Framework","og:type":"website","og:url":"https://docs.getbindu.com","og:image":"https://docs.getbindu.com/logo/light.svg","og:description":"Build intelligent, interoperable AI agents with A2A Protocol compliance, DID support, advanced orchestration, skills system, and X402 payment integration. The open-source framework for the internet of agents.","og:site_name":"Bindu Documentation","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@raahulrahl","twitter:creator":"@raahulrahl","twitter:title":"Bindu - A2A Protocol Compliant AI Agent Framework","twitter:description":"Build intelligent, interoperable AI agents with A2A Protocol compliance, DID support, advanced orchestration, skills system, and X402 payment integration. The open-source framework for the internet of agents.","twitter:image":"https://docs.getbindu.com/logo/light.svg","twitter:image:alt":"Bindu - AI Agent Framework Logo","article:author":"getbindu.com","article:section":"Technology","article:tag":"ai agents, a2a protocol, agent framework, decentralized identity, agent orchestration, multi-agent systems, python, autonomous agents, agent interoperability"},"indexing":"all"},"fonts":{"heading":{"family":"Geist","weight":600},"body":{"family":"Geist","weight":400}},"integrations":{"posthog":{"apiKey":"phc_hPgtdQyn5k1zZpvMl4uhYkzCAoGpJETZbmV67MtI2FQ"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode",{"title":"Request a feature","description":"Join the discussion on GitHub to request a new feature","icon":"plus","href":"https://github.com/getbindu/Bindu/discussions"}],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pebbling","hasAudioNarration":false,"actualSubdomain":"pebbling","customDomains":["docs.getbindu.com"],"gitSource":{"type":"github","owner":"raahulrahl","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"issues":true,"thumbs":true},"entitlements":{},"buildId":"6ae9265ef855326d3155ba17:success","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"default","tag":"Docs","count":52},{"language":"default","tag":"Developer Journey","count":52},{"language":"default","tag":"Examples","count":39},{"language":"default","tag":"Roadmap \u0026 Issues","count":22},{"language":"default","tag":"Known Issues","count":21},{"language":"default","tag":"Changelog","count":19},{"language":"default","tag":"Updates","count":19},{"language":"default","tag":"Gateway","count":17},{"language":"default","tag":"Advanced","count":15},{"language":"default","tag":"API Reference","count":14}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":true},"customCss":[{"filePath":"custom.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx3cwhsk.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxTcwhsk.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxPcwhsk.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx_cwhsk.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPx7cwhsk.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/jetbrainsmono/v24/tDbv2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKwBNntkaToggR7BYRbKPxDcwg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Plus Jakarta Sans';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--font-family: \"Plus Jakarta Sans\", system-ui, -apple-system, sans-serif;--font-mono: \"JetBrains Mono\", monospace;--line-height: 1.7;--text-color: #1f2937;--text-color-alt: #64748b;--background-color: #fafafa;--background-color-alt: #f1f5f9;--brand-primary: #8b5cf6;--brand-bg-subtle: rgba(139, 92, 246, 0.08);--brand-border-subtle: rgba(139, 92, 246, 0.2);--border-thickness: 1px;--scrollbar-thumb: #d1d5db;--scrollbar-hover: #9ca3af}html.dark{--text-color: #f3f4f6;--text-color-alt: #9ca3af;--background-color: #0c0c0d;--background-color-alt: #161618;--brand-primary: #a78bfa;--brand-bg-subtle: rgba(167, 139, 250, 0.15);--brand-border-subtle: rgba(167, 139, 250, 0.3);--scrollbar-thumb: #27272a;--scrollbar-hover: #3f3f46}html.dark .ascii-overlay{opacity:0.03}html.dark img,html.dark .mermaid{border:1px solid rgba(255, 255, 255, 0.08);box-shadow:0 4px 20px -4px rgba(0, 0, 0, 0.8)}html.dark img:hover{border:1px solid rgba(255, 255, 255, 0.15);box-shadow:0 8px 28px -6px rgba(0, 0, 0, 1)}body{font-family:var(--font-family);line-height:var(--line-height);color:var(--text-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}code,pre,kbd,.code-block{font-family:var(--font-mono)!important;font-size:0.95em}html{scroll-behavior:smooth;scroll-padding-top:120px}::selection{background-color:rgba(139, 92, 246, 0.25);color:inherit}:not(pre)>code{color:var(--brand-primary)!important;background-color:var(--brand-bg-subtle)!important;border:1px solid var(--brand-border-subtle)!important;padding:0.2em 0.4em!important;border-radius:6px!important;font-size:0.83em!important;font-weight:500}img,.mermaid{border-radius:8px;border:1px solid rgba(0, 0, 0, 0.06);box-shadow:0 4px 20px -4px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.08);transition:transform 0.2s ease-out, box-shadow 0.2s ease-out;margin-top:1.5rem;margin-bottom:1.5rem}img:hover{box-shadow:0 8px 28px -6px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.08)}img.clean-icon,html.dark img.clean-icon{border:none!important;box-shadow:none!important;margin:0!important;border-radius:0!important;background:transparent!important;transition:none!important;pointer-events:none!important}img.clean-icon:hover,html.dark img.clean-icon:hover{border:none!important;box-shadow:none!important;transform:none!important}hr{border:0!important;height:1px!important;background:linear-gradient(to right, transparent, var(--brand-border-subtle), transparent)!important;margin:2.5rem 0!important}blockquote{border-left:3px solid var(--brand-primary)!important;background-color:var(--brand-bg-subtle)!important;padding:1rem 1.5rem!important;border-radius:0 8px 8px 0!important;color:var(--text-color-alt)!important;margin:1.5rem 0!important;font-style:italic}blockquote p{margin:0!important}.ascii-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:1000;pointer-events:none;font-family:var(--font-mono);font-size:1rem;line-height:1.2;white-space:pre;overflow:hidden;padding:2rem;user-select:none;opacity:0.04;color:var(--text-color);-webkit-mask-image:linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);mask-image:linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%)}*{scrollbar-width:thin!important;scrollbar-color:var(--scrollbar-thumb) transparent!important}::-webkit-scrollbar{width:10px!important;height:10px!important}::-webkit-scrollbar-track{background:transparent!important}::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb)!important;border-radius:10px!important;border:3px solid var(--background-color)!important;background-clip:padding-box!important}::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-hover)!important}main .grid svg,main [class*=\"ring-1\"] svg,.prose .grid svg{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;max-height:20px!important;color:var(--brand-primary)!important;transition:transform 0.2s ease}main [class*=\"ring-1\"]:hover svg{transform:scale(1.1)}.brand-quote{display:inline-flex;align-items:center;gap:10px}.brand-quote .clean-icon{opacity:0.9}.brand-quote-text{font-size:0.875rem;font-weight:500;letter-spacing:0.025em;line-height:1.625;color:#374151}@media (min-width: 768px){.brand-quote-text{font-size:1rem}}.brand-quote-highlight{font-weight:600;color:#111827}html.dark .brand-quote-text{color:#d1d5db}html.dark .brand-quote-highlight{color:#ffffff}aside a,aside button,[data-testid=\"sidebar\"] a,[data-testid=\"sidebar\"] button{font-size:0.95rem!important;letter-spacing:0.01em}.prose p,.prose ul,.prose ol,.prose li{font-size:1.05rem!important;line-height:1.75!important}.prose h1{font-size:2.0rem!important;font-weight:600!important;letter-spacing:-0.03em!important;margin-bottom:1.5rem!important}.prose h2{font-size:1.35rem!important;font-weight:600!important;letter-spacing:-0.02em!important;margin-top:3rem!important;margin-bottom:1rem!important}.prose h3{font-size:1.15rem!important;font-weight:500!important;letter-spacing:-0.01em!important;margin-top:2rem!important;margin-bottom:0.75rem!important}.prose p>code,.prose li>code{font-size:0.9em!important}"}]}
{"page":{"pagePath":"roadmap/known-issues/core/overview","slug":"/roadmap/known-issues/core/overview","pageMetadata":{"title":"High","description":"Four real problems in the Python runtime — all about money","href":"/roadmap/known-issues/core/overview"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Four real problems in the Python runtime — all about money\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,hr:`hr`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Bindu Core is the Python runtime. The thing `,_jsx(_components.code,{children:`bindufy()`}),` actually wraps around your handler — the HTTP server, the middleware, the scheduler, all of it.`]}),`\n`,_jsx(_components.p,{children:`Four high-severity bugs live here right now. Every single one of them is in the x402 payment middleware. That’s not a coincidence — payment code is new, and payment code is the kind of code where small mistakes lose real money. So if you’re using x402 to charge for agent work, please read all four of these before you deploy.`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Short version of the whole page: `,_jsx(_components.strong,{children:`don’t treat x402 as your only line of revenue protection in the current release.`}),` Put something in front of it, or use a different payment model. We’ll explain why, one scenario at a time.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bug-#1-the-locked-door-that-opens-on-a-bad-knock`,children:`Bug #1: the locked door that opens on a bad knock`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Slug:`}),` `,_jsx(_components.code,{children:`x402-middleware-fails-open-on-body-parse`})]}),`\n`,_jsx(_components.p,{children:`Imagine a door with a card reader. Badge works, door opens. Badge doesn’t work, door stays shut. Simple.`}),`\n`,_jsx(_components.p,{children:`Now imagine a door with a card reader that, if it can’t read the badge at all (badge is broken, magnetic strip is damaged, whatever), just… opens. That’s what this bug does.`}),`\n`,_jsxs(_components.p,{children:[`Here’s the setup. Your agent has an x402 payment check in front of it. A request comes in with a body that fails to parse — maybe it’s truncated, maybe it’s bad UTF-8, maybe it’s deliberately malformed. Python’s `,_jsx(_components.code,{children:`json.loads`}),` throws an exception.`]}),`\n`,_jsxs(_components.p,{children:[`The middleware catches the exception with a bare `,_jsx(_components.code,{children:`except Exception:`}),`. And then — this is the part that hurts — it calls `,_jsx(_components.code,{children:`await call_next(request)`}),` anyway. The request reaches your agent. The agent runs. No payment was ever checked.`]}),`\n`,_jsxs(_components.p,{children:[`There’s a related trap right after that. The next check is `,_jsx(_components.em,{children:`“is the method in the protected_methods list?”`}),` If a request parses but reports an unknown method name, same thing — payment is bypassed.`]}),`\n`,_jsxs(_components.p,{children:[`The code is at `,_jsx(_components.a,{href:`https://github.com/GetBindu/Bindu/blob/main/bindu/server/middleware/x402/x402_middleware.py`,children:_jsx(_components.code,{children:`bindu/server/middleware/x402/x402_middleware.py`})}),` lines 213–215. The right behavior is `,_jsx(_components.em,{children:`“if I can’t tell whether this is paid, reject it.”`}),` The current behavior is `,_jsx(_components.em,{children:`“let it through.”`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What to do today.`}),` If you’re running x402, make sure every path to your agent’s paid methods has to go through the parse check. Treat x402 as advisory — put something in front of it that actually enforces payment, like a reverse-proxy rule. x402 becomes your second line, not your only one.`]}),`\n`,_jsxs(_components.p,{children:[`The real fix is to return a 402 on parse failure, and to narrow the `,_jsx(_components.code,{children:`except`}),` to just `,_jsx(_components.code,{children:`json.JSONDecodeError`}),` and `,_jsx(_components.code,{children:`UnicodeDecodeError`}),`.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bug-#2-one-ticket-many-shows`,children:`Bug #2: one ticket, many shows`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Slug:`}),` `,_jsx(_components.code,{children:`x402-no-replay-prevention`})]}),`\n`,_jsx(_components.p,{children:`Concert ticket scenario. You buy one ticket to a concert. You show it at the door. They scan it. You walk in. Great.`}),`\n`,_jsx(_components.p,{children:`Now imagine you walk out, walk back in, and they scan the same ticket again. And again. And again. All night. You bought one ticket; you got unlimited entries.`}),`\n`,_jsx(_components.p,{children:`That’s this bug.`}),`\n`,_jsxs(_components.p,{children:[`Alice pays `,\"$10 once. The server returns her a payment token. She attaches it as `X-PAYMENT` to Request A. All five checks pass — scheme, authorization, amount, network, balance. The task runs. The $\",`10 clears on-chain. Everything looks right.`]}),`\n`,_jsxs(_components.p,{children:[`Then she sends Request B with the `,_jsx(_components.strong,{children:`exact same token`}),`. All five checks pass again. Task runs. No additional charge — the on-chain authorization already cleared, and nobody is tracking whether the token has been used before. She sends Request C. Request D. As many requests as she wants, until the token’s `,_jsx(_components.code,{children:`validBefore`}),` timestamp finally expires. That could be seconds. Or minutes. That’s a lot of free work for one payment.`]}),`\n`,_jsxs(_components.p,{children:[`The function does five things, all of which are useful. What it doesn’t do is remember. The `,_jsx(_components.code,{children:`(nonce, payer)`}),` pair is never recorded. The `,_jsx(_components.code,{children:`(txhash, chain)`}),` pair is never recorded. The payment session token is never marked consumed.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What to do today.`}),` Set very short `,_jsx(_components.code,{children:`validBefore`}),` windows on the authorizations your clients issue. Seconds, not minutes. That caps how much damage one replay can do.`]}),`\n`,_jsxs(_components.p,{children:[`The real fix is to save `,_jsx(_components.code,{children:`(nonce, payer_address)`}),` in a dedupe store — something like Redis `,_jsx(_components.code,{children:`SETNX`}),`, keyed by the nonce, with a TTL that outlasts `,_jsx(_components.code,{children:`validBefore`}),`. Reject any payload whose nonce is already there.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bug-#3-the-bouncer-who-doesn’t-check-the-signature`,children:`Bug #3: the bouncer who doesn’t check the signature`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Slug:`}),` `,_jsx(_components.code,{children:`x402-no-signature-verification`})]}),`\n`,_jsx(_components.p,{children:`This is the bad one. Pay attention.`}),`\n`,_jsxs(_components.p,{children:[`Mallory looks up Alice’s wallet address on-chain. That’s public information — she can just search for it. She also knows Alice holds USDC, because that’s also public. Now Mallory writes a plausible-looking EIP-3009 payment payload. She names Alice as the payer. She picks whatever amount she wants. And for the signature field — the bytes that cryptographically prove Alice actually authorized this — `,_jsx(_components.strong,{children:`Mallory types in whatever she feels like.`})]}),`\n`,_jsx(_components.p,{children:`She sends it to your agent. The middleware checks: scheme good, network good, amount good, Alice has a balance. Four out of four. Request accepted. Your agent does the work. Mallory gets the result.`}),`\n`,_jsx(_components.p,{children:`Alice? Alice never gets charged. The forged authorization never clears on-chain, because it wasn’t really signed by her. But your agent already did the work. You burned real compute for free.`}),`\n`,_jsxs(_components.p,{children:[`Look at the validation routine at `,_jsx(_components.a,{href:`https://github.com/GetBindu/Bindu/blob/main/bindu/server/middleware/x402/x402_middleware.py`,children:_jsx(_components.code,{children:`bindu/server/middleware/x402/x402_middleware.py`})}),` lines 282–394. The docstring at line 292 literally labels the signature check `,_jsx(_components.em,{children:`“optional.”`}),` And the actual code skips it. Combined with the replay bug above, `,_jsx(_components.strong,{children:`there is no cryptographic link between the caller and the payment at all`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What to do today.`}),` Do not rely on x402 for revenue protection in the current release. Two decent options:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Sit x402 behind a proxy that verifies the signature out-of-band, before the request ever reaches your agent.`}),`\n`,_jsx(_components.li,{children:`Turn x402 off and use a pre-paid credits model tied to an authenticated account.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The real fix is to call `,_jsx(_components.code,{children:`eth_account.Account.recover_message`}),` (or equivalent) on the EIP-3009 digest and reject the payment if the recovered address doesn’t match the claimed payer.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`bug-#4-“no-contract-here”-means-“payment’s-fine”`,children:`Bug #4: “no contract here” means “payment’s fine”`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Slug:`}),` `,_jsx(_components.code,{children:`x402-balance-check-skipped-on-missing-contract-code`})]}),`\n`,_jsx(_components.p,{children:`One more scenario. You set up x402. You configure the token address. You typo the address — you copy-pasted from the wrong chain, or you fat-fingered a character. The token address you configured points at nothing.`}),`\n`,_jsxs(_components.p,{children:[`Or maybe your config is perfect, but your RPC provider has a hiccup and `,_jsx(_components.code,{children:`eth.get_code()`}),` briefly returns empty bytes. Same outcome from the gateway’s perspective.`]}),`\n`,_jsxs(_components.p,{children:[`Here’s what the middleware does. It notices `,_jsx(_components.em,{children:`“there’s no contract at this address.”`}),` It logs a warning — `,_jsx(_components.code,{children:`\"Skipping balance check\"`}),`. And then it `,_jsxs(_components.strong,{children:[`returns `,_jsx(_components.code,{children:`True`})]}),`. Payment valid, according to the middleware. Attacker with a zero-balance wallet can now pay nothing and get work.`]}),`\n`,_jsxs(_components.p,{children:[`The code is at `,_jsx(_components.a,{href:`https://github.com/GetBindu/Bindu/blob/main/bindu/server/middleware/x402/x402_middleware.py`,children:_jsx(_components.code,{children:`bindu/server/middleware/x402/x402_middleware.py`})}),` lines 348–352. Tiny thing to note: if the balance call `,_jsx(_components.em,{children:`throws`}),` an exception, the outer `,_jsx(_components.code,{children:`except Exception`}),` does fail closed — that part is correct. But the specific “no code at this address” branch doesn’t throw. It just logs a warning and falls through to “ok.”`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`What to do today.`}),` Watch your logs for the string `,_jsx(_components.code,{children:`\"No contract found at … Skipping balance check\"`}),`. If you see that in production, your payment check is effectively disabled. Pin a known-good RPC endpoint and verify the token address at startup before you accept any paid traffic.`]}),`\n`,_jsxs(_components.p,{children:[`The real fix is to fail closed when the contract is missing, and to check the `,_jsx(_components.code,{children:`asset`}),` against a hardcoded list of known USDC addresses per chain at startup.`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`that’s-the-four`,children:`That’s the four`}),`\n`,_jsx(_components.p,{children:`Those are the big ones, and they’re all about money. The Core medium page covers the rest — authentication edges, CORS config, a classic concurrency race. One click away in the sidebar.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"High","description":"Four real problems in the Python runtime — all about money","href":"/roadmap/known-issues/core/overview"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Bug #1: the locked door that opens on a bad knock","slug":"bug-#1-the-locked-door-that-opens-on-a-bad-knock","depth":2,"children":[]},{"title":"Bug #2: one ticket, many shows","slug":"bug-#2-one-ticket-many-shows","depth":2,"children":[]},{"title":"Bug #3: the bouncer who doesn’t check the signature","slug":"bug-#3-the-bouncer-who-doesn’t-check-the-signature","depth":2,"children":[]},{"title":"Bug #4: “no contract here” means “payment’s fine”","slug":"bug-#4-“no-contract-here”-means-“payment’s-fine”","depth":2,"children":[]},{"title":"That’s the four","slug":"that’s-the-four","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"pebbling","siteName":"Bindu","title":"Bindu - A2A Protocol Compliant AI Agent Framework","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-20T10:14:24.916Z","originalFileLocation":"roadmap/known-issues/core/overview.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Four real problems in the Python runtime — all about money\">\u003cmeta data-mint-head name=\"keywords\" content=\"bindu, ai agents, a2a protocol, agent framework, did, decentralized identity, agent orchestration, skills system, x402 payment, agent-to-agent communication, multi-agent systems, python agents, autonomous agents, agent interoperability, decentralized agents, agent skills, agent payments, openai agents, langchain alternative, agent networking\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bindu\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Bindu - A2A Protocol Compliant AI Agent Framework\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build intelligent, interoperable AI agents with A2A Protocol compliance, DID support, advanced orchestration, skills system, and X402 payment integration. The open-source framework for the internet of agents.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Bindu Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.getbindu.com/roadmap/known-issues/core/overview\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.getbindu.com/logo/light.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Bindu - A2A Protocol Compliant AI Agent Framework\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build intelligent, interoperable AI agents with A2A Protocol compliance, DID support, advanced orchestration, skills system, and X402 payment integration. The open-source framework for the internet of agents.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.getbindu.com/logo/light.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/pebbling/l7BW2S_fVMiOujyl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Bindu Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8B5CF6\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"charset\" content=\"UTF-8\">\u003cmeta data-mint-head name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\u003cmeta data-mint-head name=\"author\" content=\"getbindu.com\">\u003cmeta data-mint-head name=\"googlebot\" content=\"index, follow\">\u003cmeta data-mint-head name=\"google\" content=\"notranslate\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"language\" content=\"en\">\u003cmeta data-mint-head name=\"distribution\" content=\"global\">\u003cmeta data-mint-head name=\"coverage\" content=\"Worldwide\">\u003cmeta data-mint-head name=\"category\" content=\"Technology\">\u003cmeta data-mint-head name=\"rating\" content=\"general\">\u003cmeta data-mint-head name=\"format-detection\" content=\"telephone=no\">\u003cmeta data-mint-head name=\"referrer\" content=\"origin-when-cross-origin\">\u003cmeta data-mint-head name=\"HandheldFriendly\" content=\"True\">\u003cmeta data-mint-head name=\"MobileOptimized\" content=\"320\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#8B5CF6\">\u003cmeta data-mint-head name=\"color-scheme\" content=\"light dark\">\u003cmeta data-mint-head name=\"mobile-web-app-capable\" content=\"yes\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\u003cmeta data-mint-head name=\"application-name\" content=\"Bindu Documentation\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@raahulrahl\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"Bindu - AI Agent Framework Logo\">\u003cmeta data-mint-head name=\"article:author\" content=\"getbindu.com\">\u003cmeta data-mint-head name=\"article:section\" content=\"Technology\">\u003cmeta data-mint-head name=\"article:tag\" content=\"ai agents, a2a protocol, agent framework, decentralized identity, agent orchestration, multi-agent systems, python, autonomous agents, agent interoperability\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.getbindu.com/roadmap/known-issues/core/overview\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/roadmap/known-issues/core/overview.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.getbindu.com/#organization\",\"name\":\"Bindu\",\"url\":\"https://docs.getbindu.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pebbling/x2BFCGEbWywg69kQ/logo/light.svg?fit=max\u0026auto=format\u0026n=x2BFCGEbWywg69kQ\u0026q=85\u0026s=a69e734bb925e661b3c2ca2a20a050a9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.getbindu.com#website\",\"name\":\"Bindu\",\"url\":\"https://docs.getbindu.com\",\"publisher\":{\"@id\":\"https://docs.getbindu.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview#webpage\",\"url\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview\",\"name\":\"High\",\"description\":\"Four real problems in the Python runtime — all about money\",\"dateModified\":\"2026-04-20T10:14:24.916Z\",\"isPartOf\":{\"@id\":\"https://docs.getbindu.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Known Issues\",\"item\":\"https://docs.getbindu.com/roadmap/known-issues/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"High\",\"item\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview#article\",\"headline\":\"High\",\"name\":\"High\",\"description\":\"Four real problems in the Python runtime — all about money\",\"url\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview\",\"mainEntityOfPage\":{\"@id\":\"https://docs.getbindu.com/roadmap/known-issues/core/overview#webpage\"},\"image\":\"https://docs.getbindu.com/logo/light.svg\",\"dateModified\":\"2026-04-20T10:14:24.916Z\",\"publisher\":{\"@id\":\"https://docs.getbindu.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.getbindu.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Bindu\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Bindu\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/roadmap/known-issues/core/overview.md","siteName":"Bindu","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":""}]},{"tab":"Docs","pages":[{"title":"Docs","href":"/bindu/introduction/what-is-bindu"}]},{"tab":"Examples","pages":[{"title":"Examples","href":"/examples/beginner/echo-agent"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api/introduction"}]},{"tab":"Gateway API","pages":[{"title":"Gateway API","href":"/gateway-api/introduction"}]},{"tab":"Roadmap \u0026 Issues","groups":[{"group":"Roadmap","pages":[{"title":"Roadmap","href":"/roadmap/introduction/overview"}]},{"group":"Known Issues","pages":[{"title":"Overview","href":"/roadmap/known-issues/overview"},{"group":"Gateway","pages":[{"title":"High","href":"/roadmap/known-issues/gateway/overview"},{"title":"Medium","href":"/roadmap/known-issues/gateway/medium"},{"title":"Low","href":"/roadmap/known-issues/gateway/low"},{"title":"Nits","description":"Small stuff that bugs the careful reader","href":"/roadmap/known-issues/gateway/nits"}]},{"group":"Bindu Core","pages":[{"title":"High","href":"/roadmap/known-issues/core/overview"},{"title":"Medium","description":"Seven more Core bugs — auth edges, CORS, and a concurrency race","href":"/roadmap/known-issues/core/medium"},{"title":"Low","href":"/roadmap/known-issues/core/low"}]},{"group":"Postmortems","pages":[{"title":"Overview","href":"/roadmap/known-issues/postmortems/overview"},{"group":"Bindu Core","pages":[{"title":"DID signature middleware fails open when signature headers or public key are missing","href":"/roadmap/known-issues/postmortems/core/did-signature-fail-open"},{"title":"Any authenticated caller could read or mutate another caller's tasks and contexts","href":"/roadmap/known-issues/postmortems/core/idor-task-ownership"},{"title":"Server rejected snake_case input even though Python types used snake_case attributes","href":"/roadmap/known-issues/postmortems/core/types-populate-by-name"},{"title":"DID resolution endpoint bypassed the camelCase wire contract","href":"/roadmap/known-issues/postmortems/core/did-document-endpoint-raw-dict"},{"title":"verify_signature caught every exception and made real bugs look like bad signatures","href":"/roadmap/known-issues/postmortems/core/did-signature-overbroad-exceptions"}]},{"group":"Gateway","pages":[{"title":"Concurrent /plan requests on same session ran compaction twice, racing on the summary","href":"/roadmap/known-issues/postmortems/gateway/compaction-concurrent-races"},{"title":"Session compaction overwrote prior summary, progressively losing facts","href":"/roadmap/known-issues/postmortems/gateway/compaction-lossy-second-pass"},{"title":"Compaction split landed mid-turn, breaking tool_use/tool_result pairing","href":"/roadmap/known-issues/postmortems/gateway/compaction-mid-turn-cut"},{"title":"A stuck peer could stall a /plan for five minutes per tool call","href":"/roadmap/known-issues/postmortems/gateway/poll-budget-unbounded-wall-clock"},{"title":"SSE reader fibers never terminated, leaking PubSub subscribers per request","href":"/roadmap/known-issues/postmortems/gateway/spawnreader-fiber-leak"},{"title":"SSE events leaked across concurrent /plan requests","href":"/roadmap/known-issues/postmortems/gateway/sse-cross-contamination"},{"title":"Bearer token comparison was timing-unsafe, recoverable byte-by-byte","href":"/roadmap/known-issues/postmortems/gateway/timing-unsafe-token-compare"}]}]}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/v2026.21.1"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/faq/introduction/overview"}]}]},"basePath":"","title":"Bindu - A2A Protocol Compliant AI Agent Framework","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":[],"chunks":[]}