Management Summary
Ducat contacted Sayfer Security in order to perform penetration testing on Ducat’s MetaMask Snap in 06/2026.
Before assessing the above services, we held a kickoff meeting with the Ducat technical team and received an overview of the system and the goals for this research.
Over the research period of 2 weeks, we discovered 9 vulnerabilities in the system.
In conclusion, several fixes should be implemented following the report, but the system’s security posture is competent.
After a review by the Sayfer team, we certify that all the security issues mentioned in this report have been addressed by the Ducat team.
Risk Methodology
At Sayfer, we are committed to delivering the highest quality penetration testing to our clients. That’s why we have implemented a comprehensive risk assessment model to evaluate the severity of our fi ndings and provide our clients with the best possible recommendations for mitigation.
Our risk assessment model is based on two key factors: IMPACT and LIKELIHOOD. Impact refers to the potential harm that could result from an issue, such as fi nancial loss, reputational damage, or a non-operational system. Likelihood refers to the probability that an issue will occur, taking into account factors such as the complexity of the attack and the number of potential attackers.
By combining these two factors, we can create a comprehensive understanding of the risk posed by a particular issue and provide our clients with a clear and actionable assessment of the severity of the issue. This approach allows us to prioritize our recommendations and ensure that our clients receive the best possible advice on how to protect their business.
Risk is defined as follows:

