Skip to content

[Security] Submit allowlist includes the DeFindex factory, not just the vault #482

Description

@collinsezedike

Description

allowedContractIds in packages/stellar-sdk-helpers/src/tx.ts:304 adds addresses.defindex.factory to the set of contracts /tx/submit will accept invocations against, alongside addresses.defindex.vault on the next line. Factory contracts deploy other contracts; allowing arbitrary invocations of one re-opens part of the relay hole assertSubmittable exists to close (per its own docstring: "Guards /tx/submit against being used as an open relay for arbitrary Stellar transactions").

Confirmed via grep across packages/stellar-sdk-helpers/src: no real transaction-building code (defindex.ts, coordinator.ts) ever invokes the factory contract. It's allowlisted but never actually needed by any legitimate deposit/withdraw flow.

Steps to Reproduce

  1. Read allowedContractIds in packages/stellar-sdk-helpers/src/tx.ts.
  2. Note both addresses.defindex.factory and addresses.defindex.vault are added.
  3. Confirm no call site in defindex.ts/coordinator.ts ever builds a transaction invoking the factory.

Expected Behavior

Only the specific DeFindex vault contract should be allowlisted; the factory should not be.

Actual Behavior

Both are allowlisted, widening what /tx/submit will relay beyond what any real Meridian flow needs.

Environment

Field Value
Network N/A
Wallet N/A
Protocol affected DeFindex
Browser (if frontend) N/A
Node.js version N/A
pnpm version N/A

Possible Cause / Fix

Remove add(addresses.defindex.factory); from allowedContractIds in packages/stellar-sdk-helpers/src/tx.ts, keeping only add(addresses.defindex.vault);.

Metadata

Metadata

Assignees

Labels

sdkInvolves Blend or DeFindex SDK helpers in packages/stellar-sdk-helperssecuritySecurity hardening, vulnerability fixes, or audit-related worktrivialSelf-contained task, completable in < 2 hours with no deep protocol knowledge required

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions