{"id":"XE-9933","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":730,"title":"Performance Certificate Forgery & Gossip Pollution: VerifyCertificateContent omits expiration, attestation roots, and work proof validation","area":"node-api","claimed_tier":null,"assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-0001","tracked":true,"internal_ref":"#1062","internal_url":"https://github.com/xeprotocol/core/issues/1062","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-12T08:28:55.052261+00:00","updated_at":"2026-11-25T17:15:51.184343+00:00","source_created_at":null,"told_at":"2026-11-20T00:33:18.240331+00:00","status_changed_at":"2026-11-20T00:33:18.230339+00:00","url":"https://bounty.xe.network/XE-9933","body":"## Vulnerability Summary\n\nIn `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:\n\n```go\nfunc VerifyCertificateContent(c *Certificate) error {\n\texpected := HashCertificate(c)\n\tif c.Hash != expected {\n\t\treturn fmt.Errorf(\"certificate hash mismatch\")\n\t}\n...\n\tif err := core.VerifyPayloadKey(c.ProviderPubKey, c.Provider); err != nil {\n\t\treturn fmt.Errorf(\"certificate key: %w\", err)\n\t}\n\tif err := core.VerifyHexSignature(c.ProviderPubKey, c.Signature, hashBytes); err != nil {\n\t\treturn fmt.Errorf(\"certificate signature: %w\", err)\n\t}\n\tif c.Score <= 0 {\n\t\treturn fmt.Errorf(\"certificate score must be positive, got %f\", c.Score)\n\t}\n...\n\tif c.PriceMultiplierMilli < PriceMultiplierMin || c.PriceMultiplierMilli > PriceMultiplierMax {\n\t\treturn fmt.Errorf(\"price_multiplier_milli %d out of bounds [%d, %d]\",\n\t\t\tc.PriceMultiplierMilli, PriceMultiplierMin, PriceMultiplierMax)\n\t}\n\treturn nil\n}\n```\n\nCritical verification omissions in `VerifyCertificateContent`:\n1. 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.\n2. Unverified Work Proof: `c.WorkProof` is hashed into the certificate identifier but never validated against `c.Seed`, `c.Puzzles`, or benchmark computation rules.\n3. Attestation Roots Omitted: `c.StartAttestationRoot` and `c.EndAttestationRoot` (and median timekeeper timestamps) are never verified against timekeeper attestations on the statechain or lattice.\n4. Arbitrary Score Spoofing: An attacker can generate an ephemeral keypair, set `Score = 999999999.0`, sign the certificate hash, and gossip it network-wide.\n\n## Impact & Exploit Scenario\n\n1. 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.\n2. 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)`).\n3. 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.\n\n## Proposed Remediation\n\n1. In `perf/certificate.go`, enforce strict bounds inside `VerifyCertificateContent`:\n   - Require `c.IssuedAt > 0` and `c.ExpiresAt > c.IssuedAt`.\n   - Enforce `c.ExpiresAt - c.IssuedAt <= CertificateValidity`.\n   - Validate that `c.StartAttestationRoot` and `c.EndAttestationRoot` are non-empty 64-character hex strings and correspond to valid timekeeper Merkle roots.\n2. In `net/gossip_validate.go:170`, enforce current time validation:\n   ```go\n   if err := perf.VerifyCertificate(&cert, time.Now().UnixNano()); err != nil {\n       return pubsub.ValidationReject\n   }\n   ```","patch_refs":[],"thread":[{"id":13206,"source":"desk","source_ref":"reply:11228","author":"Joseph Denne","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-0001, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-9933 and says what differs; it is read like any other.","created_at":"2026-11-20T00:33:18.226147+00:00"}]}