Details
- Denial-of-indexing A name containing a single
"or newline makes ES reject the whole bulk batch (HTTP 400). Because the indexer batches many accounts per bulk (up to 4 MB), every co-batched honest account's balance/name/nonce update is silently dropped → the explorer/API serves stale data. Repeatable every block.
- Arbitrary document CRUD across all indexer indices (escalation). Using the sacrificial-op construction, the attacker can create/overwrite/delete documents in any klever index the indexer writes (
transactions,blocks,accounts,proposals,assets,marketplaces, ...): forge "successful" transactions, rewrite balances, delete or rewrite blocks and governance proposals. Anyone trusting the ES-backed API , wallets, block explorers, or an exchange crediting deposits off indexer data can be fed fabricated records, enabling fraud (e.g. a forgedstatus:successtransaction).
Amplifiers: the payload is permanent replicated state, so it hits any current or future indexer and survives re-indexing; the attacker is fully decoupled from the victim indexer; and the shipped ES config is unauthenticated.
---
Recommendation
- Escape the name . Never splice on-chain strings into JSON with
fmt.Sprintf. Either apply the existingconverters.JsonEscape()toacc.Name(mirror the_idhandling), or preferably build the entire bulk source withjson.Marshalof a typed struct so no on-chain string can break the JSON/NDJSON structure. Audit everyfmt.Sprintf-built bulk/script line inindexer/common.gofor the same pattern (RootHash and other%sfields on this and nearby paths).
- Restrict the on-chain account-name charset at
SetAccountName(accounts.go:1740) reject control characters, quotes, and backslashes (or allow only a safe printable subset) as defense-in-depth. Gate any consensus-visible validation change behind an epoch fork flag.