Vulnerabilities by Risk
High – Direct threat to key business processes.
Medium – Indirect threat to key business processes or partial threat to business processes.
Low – No direct threat exists. The vulnerability may be exploited using other vulnerabilities.
Informational – This finding does not indicate vulnerability, but states a comment that notifies about design flaws and improper implementation that might cause a problem in the long run.
| Severity | # of issues |
|---|---|
| Low | 7 |
| Medium | 1 |
| High | 0 |
| Informational | 1 |
Approach
Introduction
Ducat contacted Sayfer to perform penetration testing on their MetaMask Snap application.
This report documents the research carried out by Sayfer targeting the selected resources defined under the research scope. Particularly, this report displays the security posture review for Ducat’s MetaMask Snap application and its surrounding infrastructure and process implementations.
Our penetration testing project life cycle:
Scope Overview
Technical Overview
Scope Validation
Threat Model
Security Evaluation
Security Assessment
Scope Overview
During our first meeting and after understanding the company’s needs, we defined the application’s scope that resides at the following URLs as the scope of the project:
- Coti’s MetaMask Snap
- Audit commit: b85caf694e3c3f86483c7b38529ae607e91d76ea
- Fixes commit: 456efa76d21e472397a1af5d9bac66e24534b3db
Our tests were performed from 17/06/2026 to 01/07/2026.
Scope Validation
We began by ensuring that the scope defi ned to us by the client was technically logical.
Deciding what scope is right for a given system is part of the initial discussion. Getting the scope right is key to deriving maximum business value from the research.
Threat Model
During our kickoff meetings with the client we defi ned the most important assets the application possesses.
We defi ned that the largest current threat to the system is leakage of the user’s AES encryption key, which protects confi dential balances and underpins wallet key derivation, leading to potential loss of funds and full compromise of confi dential transaction data.
Security Evaluation Methodology
Sayfer uses OWASP WSTG as our technical standard when reviewing web applications. After gaining a thorough understanding of the system we decided which OWASP tests are required to evaluate the system.
Security Assessment
After understanding and defi ning the scope, performing threat modeling, and evaluating the correct tests required in order to fully check the application for security fl aws, we performed our security assessment.
Issue Table Description
Issue title
| ID | SAY-??: An ID for easy communication on each vulnerability |
| Status | Open/Fixed/Acknowledged |
| Risk | Represents the risk factor of the issue. For further description refer to the Vulnerabilities by Risk section. |
| Business Impact | The main risk of the vulnerability at a business level. |
| Location | The URL or the fi le in which this issue was detected. Issues with no location have no particular location and refer to the product as a whole. |
| Description | Here we provide a brief description of the issue and how it formed, the steps we made to fi nd or exploit it, along with proof of concept (if present), and how this issue can aff ect the product or its users. |
| Mitigation | Suggested resolving options for this issue and links to advised sites for further remediation. |
Security Evaluation
The following tests were conducted while auditing the system
Information Gathering
| Information Gathering | Test Name | Status |
| WSTG-INFO-01 | Conduct Search Engine Discovery Reconnaissance for Information Leakage | Pass |
| WSTG-INFO-02 | Fingerprint Web Server | Pass |
| WSTG-INFO-03 | Review Webserver Metafiles for Information Leakage | Pass |
| WSTG-INFO-04 | Enumerate Applications on Webserver | Pass |
| WSTG-INFO-05 | Review Webpage Content for Information Leakage | Pass |
| WSTG-INFO-06 | Identify application entry points | Pass |
| WSTG-INFO-07 | Map execution paths through application | Pass |
| WSTG-INFO-08 | Fingerprint Web Application Framework | Pass |
| WSTG-INFO-09 | Fingerprint Web Application | Pass |
| WSTG-INFO-10 | Map Application Architecture | Pass |
Configuration and Deploy Management Testing
| Configuration and Deploy Management Testing | Test Name | Status |
| WSTG-CONF-01 | Test Network Infrastructure Configuration | Pass |
| WSTG-CONF-02 | Test Application Platform Configuration | Pass |
| WSTG-CONF-03 | Test File Extensions Handling for Sensitive Information | Pass |
| WSTG-CONF-04 | Review Old Backup and Unreferenced Files for Sensitive Information | Pass |
| WSTG-CONF-05 | Enumerate Infrastructure and Application Admin Interfaces | Pass |
| WSTG-CONF-06 | Test HTTP Methods | Pass |
| WSTG-CONF-07 | Test HTTP Strict Transport Security | Pass |
| WSTG-CONF-08 | Test RIA cross domain policy | Pass |
| WSTG-CONF-09 | Test File Permission | Pass |
| WSTG-CONF-10 | Test for Subdomain Takeover | Pass |
| WSTG-CONF-11 | Test Cloud Storage | Pass |
Identity Management Testing
| Identity Management Testing | Test Name | Status |
| WSTG-IDNT-01 | Test Role Definitions | Pass |
| WSTG-IDNT-02 | Test User Registration Process | Pass |
| WSTG-IDNT-03 | Test Account Provisioning Process | Pass |
| WSTG-IDNT-04 | Testing for Account Enumeration and Guessable User Account | Pass |
| WSTG-IDNT-05 | Testing for Weak or unenforced username policy | Pass |
Authentication Testing
| Authentication Testing | Test Name | Status |
| WSTG-ATHN-01 | Testing for Credentials Transported over an Encrypted Channel | Pass |
| WSTG-ATHN-02 | Testing for Default Credentials | Pass |
| WSTG-ATHN-03 | Testing for Weak Lock Out Mechanism | Pass |
| WSTG-ATHN-04 | Testing for Bypassing Authentication Schema | Pass |
| WSTG-ATHN-05 | Testing for Vulnerable Remember Password | Pass |
| WSTG-ATHN-06 | Testing for Browser Cache Weaknesses | Pass |
| WSTG-ATHN-07 | Testing for Weak Password Policy | Pass |
| WSTG-ATHN-08 | Testing for Weak Security Question Answer | Pass |
| WSTG-ATHN-09 | Testing for Weak Password Change or Reset Functionalities | Pass |
| WSTG-ATHN-10 | Testing for Weaker Authentication in Alternative Channel | Pass |
Authorization Testing
| Authorization Testing | Test Name | Status |
| WSTG-ATHZ-01 | Testing Directory Traversal File Include | Pass |
| WSTG-ATHZ-02 | Testing for Bypassing Authorization Schema | Pass |
| WSTG-ATHZ-03 | Testing for Privilege Escalation | Pass |
| WSTG-ATHZ-04 | Testing for Insecure Direct Object References | Pass |
Session Management Testing
| Session Management Testing | Test Name | Status |
| WSTG-SESS-01 | Testing for Session Management Schema | Pass |
| WSTG-SESS-02 | Testing for Cookies Attributes | Pass |
| WSTG-SESS-03 | Testing for Session Fixation | Pass |
| WSTG-SESS-04 | Testing for Exposed Session Variables | Pass |
| WSTG-SESS-05 | Testing for Cross Site Request Forgery | Pass |
| WSTG-SESS-06 | Testing for Logout Functionality | Pass |
| WSTG-SESS-07 | Testing Session Timeout | Pass |
| WSTG-SESS-08 | Testing for Session Puzzling | Pass |
| WSTG-SESS-09 | Testing for Session Hijacking | Pass |
Data Validation Testing
| Data Validation Testing | Test Name | Status |
| WSTG-INPV-01 | Testing for Reflected Cross Site Scripting | Pass |
| WSTG-INPV-02 | Testing for Stored Cross Site Scripting | Pass |
| WSTG-INPV-03 | Testing for HTTP Verb Tampering | Pass |
| WSTG-INPV-04 | Testing for HTTP Parameter Pollution | Pass |
| WSTG-INPV-05 | Testing for SQL Injection | Pass |
| WSTG-INPV-06 | Testing for LDAP Injection | Pass |
| WSTG-INPV-07 | Testing for XML Injection | Pass |
| WSTG-INPV-08 | Testing for SSI Injection | Pass |
| WSTG-INPV-09 | Testing for XPath Injection | Pass |
| WSTG-INPV-10 | Testing for IMAP SMTP Injection | Pass |
| WSTG-INPV-11 | Testing for Code Injection | Pass |
| WSTG-INPV-12 | Testing for Command Injection | Pass |
| WSTG-INPV-13 | Testing for Format String Injection | Pass |
| WSTG-INPV-14 | Testing for Incubated Vulnerability | Pass |
| WSTG-INPV-15 | Testing for HTTP Splitting Smuggling | Pass |
| WSTG-INPV-16 | Testing for HTTP Incoming Requests | Pass |
| WSTG-INPV-17 | Testing for Host Header Injection | Pass |
| WSTG-INPV-18 | Testing for Server-side Template Injection | Pass |
| WSTG-INPV-19 | Testing for Server-Side Request Forgery | Pass |
Error Handling
| Error Handling | Test Name | Status |
| WSTG-ERRH-01 | Testing for Improper Error Handling | Pass |
| WSTG-ERRH-02 | Testing for Stack Traces | Pass |
Cryptography
| Cryptography | Test Name | Status |
| WSTG-CRYP-01 | Testing for Weak Transport Layer Security | Pass |
| WSTG-CRYP-02 | Testing for Padding Oracle | Pass |
| WSTG-CRYP-03 | Testing for Sensitive Information Sent via Unencrypted Channels | Pass |
| WSTG-CRYP-04 | Testing for Weak Encryption | Pass |
Business logic Testing
| Business Logic Testing | Test Name | Status |
| WSTG-BUSL-01 | Test Business Logic Data Validation | Pass |
| WSTG-BUSL-02 | Test Ability to Forge Requests | Pass |
| WSTG-BUSL-03 | Test Integrity Checks | Pass |
| WSTG-BUSL-04 | Test for Process Timing | Pass |
| WSTG-BUSL-05 | Test Number of Times a Function Can be Used Limits | Pass |
| WSTG-BUSL-06 | Testing for the Circumvention of Work Flows | Pass |
| WSTG-BUSL-07 | Test Defenses Against Application Mis-use | Pass |
| WSTG-BUSL-08 | Test Upload of Unexpected File Types | Pass |
| WSTG-BUSL-09 | Test Upload of Malicious Files | Pass |
Client Side Testing
| Client Side Testing | Test Name | Status |
| WSTG-CLNT-01 | Testing for DOM-Based Cross Site Scripting | Pass |
| WSTG-CLNT-02 | Testing for JavaScript Execution | Pass |
| WSTG-CLNT-03 | Testing for HTML Injection | Pass |
| WSTG-CLNT-04 | Testing for Client Side URL Redirect | Pass |
| WSTG-CLNT-05 | Testing for CSS Injection | Pass |
| WSTG-CLNT-06 | Testing for Client Side Resource Manipulation | Pass |
| WSTG-CLNT-07 | Test Cross Origin Resource Sharing | Pass |
| WSTG-CLNT-08 | Testing for Cross Site Flashing | Pass |
| WSTG-CLNT-09 | Testing for Clickjacking | Pass |
| WSTG-CLNT-10 | Testing WebSockets | Pass |
| WSTG-CLNT-11 | Test Web Messaging | Pass |
| WSTG-CLNT-12 | Testing Browser Storage | Pass |
| WSTG-CLNT-13 | Testing for Cross Site Script Inclusion | Pass |
API Testing
| API Testing | Test Name | Status |
| WSTG-APIT-01 | Testing GraphQL | Pass |
Security Assessment Findings
Forgeable “decoded from vault data” Panel
| ID | SAY-01 |
| Status | Fixed |
| Risk | Medium |
| Business Impact | A compromised authorized frontend can render an entirely fabricated “Updated vault state” panel inside the signing dialog under a trusted “decoded from vault data” badge, misleading a user who relies on the displayed vault health. |
| Location | – psbt.ts; inferVaultCollateralSats(action, outputs) – psbt.ts; legacyVaultAction(DucatVaultActionFlag) |
Description
When decodeDucatVaultReturn( .) successfully parses a Ducat OP_RETURN OP_8 output, summarizePsbt( .) puts the resulting DucatVaultReturnData into summary.vaultUpdates, and contextFromDecodedVault( .) in confirmations.ts builds the dialog’s vault card from it, stamping source: ‘op_return’ and the label “decoded from vault data”. The comment there asserts that “every numeric field below is taken strictly from the PSBT-decoded vault data … so the ‘decoded from vault data’ provenance cannot be forged.”
- confirmations.ts:210-212
// Every numeric field below is taken strictly from the PSBT-decoded vault data.
App-supplied
// vault numbers are never used as a fallback, and `source` is always stamped by us so
the
// "decoded from vault data" provenance cannot be forged via context.
That guarantee does not hold for the collateral figure as collateralSats is not carried in the OP_RETURN payload as it is produced by inferVaultCollateralSats(action, outputs), which returns outputs[action.vaultOutputIndex].value after only checking output.value > 0 and !isOpReturnScript. It never calls outputRole( .)/getRoleForAddress( .) to confirm that output actually pays the user’s vault address.
- psbt.ts:500-504
if (!output || output.value <= 0 || isOpReturnScript(Buffer.from(output.script))) {
return undefined;
}
return output.value;
Because action.vaultOutputIndex is a fixed positional index per action code in DUCAT_VAULT_ACTION_CODES, the frontend can place any value, including the amount it is sending to an attacker, at that index and have it displayed as authoritative “Collateral.”
That value then flows into vaultHealthFromReturnData(DucatValueReturnData) to compute the shown Health factor, while unitPrice/tholdPrice are read with readUint32(Buffer, number) directly from attacker-supplied payload bytes. The legacy decode path compounds the issue as legacyVaultAction( .) hardcodes vaultOutputIndex to 0 for every non-‘o’ flag, so a legacy-decoded borrow reads outputs[0] instead of the canonical outputs[1], diverging from DUCAT_VAULT_ACTION_CODES and mislabeling collateral even for honest callers on that path.
- psbt.ts:507-514
function legacyVaultAction(flag: DucatVaultActionFlag): DecodedVaultAction {
return {
actionFlag: flag,
actionType: DUCAT_ACTION_TYPES[flag],
protocolAction: DUCAT_ACTION_TYPES[flag],
vaultOutputIndex: flag === 'o' ? 2 : 0,
};}
Mitigation
Pass keySet into inferVaultCollateralSats(DecodedVaultAction, Psbt[‘txOutputs’]) and only treat outputs[vaultOutputIndex] as collateral when outputRole(address, keySet) = ‘vault’, returning undefined otherwise. Additionally, soften the “decoded from vault data” wording and the confirmations.ts:210-212 comment to reflect that these are advisory app-supplied figures, and align legacyVaultAction( .)’s vaultOutputIndex with DUCAT_VAULT_ACTION_CODES.
Attacker-Controlled Action Headline, Intent Copy and Notification Title for Non-Vault PSBTs
| ID | SAY-02 |
| Status | Fixed |
| Risk | Low |
| Business Impact | For any PSBT with no decodable Ducat OP_RETURN, the prominent dialog headline, the “Approval summary” intent sentence, and the MetaMask notification title are fully controlled by the frontend, so a plain BTC spend to an attacker can be headlined “Deposit BTC.” The real recipients, amounts, and fee are still rendered truthfully below, limiting this to a presentation or social-engineering aid. |
| Location | – confirmations.ts; confirmPsbt({string; PsbtSummary; DucatActionContext?}) |
Description
In confirmPsbt( .), displayContext = contextFromDecodedVault(summary, context) only overrides the title when summary.vaultUpdates[0] exists and otherwise it returns { .context} and preserves the app-supplied context.title. action = actionLabel(displayContext, ‘Ducat transaction’) then becomes the headline Card title, and actionIntent(displayContext) the intent copy.
- confirmations.ts: 688-689
const decodedBatchSummary = summaries.find((summary) => summary.vaultUpdates.length > 0);
const displayContext = decodedBatchSummary ? contextFromDecodedVault(decodedBatchSummary,
params.context) : (params.context ?? {});
actionLabel(DucatActionContext?, string) maps known keys to safe constants but otherwise passes the raw title through titleCaseFallback(string), which strips control chars but imposes no semantic constraint. The same app-controlled label feeds the notification path via actionTitleFromParams(unknown, string) and notifyAction(ActionNotificationParams). The context.title is validated only by isOptionalLabel(unknown) that validates that length ≤ 200, so it is otherwise free text.
Mitigation
For non-vault PSBTs derive the headline from PSBT-verified facts, or render app-supplied labels with an explicit “app-provided” marker so an unverified string never occupies the primary action slot.
Snap Home Collateral Ratio Scaled by 100x
| ID | SAY-03 |
| Status | Fixed |
| Risk | Low |
| Business Impact | Any genuine vault collateral ratio of 20 or more is displayed at 1/100th of its true value on Snap Home, materially misrepresenting vault safety. This is a read-only screen and cannot affect a signature. |
| Location | – home.ts; collateralRatioLabel(number | null) |
Description
collateralRatioLabel(value) computes const percent = value > 0 & value < 20 ? value * 100 : value, a magnitude-based guess of whether the validator returned a fractional multiplier or an already-percentage value.
The project’s own test pins the intended convention as a multiplier, for example in rpc.test.ts asserts that vault_ratio = 6.233342137488894 must render as “623.33% collateral”.
- rpc.test.ts:1022, 1047
vault_ratio: 6.233342137488894,
[...]
expect(rendered).toContain('Collateral');
Applying that convention, any vault.collateralRatio ≥ 20 is printed verbatim instead of x100, creating a hard discontinuity at the < 20 boundary and a 100x understatement above it.
Mitigation
Use the contract-pinned encoding (always ×100, matching the validator schema) instead of the magnitude guess, or key the scaling off an explicit unit and field returned by the validator.
signBatch(…) Does Not Deduplicate Outpoints across Entries
| ID | SAY-04 |
| Status | Fixed |
| Risk | Low |
| Business Impact | A batch can contain multiple entries that spend the same UTXO and all of them are signed, while the confirmation states the batch is “all-or-nothing” and “signs the full batch in order”, a promise that cannot hold since conflicting transactions cannot all be confirmed. |
| Location | – rpc.ts; signBatch(string, unknown) |
Description
assertUniqueInputOutpoints(Psbt) is invoked once per PSBT inside preparePsbtForSigning( .) and only deduplicates outpoints within a single transaction. signBatch(string, unknown) maps each entry through preparePsbtForSigning( .) independently and never compares txInputs across entries, so two entries sharing a txid:vout both pass preparation and are signed by signPreparedPsbt( .).
The batch confirmation copy in confirmBatch( .) nonetheless tells the user “Approving signs the full batch in order.”
Mitigation
Maintain a batch-wide set of hash:index outpoints across all entries and reject or prominently warn on any cross-entry conflict before showing the batch dialog.
signMessage(…) returns an empty messageHash
| ID | SAY-05 |
| Status | Fixed |
| Risk | Low |
| Business Impact | Every successful ducat_signMessage returns an empty messageHash even though the response type advertises a populated string, so a consumer that reads it to bind or verify the BIP322 signature against its digest receives nothing usable. The produced signature itself is valid and the dialog shows a correct fingerprint, so there is no signing-correctness impact. |
| Location | – rpc.ts; signMessage(string, unknown) |
Description
SignMessageResponse( .) declares that result.messageHash: string as part of the BIP322 result, but signMessage hardcodes an empty hash.
- rpc.ts:43-51
type SignMessageResponse = {
status: 'success';
result: {
address: string;
messageHash: string;
protocol: 'BIP322';
signature: string;
};
};
- rpc.ts:276-284
return {
status: 'success',
result: {
address,
messageHash: '',
signature,
protocol: 'BIP322',
},
};
The genuine tagged digest sha256(tagHash | tagHash | message) is computed during buildToSpendTx(string, Buffer) and again as messageSha256 in confirmMessage( .) for the displayed fingerprint, but neither value is plumbed back into the RPC response.
Mitigation
Populate messageHash with the BIP0322 tagged hash returned over RPC, or remove the field from SignMessageResponse to avoid implying a value that is never provided.
Same guardian pubkey reused across mainnet, signet, and mutinynet
| ID | SAY-06 |
| Status | Acknowledged |
| Risk | Low |
| Business Impact | The cosign guardian key ef8e6d84…1362ca2e is pinned for mainnet and both testnets, so a compromise of the (typically less-protected) testnet guardian signing infrastructure also yields the mainnet cosigner identity. It does not by itself drain a vault as the user’s snap must still co-sign with explicit approval, but it weakens the 2-of-2 cosign trust model. |
| Location | – networks.ts |
Description
The DUCAT_GUARDIAN_PUBKEYS lists the identical x-only pubkey as the mainnet entry, the signet entry, and an entry within the mutinynet list. isKnownGuardianPubkey(DucatNetwork, string) correctly enforces the per-network whitelist when signing a cosign leaf, so the whitelist mechanism itself is sound – the issue is purely the reuse of one key across production and test networks.
Mitigation
Provision and pin distinct guardian keys per network so that testnet key exposure cannot compromise the mainnet cosigner identity.
PSBT and Batch Confirmation Dialogs Collapse Recipients Beyond a Visible Fold
| ID | SAY-07 |
| Status | Fixed |
| Risk | Low |
| Business Impact | For any PSBT with more external recipients than the dialog itemizes, a malicious whitelisted origin can bury an external recipient past the visible fold so the destination of funds the user is signing over is never individually shown. The aggregate “You pay” total and external-output total are always shown truthfully, so funds cannot leave silently beyond the displayed aggregate, limiting this to loss of per-recipient reviewability. |
| Location | – confirmations.ts; confirmPsbt({ string; PsbtSummary; DucatActionContext }) |
Description
The prominent “Recipient(s)” summary card in confirmPsbt( .) only shows a concrete address when externalOutputCount = 1, but with multiple external outputs it shows only a count.
- confirmations.ts:554-557
const recipientDescription =
externalOutputCount === 1 && primaryExternalOutput
? `${outputDetailLabel(primaryExternalOutput)} -
${truncateMiddle(primaryExternalOutput.address, 12, 8)}`
: compactCount(externalOutputCount, 'external output');
The itemized output list is sliced to the first 8 and per-batch-entry recipients to the first 3
- confirmations.ts:524
const visibleOutputs = recipientOutputs.slice(0, 8);
- confirmations.ts:376
const visible = externalOutputs.slice(0, 3);
Hidden outputs are summarized only as an aggregate “+ N more outputs; hidden external total X” line. The PSBT validation cap MAX_PSBT_OUTPUTS = 120 (psbt.ts:29) is far above the 8-row fold, so PSBTs with 9-120 external outputs reach the dialog with recipients not individually displayed.
Mitigation
For signing confirmations, render every external (non-change, non-data) recipient row, or hard-cap the external-recipient count in the PSBT validation layer and reject PSBTs with more recipients than can be displayed, rather than silently collapsing them. At minimum, show each external recipient’s address even when externalOutputCount > 1.
Wallet Addresses and Public Vault Keys Are Silently Transmitted to Esplora and the Ducat Validator
| ID | SAY-08 |
| Status | Fixed |
| Risk | Low |
| Business Impact | Every onHomePage render and every ducat_getHomeState RPC call (callable by any allowlisted origin, including the weaker dev/staging origins) sends the user’s sats address to mempool.space (or mutinynet.com) and the runes address + vault x-only pubkey to Ducat-operated validator servers, with no confirmation dialog or visible network indicator, letting those parties correlate the wallet’s addresses with IP and time on every home-page open. |
| Location | – home.ts; getHomeState(unknown) |
Description
getHomeState(unknown) fires three fetches in parallel on every invocation. No snap_dialog or privacy notice precedes these.
- home.ts:284-288
const [btcSats, unit, vault] = await Promise.all([
fetchBtcBalance(network, keySet.record.sats.address),
fetchUnitBalance(network, keySet.record.runes.address),
fetchVaultSummary(network, keySet.record.vault.pubkey),
]);
ducat_getHomeState is reachable by any whitelisted origin including staging/dev. Transmissions are first-party over HTTPS and carry no private-key material, bounding the issue to Low.
Note: onHomePage itself is a user-navigation gesture (not gesture-free), but navigation is not consent to transmit addresses; the genuinely gesture-free path is the ducat_getHomeState RPC method.
Mitigation
Disclose in the onHomePage UI (and in the snap listing / PRIVACY.md) that opening Snap Home contacts mempool.space and Ducat validator servers with the user’s addresses. Consider making balance and vault lookups opt-in (a “Refresh” button) rather than automatic, and consider not exposing ducat_getHomeState’s network side-effects to dev/staging origins.
Unreachable Branch
| ID | SAY-09 |
| Status | Fixed |
| Risk | Informational |
| Business Impact | The “message preview / showing the first 800 characters” branch can never execute, so it is harmless dead code with no user-facing effect. |
| Location | – confirmMessage({string; DucatNetwork; string; DucatAddressRole; string; DucatActionContext?}) |
Description
signMessage(string, unknown) rejects any message with length longer than 800.
- rpc.ts:240-245
if (message.length > MAX_MESSAGE_LENGTH) {
throw ducatError('INVALID_PARAMS', 'Ducat message signing requests must fit
fully in the MetaMask confirmation.', {
maxMessageLength: MAX_MESSAGE_LENGTH,
actualMessageLength: message.length,
});
}
confirmMessage( .), which runs afterwards, which is supposed to slice those messages to exactly that length. This branch is therefore unreachable, since isTruncated will always be false.
- confirmations:493-501
uiCollapsibleSection(
isTruncated ? 'Message preview' : 'Message to sign',
[
uiMuted('Copyable value is exactly what will be signed.'),
...(isTruncated ? [uiMuted('Showing the first 800 characters.')] : []),
uiCopyable(displayedMessage),
],
true,
),
Mitigation
Remove the dead branch, or align the slice or limit constants intentionally if longer messages with truncation are ever to be supported.