BTCC / BTCC Square / blockchainNEWS /
Besu’s BN254 Flaw: How a Subgroup Check Gap Left Crypto Projects Exposed

Besu’s BN254 Flaw: How a Subgroup Check Gap Left Crypto Projects Exposed

Published:
2025-05-25 14:56:53
11
2

Security researchers just uncovered a critical vulnerability in Besu’s BN254 implementation—and it’s the kind of oversight that keeps crypto CTOs awake at night. Here’s what went wrong.


The Hole in the Defense

A missing subgroup check in the elliptic curve pairing opens doors to signature forgeries, spoofing, and worse. Projects relying on Besu’s zero-knowledge proofs or threshold cryptography? Consider yourselves on notice.


Why This Hurts

BN254 underpins everything from private transactions to layer-2 scaling. The flaw? It’s like leaving your bank vault open because ‘nobody would dare walk in’—except in crypto, they always do.


The Irony

Blockchains preach ‘trustless’ systems, yet keep getting bitten by elementary math errors. Meanwhile, Wall Street’s legacy systems—for all their COBOL—somehow avoid these self-inflicted wounds. Maybe audits should cost more than a Lambo.

Besu’s BN254 Vulnerability: Subgroup Check Flaw Exposes Security Risks

Besu, an Ethereum execution client, recently faced a significant security vulnerability due to improper subgroup checks on the BN254 elliptic curve, as detailed in a report from the Ethereum Foundation. This flaw, identified in version 25.2.2 of Besu, posed a risk to the consensus mechanism by allowing potential manipulation of cryptographic operations.

Understanding the BN254 Curve

The BN254 curve, also known as alt_bn128, is an elliptic curve used within Ethereum for cryptographic functions. It was the sole pairing curve supported by the Ethereum VIRTUAL Machine (EVM) before the introduction of EIP-2537. This curve is critical for operations defined under EIP-196 and EIP-197 precompiled contracts, which facilitate efficient computation on the curve.

Vulnerability Insights

A notable security concern in elliptic curve cryptography is the invalid curve attack, which exploits points not lying on the correct curve. Such vulnerabilities are especially concerning for non-prime order curves like BN254 used in pairing-based cryptography. Ensuring that a point belongs to the correct subgroup is essential, as failure to do so can lead to security breaches.

In Besu’s case, the vulnerability arose because the subgroup membership check was performed before verifying if the point was on the curve. This sequence error could allow a point within the correct subgroup but off the curve to bypass security checks, potentially compromising the system’s integrity.

Technical Explanation and Solution

To determine if a point P is valid, it must be confirmed that it lies on the curve and is in the correct subgroup. The flaw in Besu’s implementation skipped the curve check, a critical oversight. The proper validation process involves checking both the curve and subgroup membership, typically by multiplying the point by the subgroup’s prime order and verifying it results in the identity element.

The Ethereum Foundation’s report highlighted that the issue was promptly addressed by the Besu team, with a fix implemented in version 25.3.0. The correction ensures that both checks are conducted in the appropriate order, safeguarding against potential exploits.

Broader Implications and Security Practices

Although this flaw was specific to Besu and did not affect other Ethereum clients, it underscores the importance of consistent cryptographic checks across different software implementations. Discrepancies can lead to divergent client behavior, threatening network consensus and trust.

This incident highlights the critical need for rigorous testing and security measures in blockchain systems. Initiatives like the Pectra audit competition, which helped surface this issue, are vital for maintaining the ecosystem’s resilience by encouraging comprehensive code reviews and vulnerability assessments.

The Ethereum Foundation’s proactive approach and the swift response from the Besu team demonstrate the importance of collaboration and vigilance in maintaining the integrity of blockchain systems.

Image source: Shutterstock
  • ethereum
  • security
  • cryptography
  • besu

|Square

Get the BTCC app to start your crypto journey

Get started today Scan to join our 100M+ users