Bounty
XE-9933 · Bounty

Performance Certificate Forgery & Gossip Pollution: VerifyCertificateContent omits expiration, attestation roots, and work proof validation

Closed · duplicate — web filed 2026-11-12 08:28 UTC by xe:e4cd6974

Report

Vulnerability Summary

In perf/certificate.go:156-200, VerifyCertificateContent(c *Certificate) error is invoked by the P2P gossip layer (net/gossip_validate.go:170) and the certificate ingestion engine (node/perf.go:344) to validate performance benchmark certificates:

func VerifyCertificateContent(c *Certificate) error {
	expected := HashCertificate(c)
	if c.Hash != expected {
		return fmt.Errorf("certificate hash mismatch")
	}
...
	if err := core.VerifyPayloadKey(c.ProviderPubKey, c.Provider); err != nil {
		return fmt.Errorf("certificate key: %w", err)
	}
	if err := core.VerifyHexSignature(c.ProviderPubKey, c.Signature, hashBytes); err != nil {
		return fmt.Errorf("certificate signature: %w", err)
	}
	if c.Score <= 0 {
		return fmt.Errorf("certificate score must be positive, got %f", c.Score)
	}
...
	if c.PriceMultiplierMilli < PriceMultiplierMin || c.PriceMultiplierMilli > PriceMultiplierMax {
		return fmt.Errorf("price_multiplier_milli %d out of bounds [%d, %d]",
			c.PriceMultiplierMilli, PriceMultiplierMin, PriceMultiplierMax)
	}
	return nil
}

Critical verification omissions in VerifyCertificateContent:

  1. Expiration Ignored: The gossip validation layer certificateValidator() calls VerifyCertificateContent(&cert) without calling VerifyCertificate(c, now). It never checks now > c.ExpiresAt, nor does it enforce c.ExpiresAt - c.IssuedAt <= CertificateValidity. An attacker can broadcast certificates valid for decades or certificates that expired years ago.
  2. Unverified Work Proof: c.WorkProof is hashed into the certificate identifier but never validated against c.Seed, c.Puzzles, or benchmark computation rules.
  3. Attestation Roots Omitted: c.StartAttestationRoot and c.EndAttestationRoot (and median timekeeper timestamps) are never verified against timekeeper attestations on the statechain or lattice.
  4. Arbitrary Score Spoofing: An attacker can generate an ephemeral keypair, set Score = 999999999.0, sign the certificate hash, and gossip it network-wide.

Impact & Exploit Scenario

  1. Gossip Cache Poisoning & Eviction: Malicious actors can flood the /xe/perf-cert/1.0.0 gossipsub topic with forged certificates containing maximum scores and arbitrary provider addresses.
  2. Honest Certificate Eviction: Nodes ingest these certificates via node/perf.go:344 and persist them into core.CertificateStore (BadgerDB), forcibly evicting authentic provider certificates (n.certs().put(cert)).
  3. Marketplace Distortion: Consumers querying GET /providers or selecting computational providers via certificate score metrics are tricked into choosing phantom or spoofed providers with exaggerated performance ratings.

Proposed Remediation

  1. In perf/certificate.go, enforce strict bounds inside VerifyCertificateContent:
    • Require c.IssuedAt > 0 and c.ExpiresAt > c.IssuedAt.
    • Enforce c.ExpiresAt - c.IssuedAt <= CertificateValidity.
    • Validate that c.StartAttestationRoot and c.EndAttestationRoot are non-empty 64-character hex strings and correspond to valid timekeeper Merkle roots.
  2. In net/gossip_validate.go:170, enforce current time validation:
    if err := perf.VerifyCertificate(&cert, time.Now().UnixNano()); err != nil {
        return pubsub.ValidationReject
    }
    

Thread

Joseph Denneteam2026-11-20 00:33 UTCdesk

Thanks. This is the same finding as https://bounty.xe.network/XE-0001, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-9933 and says what differs; it is read like any other.