Summary
100% of all REPORTED Findings have been addressed
- 1Partially Solved
- 1Not Applicable
- 6Acknowledged
- 1Risk Accepted
- 11Solved
- 20All Findings
- Critical0
- High0
- Medium0
- Low7
- 6Solved
- 1Risk A.
- Informational13
- 6Ack.
- 5Solved
- 1N/A
- 1P. Solved
Introduction#
Huma engaged Halborn to conduct a security assessment of the Huma Protocol Solana program from September 9th, 2024, to January 2nd, 2025. Huma Protocol is an on-chain PayFi protocol that provides liquidity to payments financing use cases with an initial focus on business borrowers. It takes a modular approach to support diverse needs of Structured Finance. The protocol can be extended by adding additional modules to key functions such as tranche policies, fee managers, due managers, and calendar.
In December, Huma introduced three incremental features to the protocol:
Monthly interest withdrawals for lenders (LPs)
Ability for the pool owner to make payments on behalf of borrowers
A system account (Sentinel) to automatically trigger redemption requests
Halborn then performed an incremental audit of these new features to ensure the continued security and reliability of the protocol.
Assessment Summary#
Halborn was provided 3.5 weeks for the initial engagement and 6 and 4 days for the additional scope assessments, and assigned two full-time security engineer/s to review the security of the Solana Programs in scope. The engineers are blockchain and smart contract security experts with advanced smart contract hacking skills, and deep knowledge of multiple blockchain protocols.
The purpose of the assessment is to:
Identify potential security issues within the Solana Programs.
Ensure that smart contract functionality operates as intended.
In summary, Halborn identified some security concerns. The main ones were the following:
Lack of proper validation in Deposit
Incomplete new owner validation in Transfer Ownership process
Possibility to close started Credit with commitment
Lack of pool name length validation
Lack of pool currency code length validation
Receivable can be approved by different pool
Reallocating pools with new format will lead to data inconsistency
Most of the findings were addressed, and the corresponding fixes have been merged into the branches listed below. The final commits reflect the changes that solved the issues:
80799a02665dab07f695e8c9aee03f50b99af26f on
developbranch5da8c0ac3b6899557ba185379bf4eaa8aa9efe17 on
main
Test Approach and Methodology#
Halborn performed a combination of a manual review of the source code and automated security testing to balance efficiency, timeliness, practicality, and accuracy in regard to the scope of the program assessment. While manual testing is recommended to uncover flaws in business logic, processes, and implementation; automated testing techniques help enhance coverage of programs and 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 the architecture, purpose, and use of the platform.
Manual program source code review to identify business logic issues.
Mapping out possible attack vectors
Thorough assessment of safety and usage of critical Rust variables and functions in scope that could lead to arithmetic vulnerabilities.
Scanning dependencies for known vulnerabilities (
).cargo auditLocal runtime testing (
)anchor-test
Risk Methodology#
4.1 EXPLOITABILITY
Attack Origin (AO):
Attack Cost (AC):
Attack Complexity (AX):
Metrics:
| EXPLOITABILITY METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Attack Origin (AO) | Arbitrary (AO:A) | 1 |
| Specific (AO:S) | 0.2 | |
| Attack Cost (AC) | Low (AC:L) | 1 |
| Medium (AC:M) | 0.67 | |
| High (AC:H) | 0.33 | |
| Attack Complexity (AX) | Low (AX:L) | 1 |
| Medium (AX:M) | 0.67 | |
| High (AX:H) | 0.33 |
4.2 IMPACT
Confidentiality (C):
Integrity (I):
Availability (A):
Deposit (D):
Yield (Y):
Metrics:
| IMPACT METRIC () | METRIC VALUE | NUMERICAL VALUE |
|---|---|---|
| Confidentiality (C) | None (C:N) | 0 |
| Low (C:L) | 0.25 | |
| Medium (C:M) | 0.5 | |
| High (C:H) | 0.75 | |
| Critical (C:C) | 1 | |
| Integrity (I) | None (I:N) | 0 |
| Low (I:L) | 0.25 | |
| Medium (I:M) | 0.5 | |
| High (I:H) | 0.75 | |
| Critical (I:C) | 1 | |
| Availability (A) | None (A:N) | 0 |
| Low (A:L) | 0.25 | |
| Medium (A:M) | 0.5 | |
| High (A:H) | 0.75 | |
| Critical (A:C) | 1 | |
| Deposit (D) | None (D:N) | 0 |
| Low (D:L) | 0.25 | |
| Medium (D:M) | 0.5 | |
| High (D:H) | 0.75 | |
| Critical (D:C) | 1 | |
| Yield (Y) | None (Y:N) | 0 |
| Low (Y:L) | 0.25 | |
| Medium (Y:M) | 0.5 | |
| High (Y:H) | 0.75 | |
| Critical (Y:C) | 1 |
4.3 SEVERITY COEFFICIENT
Reversibility (R):
Scope (S):
Metrics:
| SEVERITY COEFFICIENT () | COEFFICIENT VALUE | NUMERICAL VALUE |
|---|---|---|
| Reversibility () | None (R:N) | 1 |
| Partial (R:P) | 0.5 | |
| Full (R:F) | 0.25 | |
| Scope () | Changed (S:C) | 1.25 |
| Unchanged (S:U) | 1 |
| Critical | High | Medium | Low | Informational |
| 9 - 10 | 7 - 8.9 | 4.5 - 6.9 | 2 - 4.4 | 0 - 1.9 |
Scope#
Assessment Summary & Findings Overview#
# | Title | Severity | Score | Status |
|---|---|---|---|---|
| LACK OF PROPER VALIDATION IN DEPOSIT | Low | 3.8 | Solved09/25/2024 | |
| INCOMPLETE NEW OWNER VALIDATION IN THE TRANSFER OWNERSHIP PROCESS | Low | 2.6 | Risk Accepted | |
| LACK OF POOL NAME LENGTH VALIDATION | Low | 2.5 | Solved09/25/2024 | |
| POSSIBILITY TO CLOSE STARTED CREDIT WITH COMMITMENT | Low | 2.5 | Solved09/28/2024 | |
| RECEIVABLE CAN BE APPROVED BY DIFFERENT POOL | Low | 2.5 | Solved09/25/2024 | |
| LACK OF CURRENCY CODE LENGTH VALIDATION | Low | 2.5 | Solved09/25/2024 | |
| REALLOCATING POOLS WITH NEW FORMAT WILL LEAD TO DATA INCONSISTENCY | Low | 2.3 | Solved12/02/2024 | |
| LACK OF EA AND POOL OWNER TREASURY VALIDATION IN POOL CREATION | Informational | 1.8 | Acknowledged | |
| LACK OF DELEGATED AMOUNT VALIDATION IN ADD REDEMPTION REQUESTS FOR PREMATURE DEPOSITS | Informational | 1.6 | Solved12/01/2024 | |
| POSSIBILITY OF INCONSISTENT LATE PAYMENT FEES | Informational | 1.6 | Acknowledged | |
| LACK OF VALIDATION FOR EXTENSIONS OF THE MINT | Informational | 1.6 | Solved | |
| RELIANCE ON MANUAL PROCESS | Informational | 1.6 | Acknowledged12/30/2024 | |
| POTENTIAL DENIAL OF SERVICE IF POOLS USING NON-REALLOCATED POOLCONFIG WITH THE OLD FORMAT | Informational | 1.1 | Acknowledged11/28/2024 | |
| LACK OF VALIDATION FOR THE MINIMUM BORROW AMOUNT TO EXCEED THE FEES | Informational | 0.9 | Acknowledged | |
| POTENTIAL COMPLETE PROFIT CAPTURE VIA ADMIN FEES | Informational | 0.9 | Not Applicable | |
| MONEY MOVEMENT WHEN PROTOCOL IS PAUSED IN SOME INSTRUCTIONS | Informational | 0.8 | Solved09/27/2024 | |
| EA AND POOL OWNER TREASURY WILL ALSO NEED TO APPROVE DELEGATE IF THEY WANT TO CALL DEPOSIT | Informational | 0.6 | Solved12/01/2024 | |
| LACK OF DELEGATE VALIDATION IN MAKE PAYMENT | Informational | 0.6 | Acknowledged | |
| PASSING SUPERFLUOUS SYSTEM PROGRAM ACCOUNT | Informational | 0.0 | Solved09/27/2024 | |
| INCONSISTENCIES IN DOCUMENTATION | Informational | 0.0 | Partially Solved09/22/2024 |
Findings & Tech Details#
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
8. Automated Testing#
Disclaimer#
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.
