Klever-Go: Elasticsearch bulk / painless injection via on-chain account name -> explorer/indexer data forgery
**Component:** Elasticsearch indexer (`indexer/`) **Primary location:** `indexer/common.go:2395-2407` (`serializedDataForUpdateAccounts`) **Entry point:** `SetAccountName` native transaction (contract type 12) — `core/process/transaction/txProcess.go:688` --- ## Description When the node indexes account updates to Elasticsearch, it builds the ES `_bulk` painless-script line by splicing the account's **name** directly into JSON with `fmt.Sprintf("%s", ...)` and **no escaping**: ```go // indexer/common.go:2395-2407 (serializedDataForUpdateAccounts) serializedData := []byte(fmt.Sprintf(`{"script":{"source":"`+ `ctx._source.name = params.name; ... `+ `","lang": "painless","params":`+ `{"name": "%s", "nonce": %d, "rootHash": "%s", "balance": %d, ...}}}`, acc.Name, acc.Nonce, acc.RootHash, acc.Balance, ...)) // acc.Name is RAW ``` `acc.Name` originates from on-chain account state: `indexer/accountInfo.go:31` sets `Name: string(userAccount.GetName())`. An account name is fully attacker-controlled and only weakly validated when it is set on-chain by the `SetAccountName` handler: ```go // core/kapp/accounts/accounts.go:1740 if !utf8.Valid(tc.GetName()) || len(tc.GetName()) > core.MaxNameSize { ... } // MaxNameSize = 100 ``` The only constraints are **valid UTF-8** and **length ≤ 100 bytes**. Double-quote (`"`), backslash (`\`), and newline (`\n`) are all valid UTF-8 and are **not** rejected. The safe helper `converters.JsonEscape()` exists and is used for `_id` fields elsewhere in the
GHSA-7c7c-373r-gfjj
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-7c7c-373r-gfjj
github.com/klever-io/klever-go
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.7.20
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.20"
}
]
}
],
"package": {
"name": "github.com/klever-io/klever-go",
"purl": "pkg:golang/github.com/klever-io/klever-go",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-7c7c-373r-gfjj/GHSA-7c7c-373r-gfjj.json",
"last_known_affected_version_range": "<= 1.7.19"
}
}
]- Related CVEs
- CVE-2026-82409
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #63948 · Revision 1
- Added to Heist Feed
- Publisher date
GO-2026-6585
Revision 2
Klever-Go: Elasticsearch bulk / painless injection via on-chain account name -> explorer/indexer data forgery in github.com/klever-io/klever-go
Klever-Go: Elasticsearch bulk / painless injection via on-chain account name -> explorer/indexer data forgery in github.com/klever-io/klever-go
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GO-2026-6585
github.com/klever-io/klever-go
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 1.7.20
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.7.20"
}
]
}
],
"package": {
"name": "github.com/klever-io/klever-go",
"purl": "pkg:golang/github.com/klever-io/klever-go",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6585.json"
},
"ecosystem_specific": {}
}
]- Related CVEs
- CVE-2026-82409
Source reference:
/aliases
Publisher severity
No explicit severity was provided.
- Event
- #63950 · Revision 2
- Added to Heist Feed
- Publisher date