CVE Professor
/
All CVEs
CVE-2026-58262

CVE-2026-58262 — Github.com/klever-io/klever-go — CWE-345 · CWE-347

HIGH CVSS 0 ⚡ EPSS 0.2% GitHub

## Summary When validating an incoming block header, `HeaderSigVerifier.verifyConsensusSize` counts *every* set bit in `PubKeysBitmap` — including bits that correspond to no validator (the padding bits of the final byte, which exist whenever the consensus group size is not a multiple of 8). The subsequent BLS aggregate-signature verification (`blsMultiSigner.Verify`) only checks signature validity for real validator indices and silently ignores those padding bits. As a result, a malicious or compromised block producer can set the padding bits to make the on-bits reach the PBFT quorum while only gathering a smaller number of real validator signature shares, causing a block to be accepted as correctly signed without a genuine two-thirds validator quorum. ## Details Quorum counter counts padding bits — `core/process/headerCheck/headerSignatureVerify.go:145-183`: ```go func (hsv *HeaderSigVerifier) verifyConsensusSize(consensusPubKeys []string, header data.HeaderHandler) error { consensusSize := len(consensusPubKeys) bitmap := header.GetPubKeysBitmap() expectedBitmapSize := consensusSize / 8 if consensusSize%8 != 0 { expectedBitmapSize++ } if len(bitmap) != expectedBitmapSize { ... return ErrWrongSizeBitmap } numOfOnesInBitmap := 0 for index := range bitmap { numOfOnesInBitmap += bits.OnesCount8(bitmap[index]) // <-- counts ALL bits incl. padding } minNumRequiredSignatures := consensus.GetPBFTThreshold(consensusSize) ... if numOfOnesInBitmap >= minNumRequiredSignatures { return nil } ... return ErrNotEnoughSignatures } ``` The bitmap-byte-length check above only ensures the byte array is the right *size*; it never requires the padding bits (bits `[consensusSize … expectedBitmapSize*8)`) to be zero. So any combination of padding bits is accepted toward the quorum. `VerifySignature` (`:92-143`) then builds the verifier from the *real* public keys, sets the aggregate signature, and calls `verifier.Verify(hash, bitmap)`. The BLS verifier ignores padding bits — `crypto/signing/multisig/blsMultisig.go:272-297`: ```go func (bms *blsMultiSigner) Verify(message []byte, bitmap []byte) error { ... maxFlags := len(bitmap) * 8 flagsMismatch := maxFlags < len(bms.data.pubKeys) // only rejects *too few* bytes if flagsMismatch { return crypto.ErrBitmapMismatch } pubKeys := make([]crypto.PublicKey, 0) for i := range bms.data.pubKeys { // <-- only real validator indices err := bms.isIndexInBitmap(uint16(i), bitmap) if err != nil { continue } pubKeys = append(pubKeys, bms.data.pubKeys[i]) } return bms.llSigner.VerifyAggregatedSig(bms.keyGen.Suite(), pubKeys, bms.data.aggSig, message) } ``` Because the loop only walks `range bms.data.pubKeys`, a bit set at position `i >= len(pubKeys)` is never inspected by `isIndexInBitmap` and is therefore silently dropped from signature verification, even though `verifyConsensusSize` already counted it toward quorum. PBFT threshold — `core/consensus/consensus.go:5-8` (`consensusSize*2/3 + 1`) and fallback `:10-13` (`consensusSize/2 + 1`). Reachable from received blocks — `core/process/block/interceptedBlocks/interceptedBlock.go:181-201` runs `CheckValidity()` → `VerifySignature` on every header received from peers. ### Worked example (consensus size = 5) - Required PBFT quorum: `5*2/3 + 1 = 4`. - Valid validator bit positions: 0..4. Bits 5, 6, 7 are padding (no validator). - Attacker gathers only **one** real signature share (validator 0) and aggregates it. - Sets bitmap byte to `0b1110_0001` (`0xE1`): bit 0 (real) + bits 5, 6, 7 (padding). - `verifyConsensusSize` sees `bits.OnesCount8(0xE1) = 4` ≥ 4 → passes quorum. - `blsMultiSigner.Verify` only validates against validator 0's public key (padding ignored) → passes. - The block is accepted with one real signer instead of four. For any `consensusSize` not divisible by 8, up to `8 - (consensusSize % 8)` fake "padding" signatures can be counted toward quorum. On a 21-member group (one padding bit) the attacker shaves one vote; on smaller/sharded groups with `consensusSize % 8` close to 7 the relative impact is larger. ## PoC Reproduced locally against current `develop` (`085a5d1`) with this test (run under `core/process/headerCheck`, removed after verification): ```go func TestPOCHeaderSigVerifierCountsPaddingBitsTowardQuorum(t *testing.T) { args := createHeaderSigVerifierArgs() args.NodesCoordinator = &cMock.NodesCoordinatorMock{ GetValidatorsPublicKeysCalled: func(_ []byte, _ uint64, _ uint32) ([]string, error) { return []string{"pk0", "pk1", "pk2", "pk3", "pk4"}, nil // consensus size 5 -> need 4 }, } verifyCalled := false args.MultiSigVerifier = &cMock.BelNevMock{ CreateMock: func(pubKeys []string, index uint16) (crypto.MultiSigner, error) { return &cMock.BelNevMock{ VerifyMock: func(msg []byte, bitmap []byte) error { verifyCalled = true // verifier is reached even though only 1 real signer bit is set require.Equal(t, []byte{0xe1}, bitmap) return nil // single-signer aggregate verifies OK }, }, nil }, } hdrSigVerifier, _ := headerCheck.NewHeaderSigVerifier(args) header := &block.Block{ Header: &block.BlockHeader{PrevRandSeed: []byte("seed")}, PubKeysBitmap: []byte{0xe1}, // bit0 (real) + padding bits 5,6,7 => counted as 4/5 quorum Signature: []byte("aggregate-of-only-real-bit-0"), } err := hdrSigVerifier.VerifySignature(header) require.NoError(t, err) // <-- accepted with 1 real signature instead of the required 4 require.True(t, verifyCalled) } ``` Run: `go test ./core/process/headerCheck -run TestPOCHeaderSigVerifierCountsPaddingBitsTowardQuorum -count=1` → `ok`. The test asserts the current code accepts the header; a corrected implementation must return an error because only one real signer bit is set. ## Impact This is an improper-verification / consensus-integrity vulnerability. A block proposer who can produce a valid leader signature plus a single valid aggregate BLS signature share can still satisfy the block-level quorum check by populating the padding bits of `PubKeysBitmap`. This weakens the PBFT two-thirds assumption: blocks can be accepted with fewer honest validator signatures than the protocol requires, enabling acceptance of attacker-favored blocks under collusion/compromise below the intended threshold and undermining finality guarantees. Any node that imports/intercepts headers (`interceptedBlock.CheckValidity`) is affected. Note the attacker still needs at least one valid consensus-group signature share and a valid leader signature, hence `PR:L` / `AC:H`. ## Suggested fix In `verifyConsensusSize`, count only bits whose index `< consensusSize` and additionally reject any non-zero bit in the padding region of the final bitmap byte (i.e. mask the last byte with `(1 << (consensusSize % 8)) - 1` before counting, and fail if the original last byte has bits set above that mask). Mirror the same padding-bit rejection in `blsMultiSigner.Verify` so the verifier fails closed rather than silently ignoring unknown bits.

