Skip to content

Case study · Web3

Cross-Chain Intent Bridge and Relayer Protocol

An unauthenticated Swap API accepted up to a 99% integrator fee to an arbitrary wallet inside bridge-deposit calldata, while a development indexer served live production transfer records at 57-second freshness.

Findings · 11
1 Critical2 High5 Medium3 Low
FindingVulnerabilitySeverity
3.1Unauthenticated integrator-fee injection on the Swap APIThe Swap API builds ready-to-sign bridge transactions for wallets and third-party integrators. It supports an optional integrator fee (appFee and appFeeRecipient) so partner applications can earn a small commission.Critical
3.2Production transfer database served unauthenticated on a dev-labeled indexer twinUnauthenticated GET /deposits requests against dev.indexer.bridge.example returned live production bridge records with Access-Control-Allow-Origin: *.High
3.3Asymmetric slow-query denial of service on the v4 indexerOn the newer v4 production indexer (indexer.bridge.example), a single unauthenticated request using certain common filter parameters tied up a backend database connection for over four minutes.High
3.4Reflective cross-origin policy and unthrottled entitlement harvestingThe public identity and rewards API (api.bridge.example) echoed any website's Origin header in Access-Control-Allow-Origin and permitted Authorization on all 30 documented routes.Medium2 findings
Legacy v3 indexer replica-pinning 500 error oracleUnindexed inputToken, outputToken, and bogus integratorId filters stall 24–37s (p50 35.7s, 5/5) before returning raw PostgreSQL canceling statement due to conflict with recovery errors, pinning replica connections and disclosing hot-standby topology.Medium
Latent PDA internal-accounting fields in v4 serializerdepositAddress, sweepTxnRef, and depositRefundAddress are structurally emitted on unauthenticated v4 indexer responses; 0/11,324 records populated today, while legacy v3 validators have begun loosening to accept the new transit deposit type.MediumLatent High
Unauthenticated MCP JSON-RPC server (mcp.bridge.example)Exposes 14 callable tools without login, including app-visibility track_deposit_app, unauthenticated recrawl_docs (background job DoS), arbitrary depositor quote generation…Medium
Staging auction API wildcard CORS and /health disclosurestaging.bridge.example returns ACAO: * (even on 401 responses) and exposes internal cache counts (active_auctions, relayer_configs, ws_subscribers) and connection-pool telemetry unauthenticated on /health.Medium
Early-access partner API schemas publicly readableearly-docs.bridge.example publishes unreleased sponsored deposit-address, gasless, and counterfactual API specs without the partner gate; the actual endpoints correctly enforce 403 FORBIDDEN_API_KEY.Low
Stale unprotected git-branch preview deploymentsFour public branch-preview deployments (including unreleased documentation) lacked deployment-protection walls; 41+ bundles mined confirmed zero privileged secrets.Low
API error oracles, webhook GET asymmetry, and EOL staging proxyBroken /etl/referral-deposits 500s, null-byte UTF-8 PostgreSQL 500s on webhook delete, presence-only Bearer check on webhook GET (returning empty sets, missing Vary: Authorization), spoofable integratorId tags on /swap/approval…Low

Executive summary

What we were asked to do

A cross-chain intent bridge protocol connecting over twenty chains asked for an authorized external red-team assessment of its public estate: a hosted swap API, an indexer fleet tracking deposit lifecycles, an identity and governance-token rewards API, an MCP server exposing bridge tools to AI agents, staging infrastructure, documentation hosts, and a governance forum.

The assessment tested seven pre-agreed crown-jewel objectives. Two were proven via reproducible response-inspection proofs, five remained blocked or partial, and three plausible severe hypotheses were downgraded after deeper verification proved the underlying controls held.

Principal findings

