Summary
100% of all REPORTED Findings have been addressed
- 0Risk Accepted
- 3Acknowledged
- 1Solved
- 4All Findings
- Critical0
- High1
- 1Solved
- Medium0
- Low0
- Informational3
- 3Ack.
Introduction#
VeChain Foundation engaged Halborn to conduct a security assessment of the VeChainThor Go codebase beginning on September 5, 2025 and ending on October 31, 2025. The security assessment was scoped to consensus, staking, networking, API, and runtime components in the GitHub repository provided to the Halborn team.
Assessment summary#
A senior Halborn security engineer performed a full manual review of the Go codebase with targeted automation. The objectives were to:
Ensure protocol components operate as intended under adversarial conditions.
Identify logic, state-transition, and concurrency risks.
Recommend robust, low-risk remediations aligned with production constraints.
Key risk themes included:
Unsigned arithmetic underflows in staking and epoch housekeeping could block expected activations or corrupt state.
Scheduler policy allows offline proposers to be included and auto-reactivated, weakening uptime enforcement.
Panic usage in consensus flow reduces fault tolerance and can crash nodes under rare invariants.
Input validation gaps (e.g., zero weights) reduce robustness and future maintainability.
Key recommendations#
Harden arithmetic in staking/housekeeping: Guard decrements and bounds checks to prevent unsigned underflow when the leader set is empty and an exit is scheduled; validate subtraction does not underflow queued stake.
Enforce proposer liveness policy: Exclude offline validators from scheduling and remove auto-activation side-effects; ensure updates cannot clear
OfflineBlockimplicitly.Replace panics in consensus-critical paths: Return typed errors instead of panics in scheduling/consensus to prevent node crashes and enable graceful rejection/recovery.
Validate scheduler inputs: Require
weight > 0before computing scores to avoid undefined behavior and simplify invariants.Strengthen state-transition prechecks: Centralize and reuse validation guards for staking transitions to ensure consistent behavior across services and edge epochs.
Test approach and methodology#
Architecture and threat modeling: Reviewed consensus, staking, scheduling, activation/exit flows, and state persistence boundaries.
Manual code review: Deep review of consensus, scheduler, staking services, epoch housekeeping, and API boundaries for logic and state-transition flaws.
Static analysis and linters: Ran Go-focused checks (e.g.,
go vet,staticcheck,golangci-lint) to flag common correctness and robustness issues.Targeted dynamic validation: Reproduced edge scenarios described in findings; leveraged existing fuzz and property tests around blocks and state transitions where present; recommended additional unit/property tests for activation/exit edge cases.
Defense-in-depth recommendations: Proposed invariant checks, error handling upgrades, and precondition guards to improve resilience and maintainability.
Risk Methodology#
5.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 |
5.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 |
5.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 |
|---|---|---|---|---|
| Queued underflow enables contract drain | High | 7.5 | Solved09/17/2025 | |
| Epoch Housekeeping Underflow | Informational | 1.0 | Acknowledged | |
| Uncaught panic in Schedule leads to hard process crash | Informational | 0.0 | Acknowledged | |
| Zero-weight proposer accepted in scheduler score computation | Informational | 0.0 | Acknowledged |
Findings & Tech Details#
Description
Recommendation
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
Description
Recommendation
Remediation Comment
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.
