CVE-2025-59942

CVE-2025-59942 is a high-severity integer overflow or wraparound vulnerability in github.com/filecoin-project/go-f3 (go), affecting versions < 0.8.7. It is fixed in 0.8.7.

Summary

Workarounds

The are no immediate workarounds available. Nodes should upgrade to the patched version, which they will have done if participating in nv27 on Filecoin mainnet.

Credits

The initial finding(unrelated path) was reported by 0xNirix via bug bounty program which wasn't high issue. The further digging by developers led to this finding. Thank you for the contributions.

Impact

Filecoin nodes consuming F3 messages are vulnerable. go-f3 panics when it validates a "poison" messages. A "poison" message can can cause integer overflow in the signer index validation. In Lotus' case, the whole node will crash.

There is no barrier to entry. An attacker doesn't need any power to pull off this attack.

These malicious messages aren't self-propagating since the bug is in the validator. An attacker needs to directly send the message to all targets.

An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value. Typical impact: incorrect size calculations leading to heap overflows or logic errors.

CVE-2025-59942 has a CVSS score of 7.5 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.8.7); upgrading removes the vulnerable code path.

Affected versions

github.com/filecoin-project/go-f3 (< 0.8.7)

Security releases

github.com/filecoin-project/go-f3 → 0.8.7 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

The fix was merged and released with go-f3 0.8.7. All node software (Lotus, Forest, Venus) are using a patched version of go-f3 with their updates for the nv27 network upgrade.

go-f3 now does proper overflow checking using math.MaxInt64 comparison and returns error "justificationPower overflow" when overflow would occur.

Frequently Asked Questions

  1. What is CVE-2025-59942? CVE-2025-59942 is a high-severity integer overflow or wraparound vulnerability in github.com/filecoin-project/go-f3 (go), affecting versions < 0.8.7. It is fixed in 0.8.7. An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value.
  2. How severe is CVE-2025-59942? CVE-2025-59942 has a CVSS score of 7.5 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of github.com/filecoin-project/go-f3 are affected by CVE-2025-59942? github.com/filecoin-project/go-f3 (go) versions < 0.8.7 is affected.
  4. Is there a fix for CVE-2025-59942? Yes. CVE-2025-59942 is fixed in 0.8.7. Upgrade to this version or later.
  5. Is CVE-2025-59942 exploitable, and should I be worried? Whether CVE-2025-59942 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-59942 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-59942? Upgrade github.com/filecoin-project/go-f3 to 0.8.7 or later.

Other vulnerabilities in github.com/filecoin-project/go-f3

CVE-2025-59942

Stop the waste.
Protect your environment with Kodem.