The production Swap API allowed any unauthenticated caller to inject an integrator fee of up to 99% to an arbitrary wallet address, embedding the skim inside canonical bridge-deposit calldata where wallet simulation shows no fee line item. Separately, a development-labeled indexer twin served the live production transfer database unauthenticated at 57-second freshness (exposing internal pricing metadata and latent sponsored-deposit accounting fields), while five to eight concurrent unindexed filter requests saturated the v4 indexer's filtered-query lane at ~0.03 requests per second. Every authenticated write plane held: zero credentials were recovered, an apparent SQL injection was disproved as a PostgreSQL hot-standby recovery-conflict oracle, the MCP schema blocked fee injection, and all gated early-access and identity write endpoints rejected bypass attempts.

What this means in plain terms

Four things leadership should take from this engagement.

  • Anyone could mint official bridge-deposit transactions quietly skimming up to 99% of user funds. The docs require an API key for production integrator fees, yet the live endpoint enforced no key, no recipient allowlist, and no protective fee cap — letting a phishing or compromised frontend serve genuine protocol calldata targeting the canonical deposit contract while diverting nearly all output.
  • A development-labeled host mirrored live production transfers within a minute. It exposed the full v4 serializer (internal USD pricing and latent treasury-sweep fields) with wildcard CORS and an open OpenAPI spec. An exhaustive sweep showed the treasury-sweep fields are still empty today, leaving a clean window to strip them before launch.
  • The v4 indexer stalled for filtered queries under dial-up-level traffic. Unindexed filters held PostgreSQL connections up to 273 seconds with no timeout or rate limit; because all web replicas share one read replica, autoscaling amplifies contention instead of relieving it.
  • Authentication, secret hygiene, and agent-plane schemas held where it counted. Zero live secrets appeared in bundles, public repos, or previews, and every authenticated identity, webhook write, early-access, proxy, and staging key gate rejected all probes.

The five things that need a decision, not a patch

#What is wrongBusiness impactWho decides
1Unauthenticated appFee and appFeeRecipient parameters allow up to a 99% skim on native bridge routesSetting a protective maximum fee cap, enforcing integrator-key binding, and requiring explicit recipient allowlists affect third-party integrator onboarding and revenue sharing.Product + protocol engineering
2A development-labeled indexer mirrors live production transfers and structurally exposes internal accounting fieldsDeciding whether non-production hosts may ever connect to production replicas — and establishing a release gate before sponsored deposit-address accounting goes live — is a data-boundary policy call.Platform engineering + security
3The v4 indexer shares a single read replica with no query timeouts or rate limits on expensive filtersMitigating slow-query exhaustion requires choosing between stricter filter constraints, query-cost budgets, dedicated read pools, and deprecating legacy unindexed query shapes.Infrastructure + data engineering
4The identity plane reflects arbitrary cross-origin headers and serves ~295,000 entitlement records with no throttlingMerkle-claim data is public by design on-chain, but unthrottled bulk lookup enables targeted phishing and wallet profiling; tightening access trades off frontend convenience.Security + growth engineering
5The public MCP server exposes 14 unauthenticated tools, including app-scoped deposit tracking and documentation re-crawlAgent-plane exposure changes how external callers discover and invoke internal APIs; authentication and tool-visibility boundaries should be defined explicitly.Developer platform + security

What we did not get

No administrative or control-plane takeover. No authenticated cross-tenant read or write. No live first-party secrets or signing keys. No staging load-balancer or host-confusion compromise. No on-chain contract exploit and no funds moved.

Every authenticated control boundary — identity-plane user endpoints, webhook subscription creation, early-access gasless and deposit-address routes, identity-aware proxy hosts, basic-authenticated preview hosts, and the staging auction API key gate — rejected unauthenticated and malformed probes uniformly.

Engagement outcome

An authorized external red-team assessment of a cross-chain intent bridge protocol identified an unauthenticated integrator-fee parameter weakness in the swap-quote API, a development indexer twin mirroring live production transfer records, and an asymmetric slow-query availability weakness on the v4 indexer. No user funds were moved, no credentials or private keys were compromised, and all authenticated identity, webhook, early-access, and administrative planes were verified to enforce access controls properly. All findings were disclosed confidentially with prioritized remediation guidance.


1. The engagement in numbers

