Skip to content
Heist/ feed
HighFix available

Klever-Go: Elasticsearch bulk / painless injection via on-chain account name -> explorer/indexer data forgery

Type: advisorySource: OSV1 source record

**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

Announced Source revision 1
Original source ↗

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

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#63948 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement