Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2025-59941

CVE-2025-59941: Filecoin Go-f3 Auth Bypass Vulnerability

CVE-2025-59941 is an authentication bypass flaw in Filecoin Go-f3 that allows attackers to reuse cached justifications in invalid contexts. This article covers the technical details, affected versions, and mitigation steps.

Published:

CVE-2025-59941 Overview

CVE-2025-59941 affects go-f3, the Golang implementation of Fast Finality for Filecoin (F3). The vulnerability exists in the justification verification caching mechanism of versions 0.8.8 and below. Verification results are cached without properly binding them to the originating message context. An attacker can submit a valid message with a correct justification, then reuse the cached justification in unrelated contexts where it would otherwise be invalid. The flaw is classified under [CWE-305] (Authentication Bypass by Primary Weakness) and is fixed in version 0.8.9.

Critical Impact

A network-based attacker can bypass justification verification in the F3 consensus protocol, undermining integrity of finality messages processed by Filecoin nodes running vulnerable go-f3 builds.

Affected Products

  • Filecoin go-f3 versions ≤ 0.8.8
  • Filecoin nodes embedding vulnerable go-f3 releases
  • Downstream F3 consensus participants relying on cached justification validation

Discovery Timeline

  • 2025-09-29 - CVE-2025-59941 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-59941

Vulnerability Analysis

The go-f3 library implements Fast Finality for Filecoin using a GossiPBFT-style consensus protocol. Justifications accompany votes to prove that a supermajority previously agreed on a value. To reduce cryptographic overhead, the library caches verification results for previously validated justifications. The caching layer keys results on the justification payload but does not incorporate the full message context (phase, round, instance, and supplemental data) in the validation binding. As a result, a justification that is valid for one message context is treated as valid for other contexts once its verification result sits in the cache.

Root Cause

The defect stems from an incomplete equivalence check between a cached verification result and the message consuming it. Fields such as msg.Vote.Phase, msg.Vote.Round, msg.Vote.Instance, msg.Vote.Value, and msg.Vote.SupplementalData were not fully enforced against the justification tied to the cache entry. Effectively, the cache treated justification validity as message-independent, violating the protocol invariant that justifications only prove specific claims for specific contexts.

Attack Vector

An attacker with the ability to send GossiPBFT messages to a target node performs a two-step abuse. First, the attacker submits a well-formed message carrying a genuine justification, causing the node to cache the positive verification result. Next, the attacker submits a crafted message that reuses the cached justification in a phase, round, or instance where it should not apply. Because the cache short-circuits re-verification, the malicious message is accepted, corrupting the receiving node's view of consensus progress.

go
// Excerpt from the security patch: assertions now cover every
// context field the justification must be bound to.
// Source: https://github.com/filecoin-project/go-f3/commit/76fff18cf07b21baccf537024bdb2fb41f75f6e2

d.require.NotNil(msg)
instance := d.host.getInstance(msg.Vote.Instance)
d.require.NotNil(instance)
d.require.Equal(gpbft.PREPARE_PHASE, msg.Vote.Phase,
    "phase different: expected %s, got %s", gpbft.PREPARE_PHASE, msg.Vote.Phase)
d.require.Equal(round, msg.Vote.Round, "round different")
d.require.True(value.Eq(msg.Vote.Value), "value different")
d.require.Equal(instance.id, msg.Vote.Instance, "instance different")
d.require.Equal(instance.supplementalData, msg.Vote.SupplementalData,
    "supplemental data different")
d.requireEqualJustification(justification, msg.Justification)

Detection Methods for CVE-2025-59941

Indicators of Compromise

  • Repeated GossiPBFT messages from the same peer that reuse an identical justification across different Phase, Round, or Instance values.
  • Nodes advancing consensus state inconsistently with the majority of peers in the F3 network.
  • Divergent finality decisions logged by go-f3 participants running mixed patched and unpatched versions.

Detection Strategies

  • Inventory Filecoin node deployments and identify any embedded go-f3 build older than 0.8.9 via dependency manifests or SBOM data.
  • Instrument the F3 message pipeline to log the tuple (Instance, Round, Phase, justification hash) and alert when a justification hash is observed against multiple context tuples from the same sender.
  • Correlate peer scoring anomalies and unexpected finality retractions across the fleet as a signal of justification reuse abuse.

Monitoring Recommendations

  • Continuously monitor go-f3 release channels and the GitHub Security Advisory GHSA-7pq9-rf9p-wcrf for follow-on fixes.
  • Track GossiPBFT metrics exposed by nodes (justification cache hit ratio, rejected votes, out-of-context messages) for sudden shifts.
  • Enable verbose logging around justification verification during upgrade windows to validate that patched behavior is active.

How to Mitigate CVE-2025-59941

Immediate Actions Required

  • Upgrade all Filecoin nodes and downstream services using go-f3 to version 0.8.9 or later.
  • Rebuild and redeploy any internal tooling that vendored go-f3 at an affected commit.
  • Restart nodes after upgrade to flush any in-memory cached justifications produced by the vulnerable code path.

Patch Information

The fix is delivered in go-f3 version 0.8.9. The upstream commit 76fff18c hardens justification verification so cached results are validated against the complete message context, including phase, round, instance, value, and supplemental data. Refer to the GitHub Security Advisory GHSA-7pq9-rf9p-wcrf for the authoritative disclosure.

Workarounds

  • If immediate upgrade is not possible, restrict F3 message ingress to trusted peers using network-level allowlists.
  • Disable or shorten the justification verification cache lifetime in operator-configurable builds to force re-verification per message.
  • Increase peer scoring penalties for senders that submit messages with mismatched justification contexts.
bash
# Update go-f3 to the patched release
go get github.com/filecoin-project/go-f3@v0.8.9
go mod tidy
go build ./...

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.