MetricValue
Root workstreams2
Total Swarm Size69
Subdomains enumerated83 (apex + 82 subdomains)
Live-triaged hosts / distinct surfaces35 hosts / 26 surfaces
Crown jewels proven2 of 7 (1 partial, 4 blocked)
Confirmed findings12 (1 critical, 2 high, 6 medium, 3 low)
Refuted or downgraded severe hypotheses3
Credentials or first-party secrets recovered0
Subdomain takeovers found0
Real funds moved or state modified0 (canary addresses and read-only proofs only)

Every measurement respected strict rules of engagement. Swap-fee diversion was proven strictly by inspecting server-built calldata with neutral canary addresses — no transaction was ever signed or broadcast. Slow-query saturation was bounded to two short concurrency probes (5× and 8×) with front-door health verified immediately after each burst. Entitlement-harvest throughput was measured with bounded sampling rather than bulk exfiltration.

Agent topology

RoleSessionsResponsibility
Orchestrator1Campaign planning, multi-round synthesis, crown-jewel adjudication
Reporter1Final red-team synthesis, MITRE mapping, evidence reconciliation
Recon15Certificate transparency, host triage, OpenAPI/JS bundle discovery
Exploit11Swap API, indexer fleet, identity plane, MCP, and staging testing
General41Parallel deep-dive verification, boundary fuzzing, refutation checks
Fig 01 · Agent topology
Fig 01 · Agent topology

2. What held

Five security domains withstood three rounds of sustained testing and deserve explicit credit.

  • Authenticated identity and webhook write planes held. Over sixty probes against user profiles, wallet linking, airdrop uploads, referral mutations, and webhook creation returned uniform 401/400 responses — rejecting JWT alg: none, weak HMAC secrets, kid traversal, mass assignment, and SSRF URLs.
  • Early-access API gates held. Partner endpoints for gasless swaps, counterfactual quotes, and sponsored deposit addresses returned 403 FORBIDDEN_API_KEY through sixteen bypass variants, validating the key before body parsing so no input oracle leaked.
  • Secret management held throughout the public estate. Three independent sweeps — passive OSINT, public repos/CI workflows, and 41+ preview JavaScript bundles — returned zero live first-party credentials. Staging API keys stayed server-side in a managed secret store.
  • Front-end XSS, redirect, and proxy perimeters held. Fifteen headless-browser XSS probes yielded zero executions (meta reflection was properly URL-encoded). Identity-aware proxy hosts enforced PKCE with pinned callbacks (30/30 bypass probes redirected), basic-auth previews returned uniform 401, and the governance forum ran a fully patched read-only build.
  • Direct settlement-contract substitution held. Query attempts to overwrite canonical pool or multicall handler addresses were ignored; only the appFee feature redirected output.
Fig 02 · 2. What held
Fig 02 · 2. What held

Three refutations that sharpened the verdict

Disciplined verification prevented three high-severity overclaims that would have wasted engineering time.

  1. Apparent SQL injection on the indexer was a hot-standby recovery-conflict oracle. Single-quote probes (inputToken=x', integratorId=x') on the legacy v3 indexer returned HTTP 500 with raw PostgreSQL text (canceling statement due to conflict with recovery). Control testing with benign nonexistent strings triggered the exact same 24–37s stall and 500 error, while indexed address filters returned [] cleanly — proving unindexed scans canceled by WAL replay, not SQL injection.
  2. MCP agent-plane fee injection was blocked by strict schema validation. Although unauthenticated, get_swap_quote enforces additionalProperties: false, stripping appFee/appFeeRecipient, and twenty undocumented method and SSRF probes failed. The MCP risk is tool discovery, not fee injection.
  3. Airdrop entitlement harvesting was public-by-design data, not a private tenant-isolation breach. Merkle-distributor allocations settle publicly on-chain, while every private identity route (/users/me, linked wallets, admin jobs) remained strictly 401-gated — keeping this Partial (Medium).
Fig 03 · Three refutations that sharpened the verdict
Fig 03 · Three refutations that sharpened the verdict

3. The findings that mattered

How the estate was mapped

Fig 04 · How the estate was mapped
Fig 04 · How the estate was mapped