## Summary When validating an incoming block header, `HeaderSigVerifier.verifyConsensusSize` counts *every* set bit in `PubKeysBitmap` — including bits that correspond to no validator (the padding bits of the final byte, which exist whenever the consensus group size is not a multiple of 8). The subsequent BLS aggregate-signature verification (`blsMultiSigner.Verify`) only checks signature validity for real validator indices and silently ignores those padding bits. As a result, a malicious or compromised block producer can set the padding bits to make the on-bits reach the PBFT quorum while only gathering a smaller number of real validator signature shares, causing a block to be accepted as correctly signed without a genuine two-thirds validator quorum. ## Details Quorum counter counts padding bits — `core/process/headerCheck/headerSignatureVerify.go:145-183`: ```go func (hsv *HeaderSigVerifier) verifyConsensusSize(consensusPubKeys []string, header data.HeaderHandler) error { consensusSize := len(consensusPubKeys) bitmap := header.GetPubKeysBitmap() expectedBitmapSize := consensusSize / 8 if consensusSize%8 != 0 { expectedBitmapSize++ } if len(bitmap) != expectedBitmapSize { ... return ErrWrongSizeBitmap } numOfOnesInBitmap := 0 for index := range bitmap { numOfOnesInBitmap += bits.OnesCount8(bitmap[index]) // <-- counts ALL bits incl. padding } minNumRequiredSignatures := consensus.GetPBFTThreshold(consensusSize) ... if numOfOnesInBitmap >= minNumRequiredSignatures { return nil } ... return ErrNotEnoughSignatures } ``` The bitmap-byte-length check above only ensures the byte array is the right *size*; it never requires the padding bits (bits `[consensusSize … expectedBitmapSize*8)`) to be zero. So any combination of padding bits is accepted toward the quorum. `VerifySignature` (`:92-143`) then builds the verifier from the *real* public keys, sets the aggregate signature, and calls `verifier.Verify(hash, bitmap)`. The BLS verifier ignores padding bits — `crypto/signing/multisig/blsMultisig.go:272-297`: ```go func (bms *blsMultiSigner) Verify(message []byte, bitmap []byte) error { ... maxFlags := len(bitmap) * 8 flagsMismatch := maxFlags < len(bms.data.pubKeys) // only rejects *too few* bytes if flagsMismatch { return crypto.ErrBitmapMismatch } pubKeys := make([]crypto.PublicKey, 0) for i := range bms.data.pubKeys { // <-- only real validator indices err := bms.isIndexInBitmap(uint16(i), bitmap) if err != nil { continue } pubKeys = append(pubKeys, bms.data.pubKeys[i]) } return bms.llSigner.VerifyAggregatedSig(bms.keyGen.Suite(), pubKeys, bms.data.aggSig, message) } ``` Because the loop only walks `range bms.data.pubKeys`, a bit set at position `i >= len(pubKeys)` is never inspected by `isIndexInBitmap` and is therefore silently dropped from signature verification, even though `verifyConsensusSize` already counted it toward quorum. PBFT threshold — `core/consensus/consensus.go:5-8` (`consensusSize*2/3 + 1`) and fallback `:10-13` (`consensusSize/2 + 1`). Reachable from received blocks — `core/process/block/interceptedBlocks/interceptedBlock.go:181-201` runs `CheckValidity()` → `VerifySignature` on every header received from peers. ### Worked example (consensus size = 5) - Required PBFT quorum: `5*2/3 + 1 = 4`. - Valid validator bit positions: 0..4. Bits 5, 6, 7 are padding (no validator). - Attacker gathers only **one** real signature share (validator 0) and aggregates it. - Sets bitmap byte to `0b1110_0001` (`0xE1`): bit 0 (real) + bits 5, 6, 7 (padding). - `verifyConsensusSize` sees `bits.OnesCount8(0xE1) = 4` ≥ 4 → passes quorum. - `blsMultiSigner.Verify` only validates against validator 0's public key (padding ignored) → passes. - The block is accepted with one real signer instead of four. For any `consensusSize` not divisible by 8, up to `8 - (consensusSize % 8)` fake "padding" signatures can be counted toward quorum. On a 21-member group (one padding bit) the attacker shaves one vote; on smaller/sharded groups with `consensusSize % 8` close to 7 the relative impact is larger. ## PoC Reproduced locally against current `develop` (`085a5d1`) with this test (run under `core/process/headerCheck`, removed after verification): ```go func TestPOCHeaderSigVerifierCountsPaddingBitsTowardQuorum(t *testing.T) { args := createHeaderSigVerifierArgs() args.NodesCoordinator = &cMock.NodesCoordinatorMock{ GetValidatorsPublicKeysCalled: func(_ []byte, _ uint64, _ uint32) ([]string, error) { return []string{"pk0", "pk1", "pk2", "pk3", "pk4"}, nil // consensus size 5 -> need 4 }, } verifyCalled := false args.MultiSigVerifier = &cMock.BelNevMock{ CreateMock: func(pubKeys []string, index uint16) (crypto.MultiSigner, error) { return &cMock.BelNevMock{ VerifyMock: func(msg []byte, bitmap []byte) error { verifyCalled = true // verifier is reached even though only 1 real signer bit is set require.Equal(t, []byte{0xe1}, bitmap) return nil // single-signer aggregate verifies OK }, }, nil }, } hdrSigVerifier, _ := headerCheck.NewHeaderSigVerifier(args) header := &block.Block{ Header: &block.BlockHeader{PrevRandSeed: []byte("seed")}, PubKeysBitmap: []byte{0xe1}, // bit0 (real) + padding bits 5,6,7 => counted as 4/5 quorum Signature: []byte("aggregate-of-only-real-bit-0"), } err := hdrSigVerifier.VerifySignature(header) require.NoError(t, err) // <-- accepted with 1 real signature instead of the required 4 require.True(t, verifyCalled) } ``` Run: `go test ./core/process/headerCheck -run TestPOCHeaderSigVerifierCountsPaddingBitsTowardQuorum -count=1` → `ok`. The test asserts the current code accepts the header; a corrected implementation must return an error because only one real signer bit is set. ## Impact This is an improper-verification / consensus-integrity vulnerability. A block proposer who can produce a valid leader signature plus a single valid aggregate BLS signature share can still satisfy the block-level quorum check by populating the padding bits of `PubKeysBitmap`. This weakens the PBFT two-thirds assumption: blocks can be accepted with fewer honest validator signatures than the protocol requires, enabling acceptance of attacker-favored blocks under collusion/compromise below the intended threshold and undermining finality guarantees. Any node that imports/intercepts headers (`interceptedBlock.CheckValidity`) is affected. Note the attacker still needs at least one valid consensus-group signature share and a valid leader signature, hence `PR:L` / `AC:H`. ## Suggested fix In `verifyConsensusSize`, count only bits whose index `< consensusSize` and additionally reject any non-zero bit in the padding region of the final bitmap byte (i.e. mask the last byte with `(1 << (consensusSize % 8)) - 1` before counting, and fail if the original last byte has bits set above that mask). Mirror the same padding-bit rejection in `blsMultiSigner.Verify` so the verifier fails closed rather than silently ignoring unknown bits.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. Low PR:L
User Interaction None UI:N
Vuln. Conf. None VC:N
Vuln. Integrity High VI:H
Vuln. Avail. None VA:N
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
EPSS — Exploit Prediction Scoring System
0.2%
30-day probability
In the 5. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CVE-2026-58262
CVSS 0/10 · HIGH · 23.11.2026
CWE: CWE-345, CWE-347
Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🎯 WHAT IS THIS VULNERABILITY?
Summary: ## Summary

