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
- Read
allowedContractIds in packages/stellar-sdk-helpers/src/tx.ts.
- Note both
addresses.defindex.factory and addresses.defindex.vault are added.
- 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);.
Description
allowedContractIdsinpackages/stellar-sdk-helpers/src/tx.ts:304addsaddresses.defindex.factoryto the set of contracts/tx/submitwill accept invocations against, alongsideaddresses.defindex.vaulton the next line. Factory contracts deploy other contracts; allowing arbitrary invocations of one re-opens part of the relay holeassertSubmittableexists to close (per its own docstring: "Guards/tx/submitagainst 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
allowedContractIdsinpackages/stellar-sdk-helpers/src/tx.ts.addresses.defindex.factoryandaddresses.defindex.vaultare added.defindex.ts/coordinator.tsever 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/submitwill relay beyond what any real Meridian flow needs.Environment
Possible Cause / Fix
Remove
add(addresses.defindex.factory);fromallowedContractIdsinpackages/stellar-sdk-helpers/src/tx.ts, keeping onlyadd(addresses.defindex.vault);.