3.1 Unauthenticated integrator-fee injection on the Swap APICritical

In plain terms. The Swap API builds ready-to-sign bridge transactions for wallets and third-party integrators. It supports an optional integrator fee (appFee and appFeeRecipient) so partner applications can earn a small commission. Although the platform's own documentation states that an API key is required for production use, the live endpoint accepted both parameters anonymously, with no recipient allowlist and no meaningful cap — allowing up to 99% of a user's bridged funds to be routed to any wallet address inside an otherwise legitimate-looking bridge transaction.

What. Unauthenticated GET and POST calls to /api/swap/approval on app.bridge.example, bridge.example, and the testnet API host honored appFee values anywhere in [0, 1) exclusive — verified at 50%, 90%, and 99% — paired with any syntactically valid 20-byte appFeeRecipient address. At appFee=0.99, the server returned a 200 OK quote whose swapTx.data routed ~98.98% of the output to a neutral canary address (leaving the user ~1%). No API key was required, and a 60-request burst returned 200 OK on every call with zero 429 throttling.

How we found it. By inspecting the client JavaScript bundle and testing the swap-approval route directly without credentials, then systematically mapping every boundary condition:

  • Numeric boundaries: 0 through 0.99 succeeded (including scientific notation like 5e-1 and whitespace-padded floats); 1.0, negatives, and 18-nine values near 1.0 returned 400, proving a strict < 1 check with no overflow past 100% — yet a nominal cap that still permits 99% theft.
  • Recipient validation: Purely syntactic (40 hex characters). The zero address, a canonical settlement contract address, and non-checksummed addresses were all accepted (200); omitting the 0x prefix triggered an unhandled 500.
  • Provider matrix: Every route settled by the protocol's native bridge pool honored unauthenticated appFee over major L1 and L2 chains. Only routes settled via a third-party burn-and-mint transfer provider rejected positive fees (400 No bridge routes found).
  • Calldata inspection: Decoded swapTx.data targeted the canonical deposit contract (deposit() selector 0xad5425c6) with an embedded ERC-20 transfer(address,uint256) (0xa9059cbb) to the attacker's canary address inside the destination multicall instructions. No transaction was signed or broadcast.

Root cause. Missing authentication and authorization binding on integrator-fee parameters, combined with an unprotective < 100% upper bound and no recipient registry check.

Fig 05 · 3.1 Unauthenticated integrator-fee injection on the Swap API
Fig 05 · 3.1 Unauthenticated integrator-fee injection on the Swap API

Impact. Severe financial abuse potential. A compromised partner frontend, phishing interface, or man-in-the-middle quote relay can serve genuine protocol-generated calldata that passes basic contract verification while skimming up to 99% of bridged value (for example, ~$1,865 on a 1 WETH bridge or ~$169,000 per 100 WETH, bounded only by relayer liquidity). Because the top-level target is the canonical settlement contract, standard wallet simulation gives the signer no clear warning of the embedded fee split.

Fix. Bind appFee and appFeeRecipient to an authenticated integrator API key validated server-side. Enforce a per-integrator recipient allowlist, cap appFee to a tight business maximum (for example, 1%–2% rather than < 100%), apply per-key rate limiting, and surface integrator fees transparently in quote metadata and wallet-readable calldata structures.


3.2 Production transfer database served unauthenticated on a dev-labeled indexer twinHigh

In plain terms. A subdomain named as a development indexer (dev.indexer.bridge.example) sat outside the hardened production perimeter with wildcard cross-origin headers and an open Swagger UI. Side-by-side testing proved it was not serving test fixtures: it was live-mirroring the production bridge-transfer database within one minute of mainnet finality.

What. Unauthenticated GET /deposits requests against dev.indexer.bridge.example returned live production bridge records with Access-Control-Allow-Origin: *. Same-second fetches against production matched identical deposit IDs, depositor and recipient addresses, token amounts, and fill transaction hashes at 57-second freshness (78 seconds in an earlier sample), differing only in internal PostgreSQL replica row identifiers. The host also served the full v4 OpenAPI specification (200, byte-identical to the v4 production indexer) and interactive Swagger documentation, whereas the legacy v3 production indexer returned 404 for both.

