Full Report
If SHA256 was ever broken, much of the world would break down. This is especially true of many blockchain protocols as well. Why is this bad? Contracts could be deployed to the same address, resulting in funds getting stolen. Geth has a fix that makes this impossible, but still interesting. Bridges using Txn ids would only see one transaction vs. two. There are application specific reasons why this would be bad. Most things use 256 bits, such as object IDs in Sui. However, even Ethereum addresses are 2 ** 80 or 160 bits of security. The authors show that the cost of this would be in the range of 1-10 million dollars. They show some math from Bitcoin hashing profits and Facebook research. Anything under a billion dollars is a real threat. What makes a hash function secure then? Preimage resistence. Find an arbitrary message m that can output x. This is typically 2 ** length. 2nd-preimage resistance. Find two messages that share the same hash. This is typically 2 ** length as well. Multi-target 2nd-preimage resistance. Given a set of hashes, can be find a matching hash for any of them? This is typically 2**(n-k) where n is the length of the hash and K is the size of the set we're checking against. Collision resistance. The birthday paradox. For 160 bit hashes, the effort is 2**80, for instance. Overall, an interesting threat modeling of hash collisions. Many of the things listed above are annoying buzz words and I liked how it was explained in the article.
Analysis Summary
# Vulnerability: Theoretical Hash Collision and Address Aliasing in Blockchain Protocols
## CVE Details
- **CVE ID**: N/A (Theoretical cryptographic weakness/Design flaw)
- **CVSS Score**: N/A (Estimated high impact if SHA-256 is compromised)
- **CWE**: CWE-328: Use of Weak Hash
## Affected Systems
- **Products**: Ethereum (Geth implementation), Sui, and various Blockchain bridges.
- **Versions**: Legacy versions of Geth (prior to the address collision fix); protocols relying on 160-bit hash truncated addresses.
- **Configurations**: Systems utilizing 160-bit security (2^80 effort) for address generation or transaction identification (Txn IDs).
## Vulnerability Description
The vulnerability stems from the theoretical erosion of hash function security—specifically SHA-256 and its derivatives used in blockchain addresses. While SHA-256 is generally robust, many protocols truncate these hashes to 160 bits (e.g., Ethereum addresses).
- **Collision Resistance**: Based on the Birthday Paradox, a 160-bit hash only provides 80 bits of security.
- **Multi-target 2nd-preimage resistance**: Given a large set of existing hashes ($K$), the difficulty to find a match for *any* of them is reduced to $2^{n-k}$.
The research suggests that with current Bitcoin mining computational power and Facebook-scale infrastructure, the cost to break this 160-bit barrier is now within the range of $1M - $10M, making it a viable threat for state actors or well-funded syndicates.
## Exploitation
- **Status**: Theoretical / PoC (Research-based calculation)
- **Complexity**: High (Requires significant computational resources)
- **Attack Vector**: Network / Cryptographic
## Impact
- **Confidentiality**: None
- **Integrity**: High (Ability to deploy malicious contracts to existing addresses; transaction spoofing)
- **Availability**: Medium (Bridges may fail to process distinct transactions sharing the same ID)
## Remediation
### Patches
- **Geth (Go-Ethereum)**: Implemented a fix that prevents the deployment of contracts to addresses that already contain code, neutralizing the "contract replacement" attack vector even if a collision is found.
### Workarounds
- **Increased Bit-Length**: Transitioning from 160-bit addresses to full 256-bit object IDs (as seen in the Sui protocol).
- **Hardforking**: Protocol-level changes to update how address derivation is calculated.
## Detection
- **Indicators of compromise**: Multiple transactions with identical hashes but different payloads; deployment of code to an address previously identified as an EOA (Externally Owned Account) or a different contract.
- **Detection methods and tools**: Blockchain explorers and nodes monitoring for "Contract Redeployment" events at the same address.
## References
- **Geth Security Fixes**: hxxps[://]github[.]com/ethereum/go-ethereum
- **Cryptographic Research**: Reference to Bitcoin hashing profitability and Facebook (Meta) Research on large-scale computation.