AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Moderate 60 Monero

fix(openalias): expire a resolved alias with its TTL

Public commit record

What the developer wrote

Authored by sneurlax

85/100 · Strong
fix(openalias): expire a resolved alias with its TTL

A repeated Preview or Add recipient reused the cached address for as
long as the form lived, so a later send could pay an address the
recipient had since replaced. Reuse now ends with the answer's TTL,
capped at an hour.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit fixes a bug in Stack Wallet where an OpenAlias recipient address (for example, an email-like alias that resolves to a crypto address) could be reused indefinitely once it was first looked up. If the recipient later changed their address, the wallet might still send funds to the old, cached address. The fix makes the cached address expire after the time-to-live (TTL) returned by the OpenAlias lookup, capped at one hour, so the wallet will re-resolve the alias before sending if the cached answer is stale.

Recommended action

Reviewers should confirm that all code paths that consume OpenAliasResolved (including any not shown in this diff) check isCurrent() before reusing a cached address, and that the one-hour cap is appropriate for the threat model. Consider whether the wallet should also clear cached resolutions when the app is backgrounded or the send form is closed.

Security signals we found

01

Use of stale cached address could lead to sending funds to an address the recipient no longer controls

02

OpenAlias TTL was previously ignored, extending the window for address-replacement attacks

03

Fix explicitly caps reuse at one hour even if resolver returns a longer TTL

04

Both mobile and desktop send paths updated consistently

05

New unit and widget tests cover expiry and reuse behavior

Risk score

Why this scored 60/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 8/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.