How we found it. By triaging all discovered indexer subdomains rather than focusing only on the primary production hostname, then diffing live responses field by field between all three indexer hosts (legacy v3, v4 production, and the v4 development twin).

Field-level accounting separated what is already public on-chain from what is not: out of 47–49 fields returned per record, roughly 15 server-enriched fields are not directly derivable from on-chain events — including internal USD fee valuations (bridgeFeeUsd, populated on 967 of 1,000 sampled records), internal operational states, and three sponsored-deposit-address (PDA) accounting fields (depositAddress, sweepTxnRef, depositRefundAddress).

An exhaustive 11,324-record sweep spanning the full window of all three indexer hosts confirmed that 0 records currently populate those three core PDA fields because the sponsored deposit-address flow has not yet executed in production. That makes the PDA accounting disclosure structurally live today and latent High the moment the feature turns on.

Root cause. Connecting a non-production hostname directly to a live production read replica without perimeter authentication, combined with an unauthenticated serializer that exposes internal accounting columns ahead of feature launch.

Fig 06 · 3.2 Production transfer database served unauthenticated on a dev-labeled indexer twin
Fig 06 · 3.2 Production transfer database served unauthenticated on a dev-labeled indexer twin

Impact. Production user transfer metadata and server-side pricing telemetry are exposed through an unhardened development host with full schema documentation. More urgently, the v4 serializer (on both the development twin and v4 production) is pre-wired to emit internal treasury-sweep transaction references (sweepTxnRef) and deposit-refund addresses as soon as sponsored deposit-address traffic begins.

Fix. Disconnect dev.indexer.bridge.example from the production database and point it to synthetic fixtures, or place it behind internal VPN/identity-aware proxy authentication. Strip non-public internal accounting fields (sweepTxnRef, depositAddress, depositRefundAddress) from all unauthenticated v4 serializers before activating the PDA flow, and add an automated regression assertion watching for non-null values in those fields on public endpoints.


3.3 Asymmetric slow-query denial of service on the v4 indexerHigh

In plain terms. On the newer v4 production indexer (indexer.bridge.example), a single unauthenticated request using certain common filter parameters tied up a backend database connection for over four minutes. Because the service enforces no query timeout, no rate limiting, and routes all application replicas to a single shared read replica, a handful of slow requests from one IP can stall filtered queries for every integrator and dashboard using the API.

What. Baseline unfiltered GET /deposits?limit=5 calls completed in ~2–2.7 seconds. Adding an unindexed or poorly planned filter such as originChainId=56&limit=5 or a nonexistent integratorId caused v4 production to hang for 152 to 273.6 seconds per request (returning 200 OK only when given a 300-second client timeout), while the legacy v3 host answered the exact same chain filter in 2.0 seconds — confirming a query-plan regression in v4.

Forty rapid probes returned zero 429 responses. Unlike rare token-pair filters (which warmed from 81.2s to ~6s after caching), the originChainId=56 and bogus integratorId filters never warmed between repeats.

How we found it. By profiling per-filter latency distributions on all three indexer hosts and running exactly two bounded concurrency bursts against v4 production (then stopping immediately and verifying front-door health after each burst):

  • 5× concurrent burst: 5/5 completed with 200 OK in ~152.3s; unfiltered front door stayed healthy at 1.9–3.1s.
  • 8× concurrent burst: 0/8 completed within 300s (all timed out with zero bytes); unfiltered front door remained healthy at 2.0–2.8s immediately afterward.

Root cause. Missing covering indexes on v4 filter paths, no PostgreSQL statement_timeout or per-route query budget, no rate limiting, an edge timeout exceeding 300s, and a single shared PostgreSQL hot-standby read replica beneath all application instances.

Fig 07 · 3.3 Asymmetric slow-query denial of service on the v4 indexer
Fig 07 · 3.3 Asymmetric slow-query denial of service on the v4 indexer

