Prepared by:
HALBORN
Last Updated 04/17/2025
Date of Engagement: December 23rd, 2024 - March 14th, 2025
100% of all REPORTED Findings have been addressed
All findings
14
Critical
4
High
0
Medium
1
Low
5
Informational
4
Casper Association engaged Halborn to conduct a security assessment of the semi-final version of their reference node for Casper Protocol 2.0, beginning on December 23rd, 2024 and ending on March 14th, 2025. The security assessment was scoped to the repository listed with commit hash, and further details in the Scope section of this report.
Casper is the blockchain platform purpose-built to scale opportunity for everyone. Building toward blockchain’s next frontier, Casper is designed for real-world applications without sacrificing usability, cost, decentralization, or security. It removes the barriers that prevent mainstream blockchain adoption by making blockchain friendly to use, open to the world, and future-proof to support innovations today and tomorrow.
The team at Halborn assigned one full-time security engineer to verify the security of the Casper Protocol 2.0 release. The security engineer is a blockchain and smart-contract security expert with advanced penetration testing and smart-contract hacking skills, and deep knowledge of multiple blockchain protocols.
The purpose of this assessment is to:
Ensure that the functionalities of the execution engine and data access layer operate as intended
Identify potential security issues with the execution engine and data access layer
In summary, Halborn identified some improvements to reduce the likelihood and impact of risks, which were successfully addressed by the Casper team. The main ones were the following:
Use the PenalizedAccount variant instead of Payment when determining whether the balance identifier corresponds to a penalty.
Review the logic for setting the balance identifier when the transaction is intended for the Casper V2 VM, as the balance identifier should not be penalized.
Ensure that addressable entities purses are preserved during each upgrade.
Use the payment code instead of the session code when handling custom payments and update the phase for the ClearRefundPurse refund mode to Payment.
Eliminate the maximum allowed threshold check during the removal of associated keys.
Halborn performed a combination of the manual view of the code and automated security testing to balance efficiency, timeliness, practicality, and accuracy regarding the scope of the blockchain assessment. While manual testing is recommended to uncover flaws in logic, process, and implementation, automated testing techniques help enhance the coverage of modules. They can quickly identify items that do not follow security best practices. The following phases and associated tools were used throughout the term of the assessment:
Research into architecture, purpose, and use of the platform.
Manual code read and walkthrough.
Manual Assessment of use and safety for the critical Rust variables and functions in scope to identify any arithmetic related vulnerability classes.
Cross contract call controls.
Architecture related logical controls.
Scanning of Rust files for vulnerabilities (cargo audit).
Integration testing using a local testing environment.
Deployment to devnet through casper-client and nctl.
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) Specific (AO:S) | 1 0.2 |
| Attack Cost (AC) | Low (AC:L) Medium (AC:M) High (AC:H) | 1 0.67 0.33 |
| Attack Complexity (AX) | Low (AX:L) Medium (AX:M) High (AX:H) | 1 0.67 0.33 |
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) Low (C:L) Medium (C:M) High (C:H) Critical (C:C) | 0 0.25 0.5 0.75 1 |
| Integrity (I) | None (I:N) Low (I:L) Medium (I:M) High (I:H) Critical (I:C) | 0 0.25 0.5 0.75 1 |
| Availability (A) | None (A:N) Low (A:L) Medium (A:M) High (A:H) Critical (A:C) | 0 0.25 0.5 0.75 1 |
| Deposit (D) | None (D:N) Low (D:L) Medium (D:M) High (D:H) Critical (D:C) | 0 0.25 0.5 0.75 1 |
| Yield (Y) | None (Y:N) Low (Y:L) Medium (Y:M) High (Y:H) Critical (Y:C) | 0 0.25 0.5 0.75 1 |
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) Partial (R:P) Full (R:F) | 1 0.5 0.25 |
| Scope () | Changed (S:C) Unchanged (S:U) | 1.25 1 |
| Severity | Score Value Range |
|---|---|
| Critical | 9 - 10 |
| High | 7 - 8.9 |
| Medium | 4.5 - 6.9 |
| Low | 2 - 4.4 |
| Informational | 0 - 1.9 |
Critical
4
High
0
Medium
1
Low
5
Informational
4
| Security analysis | Risk level | Remediation Date |
|---|---|---|
| Flawed Payment Preprocessing Can Render Valid Transactions Ineligible For Execution, And Vice Versa | Critical | Solved - 02/11/2025 |
| Transactions Intended For The V2 Runtime Are Ineligible For Execution | Critical | Solved - 02/07/2025 |
| Addressable Entities Funds Are Lost Upon Each Upgrade | Critical | Solved - 03/12/2025 |
| Transactions Using Custom Payment Will Fail | Critical | Solved - 01/21/2025 |
| Possibility Of Accounts Being Permanently Linked As Associated Keys | Medium | Solved - 02/07/2025 |
| Possible Inaccurate Gas Charges | Low | Solved - 02/12/2025 |
| Improper Error Handling | Low | Solved - 02/07/2025 |
| Incorrect Function Name | Low | Solved - 02/07/2025 |
| Potential Inaccurate Gas Cost Calculation | Low | Solved - 02/07/2025 |
| Inconsistent Key Mismatch Issue in Mint and Auction System Contracts | Low | Solved - 03/11/2025 |
| Unnecessary Mutable Borrows | Informational | Solved - 03/31/2025 |
| Presence Of Typographical Errors | Informational | Solved - 03/31/2025 |
| Inadequate Variable Naming | Informational | Solved - 04/04/2025 |
| Misleading Comments | Informational | Solved - 03/31/2025 |
//
//
//
//
//
//
//
//
//
//
//
//
//
//
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
// Download the full report
Casper 2.0
* Use Google Chrome for best results
** Check "Background Graphics" in the print settings if needed