Prepared by:
HALBORN
Last Updated 04/21/2026
Date of Engagement: March 26th, 2026 - April 17th, 2026
100% of all REPORTED Findings have been addressed
All findings
42
Critical
3
High
2
Medium
9
Low
15
Informational
13
Temple engaged Halborn to conduct a Penetration Test on their systems, beginning on March 26th 2026 and ending on April 17th 2026. The security assessment was scoped to the components that Temple shared with the Halborn team. The assessment was a combination of Halborn One scanner and manual review.
The security review of the Temple Trading Engine reveals a system built on a sound architectural foundation, with the principal risk concentration in the operational layer that bridges the off-chain matching engine and the Canton distributed ledger. The defects identified are, without exception, edge-case activation paths: they require specific sequences of partial fills, concurrent operations, or infrastructure failures to manifest. None of them represent a trivially exploitable attack surface accessible to an external actor. The risk is operational, not existential: fund freezes and silent state divergence under stress, not adversarial fund extraction.
The compounding nature of several findings deserves attention at the executive level. Individual defects that are manageable in isolation interact to produce failure chains that are harder to detect and recover from: a rounding overflow in the fill loop misclassified as a maker-side error, triggering an eviction without fund release, against a background of incomplete audit coverage that leaves the sequence invisible to any post-hoc review. The remediation effort is best framed as a coordinated hardening of the settlement and matching paths, applied in a single pass to avoid partial remediation introducing new inconsistencies.
The review found no vulnerability that poses an existential risk to the platform or its users. There is no code path through which an external party could drain user funds, bypass the balance authorization model, or corrupt ledger state in a single exploitable action. The three-state balance model — unlocked, locked, in_flight — is a robust architectural decision that correctly constrains fund movement at each lifecycle stage. The Canton and DAML integration follows expected patterns for distributed ledger command submission, and the codebase demonstrates clear domain expertise in exchange mechanics. The findings reflect the difficulty of edge-case coverage in a complex system, not a lack of engineering discipline.
The Halborn Team were allocated 12 business days for this engagement, during which two full-time security engineers - experts in blockchain, web, and API security - conducted a comprehensive audit of the in-scope components related to Temple systems. These engineers possess advanced skills in penetration testing, web application security assessments, and an in-depth understanding of multiple blockchain protocols.
The primary objectives of this audit were to:
Verify that each component performs its intended functions accurately and reliably.
Identify and assess potential security issues within the application, particularly those that could impact the management and protection of Temple.
Additional objectives included evaluating adherence to industry best practices, ensuring robust security measures are in place, and identifying opportunities for further strengthening the security posture.
The security assessment of the Canton Tokenization Service application revealed a platform with a solid foundational architecture that carried several security gaps requiring remediation before production deployment. The most severe issue identified was the use of a weak, hardcoded JWT secret for authentication. This finding was resolved after the development team confirmed that the HS256 "unsafe" mode was solely an artifact of the test environment and is not used in any production deployment, where authentication relies on RS256 with a proper OIDC provider.
However, closely related concerns were also identified: JWT tokens lacked proper expiration enforcement and the logout function did not invalidate active sessions, meaning that stolen or leaked tokens remained usable indefinitely. These authentication and session management weaknesses collectively represented the highest-priority remediation area.
Beyond authentication, the application exhibited a pattern of insufficient operational hardening. The backend streaming service logged raw transaction payloads at debug level, creating a passive data leakage channel through log aggregation — a meaningful concern where transaction details constitute sensitive financial data. The CORS policy was overly permissive, the API lacked rate limiting, and session state was managed client-side in a volatile manner susceptible to inconsistency and manipulation. Together, these indicated that security controls were designed primarily around the DAML contract and ledger layer, with the HTTP and infrastructure layers treated as secondary rather than independent defense boundaries.
On the data handling side, the CSV export functionality lacked input sanitization, leaving it susceptible to formula injection when exported files were opened in spreadsheet applications. Although rated informational, this remained practically relevant given that operators and investors working with financial instruments routinely open exported CSVs in Excel.
Remediation priorities centered on three areas: enforcing JWT expiration and implementing proper token invalidation to close the authentication lifecycle gaps; reducing logging verbosity for sensitive payloads, tightening CORS, and introducing rate limiting; and sanitizing CSV output while moving session-critical state server-side. The underlying architecture provided a strong security foundation, and the fixes needed were implementation-level adjustments rather than architectural rework.The security assessment of the Canton Tokenization Service application revealed a platform with a solid foundational architecture that carried several security gaps requiring remediation before production deployment. The most severe issue identified was the use of a weak, hardcoded JWT secret for authentication. This finding was resolved after the development team confirmed that the HS256 "unsafe" mode was solely an artifact of the test environment and is not used in any production deployment, where authentication relies on RS256 with a proper OIDC provider.
However, closely related concerns were also identified: JWT tokens lacked proper expiration enforcement and the logout function did not invalidate active sessions, meaning that stolen or leaked tokens remained usable indefinitely. These authentication and session management weaknesses collectively represented the highest-priority remediation area.
Beyond authentication, the application exhibited a pattern of insufficient operational hardening. The backend streaming service logged raw transaction payloads at debug level, creating a passive data leakage channel through log aggregation — a meaningful concern where transaction details constitute sensitive financial data. The CORS policy was overly permissive, the API lacked rate limiting, and session state was managed client-side in a volatile manner susceptible to inconsistency and manipulation. Together, these indicated that security controls were designed primarily around the DAML contract and ledger layer, with the HTTP and infrastructure layers treated as secondary rather than independent defense boundaries.
On the data handling side, the CSV export functionality lacked input sanitization, leaving it susceptible to formula injection when exported files were opened in spreadsheet applications. Although rated informational, this remained practically relevant given that operators and investors working with financial instruments routinely open exported CSVs in Excel.
Remediation priorities centered on three areas: enforcing JWT expiration and implementing proper token invalidation to close the authentication lifecycle gaps; reducing logging verbosity for sensitive payloads, tightening CORS, and introducing rate limiting; and sanitizing CSV output while moving session-critical state server-side. The underlying architecture provided a strong security foundation, and the fixes needed were implementation-level adjustments rather than architectural rework.
| Security analysis | Risk level | Remediation |
|---|---|---|
| Unrecoverable Fund Freeze via Non-Atomic On-Chain Settlement Finalization | Critical | Solved - 04/20/2026 |
| Silent Balance Lock Accumulation via Missing Fund Release on Maker Order Eviction | Critical | Solved - 04/20/2026 |
| Post-Restart Balance Misclassification, Silent Reconciliation Failure, and TOCTOU Credit Skip via Volatile Archive State and Unsafe Startup Sequencing | Critical | Solved - 04/20/2026 |
| Double Settlement Risk via Non-Idempotent Command Submission and Unconditional State Reset on Cancellation Failure | High | Solved - 04/20/2026 |
| Locked Balance Corruption via Stale Cancel Amounts, Asymmetric Rounding Basis, and Cumulative Fill Overflow | High | Solved - 04/20/2026 |
| In-Memory expectedArchives Map Causes Misclassification of Allocation Archives as Phantom Withdrawals on Process Restart | Medium | Solved - 04/20/2026 |
| Unauthorized Balance Inflation via Unvalidated Operator Identity and Disabled Allocation Tag Enforcement | Medium | Solved - 04/20/2026 |
| Predictable gRPC Command IDs Using time.Now().UnixNano() Risk Collision and Replay | Medium | Solved - 04/20/2026 |
| Orchestrator Contract Discovery Falls Back to Unverified Contract When Operator Field Mismatches | Medium | Solved - 04/20/2026 |
| Settlement Amount Divergence via Hardcoded Precision, Independent Rounding Paths, and Absent Cross-Verification | Medium | Solved - 04/20/2026 |
| Unsafe Orchestrator Contract Fallback Bypasses Operator Identity Validation, Using Any Single Contract Found | Medium | Solved - 04/20/2026 |
| Observer Over-Exposure in Kafka Trade Messages — Counterparty Fee and Identity Disclosure | Medium | Solved - 04/06/2026 |
| Order Validation Fail-Open Across Price Collar Bypass, Market Order Slippage, and Limit Check Suppression | Medium | Solved - 04/20/2026 |
| Oracle Price Selection Uses Highest Available Price, Bypassing Stale Round Filtering via Silent Parse Error | Medium | Solved - 04/20/2026 |
| Orphaned On-Chain Allocations, Silent Withdrawal Failures, and Hidden Mutation Side Effects via Non-Atomic Multi-Step Workflow | Low | Solved - 04/20/2026 |
| Stale Maker Misclassification and Statistics Data Race via String-Heuristic Error Detection and Unsynchronized Goroutine Dispatch | Low | Solved - 04/20/2026 |
| Partial Audit and State Divergence via Non-Transactional Settlement Batch Persistence | Low | Solved - 04/20/2026 |
| BatchSettle Returns Success Without SettlementResult Verification, Causing DB/Ledger Desynchronization | Low | Solved - 04/20/2026 |
| Concurrent Reset of sync.Once in invalidateAmuletContextArtifacts Causes Data Race | Low | Solved - 04/06/2026 |
| Cancel-Pending State Leak in processCancelBatch on Context Cancellation Blocks Order Matching | Low | Solved - 04/20/2026 |
| Unbounded Response Body Read and SSRF Risk in Lighthouse Price API HTTP Client | Low | Solved - 04/06/2026 |
| Unsafe Fallback to First Created Contract in Settlement Result Parsing Causes Contract ID Confusion | Low | Solved - 04/20/2026 |
| Data Race on amuletOpenMiningRoundDisclosed and Related Fields in CantonContractClient | Low | Solved - 04/20/2026 |
| Hardcoded AWS Infrastructure Details and Developer Information Leaked via Docker Build Context | Low | Solved - 04/20/2026 |
| Missing Audit Events on Non-Happy-Path Order and Settlement Lifecycle Transitions | Low | Solved - 04/20/2026 |
| Authentication Token Availability Degradation and DAML Value Misclassification via Lock Contention, Silent Margin Clamping, and String-Heuristic Type Coercion | Low | Solved - 04/20/2026 |
| Ambiguous Cancel Error Response Prevents Safe Retry Differentiation | Low | Solved - 04/20/2026 |
| Missing Authorization Check: Operator Field Not Validated in OnboardingRequest and Delegation Contract Parsing | Low | Solved - 04/20/2026 |
| Network Selection Silently Defaults to Testnet — Wrong Party IDs Used in Production If CANTON_NETWORK Unset | Low | Solved - 04/20/2026 |
| JWT Bearer Token Potentially Transmitted Over HTTP to Scan API Without HTTPS Enforcement | Informational | Solved - 04/06/2026 |
| Price Collar Validation Silently Bypassed When Oracle Price is Unavailable, Enabling Price Manipulation | Informational | Solved - 04/20/2026 |
| Oracle Price Cache Has No Staleness Detection — Zero Oracle Disables Collar Validation Entirely | Informational | Solved - 04/20/2026 |
| Hardcoded AWS Region in MSK IAM Authentication Overrides Environment Variable Configuration | Informational | Acknowledged |
| Full ACS Scan at Startup and N+1 DB Queries in Allocation Event Processing Cause Startup DoS | Informational | Solved - 04/06/2026 |
| JWT Token Refresh Holds Write Mutex During HTTP I/O, Blocking All Concurrent Canton gRPC Calls | Informational | Solved - 04/06/2026 |
| WaitIfTradingHalted Blocks Goroutine Shutdown – Kill Switch Prevents Graceful Termination | Informational | Acknowledged |
| Untracked Fire-and-Forget Goroutines for Database Stats Operations Cause Resource Leak on Shutdown | Informational | Acknowledged |
| Canton Ledger Sync Loop Lacks Idempotency and Distributed Locking — Risk of Duplicate Event Processing | Informational | Acknowledged |
| Hardcoded AWS Infrastructure Identifiers and Developer PII Committed to Repository | Informational | Solved - 04/06/2026 |
| Unconditional Queue Deletion on Canton Failure and Unbounded Marker Multiplier in Activity Marker Processing | Informational | Acknowledged |
| Dual Divergent Oracle Sources — Live HTTP Oracle and DB-Cached Oracle Are Never Reconciled, Enabling Reward Inflation and Collar Bypass | Informational | Solved - 04/07/2026 |
| Missing Operator Field Validation in OnboardingRequest Propose-Accept Handler | Informational | Acknowledged |
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
Backend
* Use Google Chrome for best results
** Check "Background Graphics" in the print settings if needed