Impact. High availability degradation for real-world indexer consumers. While unfiltered root listing stays responsive, nearly every integrator, analytics pipeline, and wallet UI queries /deposits with chain, token, address, or integrator filters. Holding the filtered lane saturated requires roughly 0.03 requests per second (eight requests every ~300 seconds) from a single residential IP — traffic so low it is virtually invisible to RPS-based alerting and WAF thresholds.

Fix. Set a strict PostgreSQL statement_timeout (for example, 5–10 seconds) and matching server-side query-cancellation budgets. Add covering indexes for originChainId, inputToken, outputToken, and integratorId (comparing against the v3 plan that resolved in 2 seconds), reject malformed filter values before querying, enforce per-IP rate limits on filtered routes, and alert on active DB connection age rather than request rate alone.


3.4 Reflective cross-origin policy and unthrottled entitlement harvesting2 × Medium

In plain terms. The public identity and rewards API (api.bridge.example) echoed any website's Origin header in Access-Control-Allow-Origin and permitted Authorization on all 30 documented routes. In parallel, its airdrop and reward endpoints allowed anyone to enumerate per-wallet governance-token entitlements and rebate histories without authentication or rate limiting.

What. Two linked Medium findings on api.bridge.example: (1) arbitrary Origin reflection with authorization in Access-Control-Allow-Headers on every OpenAPI route (no Allow-Credentials, ruling out cookie theft), and (2) unauthenticated, unthrottled lookup on /airdrop/rewards and /airdrop/etl/merkle-distributor-recipients returning 186,897 window-0 records (~295,172 total recipients over all windows) plus Layer-2 rebate figures with zero 429 responses (200/200 sequential and 60/60 at 20 concurrency).

How we found it. By extracting the 32-route OpenAPI schema from Swagger, checking authentication per route, verifying cross-origin headers from a simulated attacker origin, and measuring throughput with bounded bursts (sizing a full per-address harvest at ~6.3h at 20 concurrency without bulk downloading).

Root cause. Reflective CORS middleware applied globally on the API gateway, paired with public ETL and reward endpoints lacking anti-automation limits.

Fig 08 · 3.4 Reflective cross-origin policy and unthrottled entitlement harvesting
Fig 08 · 3.4 Reflective cross-origin policy and unthrottled entitlement harvesting

Impact. Although merkle-claim airdrop data settles publicly on-chain — keeping this honestly rated Medium rather than a private data breach — unthrottled, CORS-enabled bulk lookup lowers the cost of building ranked whale-targeting lists for phishing and dust attacks, and permissive Authorization reflection widens the blast radius if any future client-side token-handling bug appears.

Fix. Replace dynamic origin reflection with an explicit allowlist of first-party origins, remove Authorization from Access-Control-Allow-Headers on public routes, gate bulk ETL endpoints behind internal authentication, and enforce per-IP rate limits on per-address reward lookups.


Also confirmed

FindingSeveritySummary
Legacy v3 indexer replica-pinning 500 error oracleMediumUnindexed inputToken, outputToken, and bogus integratorId filters stall 24–37s (p50 35.7s, 5/5) before returning raw PostgreSQL canceling statement due to conflict with recovery errors, pinning replica connections and disclosing hot-standby topology.
Latent PDA internal-accounting fields in v4 serializerMedium (latent High)depositAddress, sweepTxnRef, and depositRefundAddress are structurally emitted on unauthenticated v4 indexer responses; 0/11,324 records populated today, while legacy v3 validators have begun loosening to accept the new transit deposit type.
Unauthenticated MCP JSON-RPC server (mcp.bridge.example)MediumExposes 14 callable tools without login, including app-visibility track_deposit_app, unauthenticated recrawl_docs (background job DoS), arbitrary depositor quote generation, and get_api_reference bridging attackers to the REST Swap API (MCP schema itself blocks appFee).
Staging auction API wildcard CORS and /health disclosureMediumstaging.bridge.example returns ACAO: * (even on 401 responses) and exposes internal cache counts (active_auctions, relayer_configs, ws_subscribers) and connection-pool telemetry unauthenticated on /health.
Early-access partner API schemas publicly readableLowearly-docs.bridge.example publishes unreleased sponsored deposit-address, gasless, and counterfactual API specs without the partner gate; the actual endpoints correctly enforce 403 FORBIDDEN_API_KEY.
Stale unprotected git-branch preview deploymentsLowFour public branch-preview deployments (including unreleased documentation) lacked deployment-protection walls; 41+ bundles mined confirmed zero privileged secrets.
API error oracles, webhook GET asymmetry, and EOL staging proxyLowBroken /etl/referral-deposits 500s, null-byte UTF-8 PostgreSQL 500s on webhook delete, presence-only Bearer check on webhook GET (returning empty sets, missing Vary: Authorization), spoofable integratorId tags on /swap/approval, and an end-of-life nginx 1.18.0 banner on a staging VM.

