Repository Public
1{2 "id": "QYV-SVC-084",3 "title": "Symbol and decimals of a detected token came from the persisted snapshot when a payment was prepared after a restart",4 "severity": "low",5 "cvss_vector": "",6 "cvss_score": null,7 "cwe": "CWE-345",8 "masvs": "MASVS-STORAGE-1",9 "area": "storage",10 "location": "Sources/QyvoraWallet/WalletService+Send.swift:374",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "b3b8fac",15 "regression_test": "QyvoraWalletTests.MainnetPolicyTests (EVMChainsAuditRegressionTests.swift): aDetectedTokenOfARestoredSnapshotIsNotUsedForAPayment",16 "description": "Root cause: `evmToken` (uniform `prepareSend` with a token found by the indexer and not yet accepted) took the `TokenInfo` from `evmSnapshots[network].detectedTokens`. After a restart that snapshot is the file `evm-sync-<chain>.json`, restored after range checks only (decimals 0…36, network, non-zero address): symbol and decimals of a detected token are then whatever the file says. Impact: whoever can write into the application container could make the review of such a payment show the amount with other decimals and another symbol than the contract's (the base units signed are the ones the caller passed; an interface converts the user's figure with the same forged decimals). Needs local write access to the container, a token outside the wallet's list, and a test network or an audited build (on an unaudited mainnet build a token outside the list cannot be sent at all). Balances are not concerned: every prepare reads them again on chain.",17 "recommendation": "Use a detected token for a payment only when this session read it on chain (`isFromPreviousSession == false`), otherwise ask for a synchronization or for the token to be added.",18 "evidence": "",19 "fingerprint": "e1e164bb68b3",20 "reported": "2026-12-05",21 "owner": "integrator",22 "fixed": "2026-12-05",23 "verification": "Root-package tests on M5M36 (Swift 6.4, release): QyvoraWalletTests, QyvoraNetworkingTests, QyvoraCoreTests; audit-package suites EVMChains* and Multichain* on M5M36.",24 "resolution_note": "Fixed as recommended: a snapshot restored from the previous session no longer supplies token metadata to `prepareSend`; the call answers \"This token is not in the wallet's list. Add it first.\" until a synchronization of this session has read the token on chain. Listed tokens were not concerned (their description comes from the built-in list or from the profile). The regression test fails on the code before the fix, checked on M5M36.",25 "residual_risk": "Custom tokens are stored in the profile file with the decimals read on chain when they were added (one endpoint): the profile is not authenticated (QYV-SVC-011) and that reading is not cross-checked (QYV-SVC-014). The synchronization compares the decimals of every listed token with the contract once per session and shows a mismatch instead of a balance."26}27