Introduction
We express our gratitude to the Beldex team for the collaborative engagement that enabled the execution of this dApp Security Assessment.
This report presents the results of an independent source-code security assessment of the Beldex wallet browser extension and the bdx-web3js integration SDK.
The assessment focused on security-critical runtime paths connecting web applications, the injected provider, the content script, the extension background worker, approval interfaces, wallet sessions, transaction construction, message signing, BNS resolution, and light-wallet-server communication.
The review was performed against immutable repository commits supplied for the engagement. Static analysis was supplemented with repository-native builds, type checks, unit and integration tests, deterministic concurrency models, payload-boundary testing, and targeted cryptographic verification.
Document | |
|---|---|
| Name | dApp Code Review and Security Analysis Report for Beldex |
| Audited By | Stephen Ajayi |
| Approved By | Bogdan Bodisteanu |
| Website | |
| Changelog | 07/09/2026 - Preliminary Report |
| Changelog | 09/09/2026 |
| Platform | Chromium browser extension, Firefox browser extension, Web3 integration SDK, Beldex network services |
| Language | TypeScript, TSX and React, JavaScript |
| Tags | Code Review |
| Methodology | https://docs.hacken.io/methodologies/dapp-audit-methodology→ |
Document
- Name
- dApp Code Review and Security Analysis Report for Beldex
- Audited By
- Stephen Ajayi
- Approved By
- Bogdan Bodisteanu
- Website
- Changelog
- 07/09/2026 - Preliminary Report
- Changelog
- 09/09/2026
- Platform
- Chromium browser extension, Firefox browser extension, Web3 integration SDK, Beldex network services
- Language
- TypeScript, TSX and React, JavaScript
- Tags
- Code Review
Review Scope | |
|---|---|
| Repository | https://github.com/Beldex-Coin/beldex-wallet-extension→ |
| Commit | df2c17c42b02cec2fe401be5ba8389104e3d86a3 |
| Branch | main |
| Repository | https://github.com/Beldex-Coin/bdx-web3js→ |
| Commit | 2c954233d3bf0bdf7ee5c328d7aa1a77f6d59f6c |
| Branch | main |
| Beldex Wallet Extension | 41683486452eba088d632a8a9524a6998782294c |
| BDX Web3JS | 8ad6fd40ac2184dcc9a73280a61f6e6723472b15 |
Review Scope
- Commit
- df2c17c42b02cec2fe401be5ba8389104e3d86a3
- Branch
- main
- Commit
- 2c954233d3bf0bdf7ee5c328d7aa1a77f6d59f6c
- Branch
- main
- Beldex Wallet Extension
- 41683486452eba088d632a8a9524a6998782294c
- BDX Web3JS
- 8ad6fd40ac2184dcc9a73280a61f6e6723472b15
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
{FindingsVulnSeverityStatusTable}
Documentation quality
The repositories provide useful top-level documentation, setup instructions, architecture descriptions, protocol guidance, integration examples, known limitations, and test coverage. The SDK documentation explains provider discovery, wallet connection, message signing, BNS resolution, events, and error handling.
Some documentation and type declarations have drifted from the implementation. Examples include implemented methods described as unavailable, differences between public response behavior and documented schemas, outdated build guidance, and security statements that require more precise threat-model wording.
Documentation should be maintained as a versioned interface contract and updated in the same change as protocol, build, dependency, permission, browser-support, or security behavior changes.
Code quality
The codebase is generally modular and uses TypeScript types to separate protocol messages, wallet state, network clients, approval interfaces, cryptographic helpers, and SDK-facing APIs. Security-sensitive operations are usually isolated into named modules, and the reviewed projects include meaningful automated tests.
The principal code-quality concern is that related security state is distributed across in-memory maps, browser storage, timers, runtime ports, approval windows, and current wallet-session lookups. Individual checks are often reasonable, but some multi-step operations are not represented by one atomic state transition.
Input validation is present for methods and several fields, but it is not consistently accompanied by byte, depth, key-count, or total-complexity limits before untrusted data crosses browser-process boundaries.
System Overview
The reviewed system consists of a browser wallet extension and a TypeScript SDK used by web applications.
DAPP REQUEST PATH
WALLET EXTENSION
The background worker manages wallet metadata, active-wallet state, encrypted vault access, unlocked sessions, auto-lock behavior, dApp grants, pending approvals, events, synchronization, and privileged extension messages.
The content script validates the outer dApp request envelope and relays accepted requests between the page and the extension runtime port.
The injected provider exposes the page-facing wallet API and communicates through same-window messages. It does not directly receive extension secrets or browser extension privileges.
The popup, side panel, and standalone approval interfaces display connection, transaction, and message-signing requests and obtain current wallet secrets through privileged background messages when execution is approved.
Transaction construction is performed through the pinned Beldex application bridge and WebAssembly interface. Light-wallet-server endpoints provide account information, unspent outputs, transaction submission, and synchronization data.
The message-signing implementation uses local spend-key material, Noble curve primitives, Keccak hashing, and a SigV1-compatible encoding. Public verification extracts a spend public key from a supplied address and verifies the submitted transcript.
BDX-WEB3JS SDK
The SDK provides wallet discovery, provider transport, connection management, balance and network queries, transaction requests, message signing and verification, BNS resolution, event subscriptions, React integration, unit conversion, address-shape helpers, timeout handling, and normalized errors.
TRUST BOUNDARIES
Web pages and all page-supplied request data are untrusted.
Origins used for wallet authorization are derived from browser sender metadata rather than request parameters.
Ordinary web content cannot directly invoke privileged extension-page message handlers.
Wallet secrets are retained inside extension-controlled contexts and are not intentionally returned to dApps.
The configured BNS resolver is an intended trust anchor according to client clarification.
The configured light-wallet server receives the wallet address and private view key and is trusted for scanning data and transaction relay, but it does not receive the private spend key.
The native and WebAssembly bridge is a security-critical dependency for address handling and transaction construction.
SECURITY STRENGTHS OBSERVED
Browser-derived origin association for dApp runtime ports.
Privileged message checks based on extension identity and extension-page URL.
Connection grants associated with both origin and wallet identity.
Explicit approval interfaces for connection, transaction, and signing requests.
Private spend keys remain inside extension-controlled execution paths.
Encrypted local wallet vault using authenticated encryption and a high-iteration password-based derivation function.
Persisted unlock backoff intended to slow repeated online password attempts.
Plain HTTP origins are rejected except for local development contexts.
Content Security Policy and local extension assets reduce remote-code-loading exposure.
Exact dependency pinning for the Beldex application bridge in the reviewed lockfile.
Message signing performs key-pair validation and a local signature self-check before returning a signature.
Transaction approvals display destination, amount, fee information, and other transaction facts before execution.
BNS payment review displays the complete resolved address for user confirmation.
TESTING AND VALIDATION
EXACT SOURCE VALIDATION
Both repositories were checked out at the full reviewed commit hashes. Security-relevant report snippets were compared with the immutable source and annotated with repository-relative file paths and exact line ranges.
WALLET EXTENSION
31 repository-native tests passed.
The TypeScript check passed.
The Chromium production build passed.
The Firefox production build passed.
SDK
70 repository-native tests passed.
The TypeScript check passed.
ESM, CommonJS, IIFE, and declaration builds passed.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2026-1921 | Release Binaries and Submitted Source Can Be Built From Different Inputs | mitigated | Medium | |
| F-2026-1921 | connectWithProof() Ownership Proofs Are Transferable Across Relying Parties | fixed | Medium | |
| F-2026-1920 | Approval Execution Is Not Bound to an Immutable Wallet/Session Context | fixed | Medium | |
| F-2026-1920 | Transaction Execution Can Outlive a Terminal dApp Failure or Timeout | fixed | Medium | |
| F-2026-1921 | Security-Critical dApp State Updates Are Not Serialized | fixed | Low | |
| F-2026-1922 | Restored Wallets Can Omit Historical Funds Because LWS Import Is Never Requested | accepted | Observation | |
| F-2026-1921 | Message Verification Accepts a Weak Spend Key That Needs No Secret | fixed | Observation | |
| F-2026-1921 | Approval-Page Keepalive Extends the Auto-Lock Session Without User Activity | fixed | Observation | |
| F-2026-1921 | Sign-Message Visual-Integrity Filtering Omits Default-Ignorable Unicode Characters | fixed | Observation | |
| F-2026-1921 | Protocol, Type Declarations, and Repository Documentation Have Drifted From Implementation | fixed | Observation |
Appendix 1. Severity Definitions
Findings are categorized based on their potential impact and assigned a severity level using the Common Vulnerability Scoring System (CVSS) version 4.0: →
Severity | Description |
|---|---|
Critical | These issues present a major security vulnerability that poses a severe risk to the system. They require immediate attention and must be resolved to prevent a potential security breach or other significant harm. |
High | These issues present a significant risk to the system, but may not require immediate attention. They should be addressed in a timely manner to reduce the risk of the potential security breach. |
Medium | These issues present a moderate risk to the system and cannot have a great impact on its function. They should be addressed in a reasonable time frame, but may not require immediate attention. |
Low | These issues present no risk to the system and typically relate to the code quality problems or general recommendations. They do not require immediate attention and should be viewed as a minor recommendation. |
Severity
- Critical
Description
- These issues present a major security vulnerability that poses a severe risk to the system. They require immediate attention and must be resolved to prevent a potential security breach or other significant harm.
Severity
- High
Description
- These issues present a significant risk to the system, but may not require immediate attention. They should be addressed in a timely manner to reduce the risk of the potential security breach.
Severity
- Medium
Description
- These issues present a moderate risk to the system and cannot have a great impact on its function. They should be addressed in a reasonable time frame, but may not require immediate attention.
Severity
- Low
Description
- These issues present no risk to the system and typically relate to the code quality problems or general recommendations. They do not require immediate attention and should be viewed as a minor recommendation.
Appendix 2. Scope
The scope of the project includes the following codebase from the provided repository:
Scope Details | |
|---|---|
| Repository | https://github.com/Beldex-Coin/beldex-wallet-extension→ |
| Commit | df2c17c42b02cec2fe401be5ba8389104e3d86a3 |
| Branch | main |
| Requested Files | scripts/package.sh, src/background/dapp.ts, src/background/index.ts, src/popup/views/Dashboard.tsx, src/popup/views/Settings.tsx, src/popup/views/Onboarding.tsx, src/popup/views/SendApprovalCard.tsx, src/popup/views/ConnectedSitesBadge.tsx, src/popup/views/Receive.tsx, src/popup/views/SignApprovalCard.tsx, src/popup/views/Unlock.tsx, src/popup/views/ConnectApprovalCard.tsx, src/approval/App.tsx, src/approval/index.tsx, src/inpage/index.ts, src/popup/App.tsx, src/popup/index.tsx, src/content/index.ts, src/lib/signMessage.ts, src/lib/send.ts, src/lib/bridge.ts, src/lib/messages.ts, src/lib/dappProtocol.ts, src/lib/keyring.ts, src/lib/spent.ts, src/lib/bns.ts, src/lib/lws.ts, src/lib/money.ts, src/lib/pidLabels.ts, src/lib/config.ts, src/lib/clipboard.ts, src/lib/pendingTxs.ts, src/lib/platform.ts, src/lib/price.ts, src/lib/sessionStore.ts, src/lib/format.ts |
| Repository | https://github.com/Beldex-Coin/bdx-web3js→ |
| Commit | 2c954233d3bf0bdf7ee5c328d7aa1a77f6d59f6c |
| Branch | main |
| Requested Files | src/client.ts, src/react.tsx, src/types.ts, src/transport.ts, src/units.ts, src/provider.ts, src/errors.ts, src/address.ts, src/index.ts |
| Beldex Wallet Extension | 41683486452eba088d632a8a9524a6998782294c |
| BDX Web3JS | 8ad6fd40ac2184dcc9a73280a61f6e6723472b15 |
Scope Details
- Commit
- df2c17c42b02cec2fe401be5ba8389104e3d86a3
- Branch
- main
- Requested Files
- scripts/package.sh, src/background/dapp.ts, src/background/index.ts, src/popup/views/Dashboard.tsx, src/popup/views/Settings.tsx, src/popup/views/Onboarding.tsx, src/popup/views/SendApprovalCard.tsx, src/popup/views/ConnectedSitesBadge.tsx, src/popup/views/Receive.tsx, src/popup/views/SignApprovalCard.tsx, src/popup/views/Unlock.tsx, src/popup/views/ConnectApprovalCard.tsx, src/approval/App.tsx, src/approval/index.tsx, src/inpage/index.ts, src/popup/App.tsx, src/popup/index.tsx, src/content/index.ts, src/lib/signMessage.ts, src/lib/send.ts, src/lib/bridge.ts, src/lib/messages.ts, src/lib/dappProtocol.ts, src/lib/keyring.ts, src/lib/spent.ts, src/lib/bns.ts, src/lib/lws.ts, src/lib/money.ts, src/lib/pidLabels.ts, src/lib/config.ts, src/lib/clipboard.ts, src/lib/pendingTxs.ts, src/lib/platform.ts, src/lib/price.ts, src/lib/sessionStore.ts, src/lib/format.ts
- Commit
- 2c954233d3bf0bdf7ee5c328d7aa1a77f6d59f6c
- Branch
- main
- Requested Files
- src/client.ts, src/react.tsx, src/types.ts, src/transport.ts, src/units.ts, src/provider.ts, src/errors.ts, src/address.ts, src/index.ts
- Beldex Wallet Extension
- 41683486452eba088d632a8a9524a6998782294c
- BDX Web3JS
- 8ad6fd40ac2184dcc9a73280a61f6e6723472b15
Appendix 3. Additional Valuables
Frameworks and Methodologies
This security assessment was conducted in alignment with recognised penetration testing standards, methodologies and guidelines, including the NIST SP 800-115 – Technical Guide to Information Security Testing and Assessment →, the Penetration Testing Execution Standard (PTES) →, and the OWASP Testing Guide →. These assets provide a structured foundation for planning, executing, and documenting technical evaluations such as vulnerability assessments, exploitation activities, and security code reviews. Hacken’s internal penetration testing methodology extends these principles to Web2 and Web3 environments to ensure consistency, repeatability, and verifiable outcomes.