4. Kill chain summary

Fig 09 · 4. Kill chain summary
Fig 09 · 4. Kill chain summary
ChainReachedTerminated atData or effect obtained
Swap API appFee injectionStage 4 (exploit / financial abuse)Response inspection with canary EOAVerified canonical calldata skimming up to 99% (no broadcast)
Dev indexer prod-DB twinStage 5 (collection)Bounded sample diff & 11,324-record auditConfirmed 57s prod mirror + latent PDA schema exposure
v4 indexer slow-query DoSStage 4 (availability impact)Bounded 5× and 8× bursts, then stoppedConfirmed saturation at 5–8 concurrent (~0.03 rps); front door healthy
Identity CORS + airdrop harvestStage 5 (collection — public data)Bounded throughput sizing (260 probes)Confirmed reflective CORS + ~6.3h harvest rate (no bulk dump)
MCP server tool exposureStage 3 (discovery / misuse)Strict schema blocked appFeeEnumerated 14 tools; confirmed REST API discovery bridge
Identity admin / webhook takeoverStage 2 (weaponize)401/400 auth & schema gatesNone
Staging auction / secret compromiseStage 2 (weaponize)Server-side secret store & 401 gate/health telemetry only; zero keys recovered

5. What the shape of this engagement teaches

Documentation and deployed enforcement drift silently — test the wire, not the spec. The Swap API's docs required production integrator keys, yet the live endpoint accepted unauthenticated appFee values up to 99%. Reviews that trust API docs instead of live parameter probes miss critical business-logic flaws.

Canonical contract targets do not guarantee safe calldata. Because /api/swap/approval targeted the legitimate settlement pool contract, standard wallet simulation did not flag the embedded 99% fee skim. Integrator-fee controls belong at quote construction time, not end-user wallet review.

Development hostnames attached to production replicas create perimeter blind spots. Even when the underlying ledger is public, non-production twins expose richer serializers, internal pricing metadata, interactive schemas, and pre-launch accounting fields (sweepTxnRef, depositAddress) before launch reviews catch up.

Low-and-slow database exhaustion defeats both WAFs and autoscaling. Saturating v4 took ~0.03 rps from one IP. When all pods share one PostgreSQL read replica without statement_timeout, horizontal scaling adds contention instead of capacity, and RPS alerts stay silent.

Raw database errors are not proof of SQL injection. Running benign control inputs separated a streaming-replica WAL recovery conflict from syntax injection, saving engineering from chasing a phantom critical SQLi while pinpointing the real root cause.

