MetaMask / MetaMask/metamask-mobile

Security alerts - We should run a new validation when transaction is edited on mobile

Open
#8,382 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Blockaid INVALID-ISSUE-TEMPLATE team-confirmations type-enhancement
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

**Describe the bug**

**Problem:** [same as in Extension](https://github.com/MetaMask/metamask-extension/issues/22554), whenever we edit a transaction, the PPOM validation is not updated. A benign transaction could be malicious, if we change the amount of Approve/Send. However this won't be captured by the Blockaid warning, as it does not re-run the validation on Edit.

**Expected behavior**

- Should we re-validate on edit? in all cases ,in some cases (i.e. if gas is changed no, but if recipient/ amounts are changed yes?)

**Screenshots/Recordings**

https://github.com/MetaMask/metamask-mobile/assets/54408225/c7327bde-5e66-4235-b2c4-a2b452b7ceab

**Steps to reproduce**

1. Enable Blockaid from Settings
2. Trigger a malicious Approve ERC20
3. See malicious warning is displayed
4. Change the approve value to 0
5. See malicious warning is still displayed / validation is not re-run

**Version**

7.15.0

**Build type**

None

**Device**

Pixel 6

**Operating system**

Android

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Extension issue and trace the mobile transaction-edit flow, including where PPOM or Blockaid validation is invoked. Reproduce the listed Approve flow on Android, then establish which edited transaction fields require validation and verify that the displayed warning matches the edited transaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.