When validating an incoming block header, HeaderSigVerifier.verifyConsensusSize counts every set bit in PubKeysBitmap — including bits that correspond to no validator (the padding bits of the final byte, which exist whenever the consensus group size is not a multiple of 8). The subsequent BLS aggregate-signature verification (blsMultiSigner.Verify) only checks signature va…
Affected: github.com/klever-io/klever-go

⚡ ATTACK VECTOR
Network / Remote (AV:N) · low-privilege account (PR:L) · no user interaction (UI:N) · low attack complexity (AC:L).

🌍 REAL WORLD IMPACT
Partial confidentiality disclosure (C:L); data can be modified or deleted.

🛡️ REMEDIATION
→ Apply vendor security update for github.com/klever-io/klever-go.
→ Add WAF rule, create IDS alert for anomalous traffic.

⚠️ URGENCY
⚠️ Planned maintenance (2 weeks).

────────────────────────────────────────
[Automated Technical Vulnerability & CVSS Vector Analysis]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
0 / 10 · CVSS HIGH
Weakness Types (CWE)
CWE-345 CWE-347
Affected Products (1)
github.com/klever-io/klever-go
References & Advisories (4)
Related CVEs
9.4
CVE-2026-68548
## Summary Algernon's URL-prefix authorization gate matches its protected prefixes (`/admin`, `/repo`, `/data`
8.2
CVE-2026-145366
### Summary A URI SAN is a context-specific, primitive GeneralName with tag number 6 (identifier octet `0x86`
7.7
CVE-2026-145367
### Summary In ambient mode, `istiod` does not correctly convert the `trustDomains` and `notTrustDomains` sou
5.6
CVE-2026-145239
### Summary `AuthorizationPolicy` `source.ipBlocks`, `source.notIpBlocks` and the `source.ip` condition on am
9.2
CVE-2026-115977
Improper verification of SAML responses in the bundled dotSAML plugin in dotCMS versions prior to 26.10.22-01,
8.8
CVE-2026-77471
shell-chain is a PQVM-native, post-quantum blockchain. Prior to version 0.27.1, the finality vote aggregation
8.7
CVE-2026-130019
When a table is loaded or committed, Polaris read the table metadata file from the table's own storage and use