PriorityActionWhy firstEffort
1Require authenticated integrator API keys, recipient allowlists, and a tight fee cap on /swap/approvalEliminates invisible up-to-99% fund diversion on all native bridge routesMedium
1Disconnect dev.indexer.bridge.example from the production replica (or gate behind VPN/IAP)Immediately closes unhardened prod-DB and OpenAPI exposureLow
1Strip latent PDA fields (depositAddress, sweepTxnRef, depositRefundAddress) from unauthenticated v4 serializersPrevents live treasury-sweep leakage before sponsored deposit addresses launchLow
2Add PostgreSQL statement_timeout, covering indexes for originChainId/integratorId/tokens, and per-IP rate limits on v4 and v3 indexersCloses ~0.03 rps slow-query DoS and v3 replica-pinning 500 oraclesMedium
2Replace reflective CORS on api.bridge.example with an explicit origin allowlist and throttle per-address reward lookupsRemoves browser cross-origin abuse and unthrottled entitlement harvestingLow
3Authenticate mcp.bridge.example, restrict app-scoped tools and recrawl_docs, and enforce rate limitsCloses unauthenticated agent-plane discovery and crawl DoSLow
3Gate early-docs.bridge.example, enable deployment protection on branch previews, and restrict staging /health + CORSRemoves pre-release schema leaks and staging architecture disclosureLow
4Align webhook GET/DELETE middleware with POST key validation, add Vary: Authorization, suppress raw PostgreSQL errors, and upgrade EOL nginx on stagingCloses residual error oracles, auth-plane asymmetry, and banner disclosureLow

Notices

Authorization

This was an authorized external red-team assessment under a written agreement and explicit rules of engagement. Active probing stayed strictly within *.bridge.example; six passive phishing lookalike domains were flagged as brand-abuse indicators and never probed. Swap-fee diversion was proven strictly via calldata inspection with neutral canary addresses (zero transactions signed, zero funds moved). DoS testing stopped after two bounded bursts (5× and 8×) with front-door health verified immediately after each. No bulk harvesting, third-party account creation, outbound email, or persistence occurred.

Redaction

Every client identifier, hostname, IP, contract or wallet address, token ticker, and timestamp has been replaced with a placeholder or generalized.

What was removed: protocol, company, and parent-organization names; all live hostnames, preview URLs, and lookalike domains; IP addresses, ASNs, cloud project numbers, and load-balancer addresses; contract and canary wallet addresses, transaction hashes, and deposit IDs; governance-token tickers, chain/project codenames, and identifying third-party vendor names; employee handles, branch names, session/job IDs, and exact calendar dates or clock times.

What was kept, deliberately: vulnerability classes, HTTP status codes, parameter boundaries ([0, 1), 20-byte checks), timing and concurrency thresholds (57s lag, 152–273s queries, 5–8 concurrent saturation, ~0.03 rps), aggregate magnitudes (11,324-record sweep, ~295,172 entitlements), and refutation sequences.

Placeholders used throughout:

PlaceholderMeaning
bridge.examplePrimary bridge domain and public estate
app.bridge.exampleBridge web application and Swap API host
api.bridge.exampleIdentity, rewards, and public API plane
indexer.bridge.exampleProduction v4 indexer API host
dev.indexer.bridge.exampleDevelopment-labeled v4 indexer twin
mcp.bridge.examplePublic MCP JSON-RPC agent-plane server
staging.bridge.exampleStaging auction API and load-balancer tier
early-docs.bridge.exampleEarly-access partner API documentation host
forum.bridge.exampleRead-only community governance forum
<redacted>Any wallet address, contract, hash, key, or identifier

Data handling

No individual user wallet addresses, transaction hashes, personal identifiers, or entitlement records are reproduced. Data exposure is reported strictly through aggregate magnitudes and structural field counts. No raw exploit payloads or weaponized request scripts are included; mechanics are described in defensive prose and architectural diagrams.

Disclaimer

Findings reflect the tested state of the estate during the engagement window. Infrastructure, API policies, and serializer schemas evolve continuously; inclusion here does not imply any condition persists today.

The apparent SQL injection on the legacy indexer is reported as refuted and downgraded, not as SQL injection. Controlled probing with benign nonexistent values established that the PostgreSQL 500 errors stem from streaming hot-standby recovery conflicts triggered by unindexed scans.

The airdrop entitlement harvest is reported as Medium (Partial), not as a private tenant-isolation breach. Merkle-claim allocations settle publicly on-chain; every genuinely authenticated identity and write route held throughout testing.


Methodology and tooling by BlackBit. Two crown jewels proven through response inspection without moving a single cent, bounded availability sizing without degrading production, and three severe hypotheses rigorously downgraded before reaching engineering. Published with the client's permission.

More in Web3

← All case studies