Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`signTypedData` input validation

Open
#209 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start at the signTypedData entry point and trace how integer, byte, and address inputs are encoded. Use the listed negative, out-of-bounds, and oversized-address examples to define rejection behavior; done means invalid inputs are rejected and valid encodings remain standard and portable. Add focused tests for each validation case.

Written by the indexing model from the issue text.

Description

enhancement

We don't have much in the way of input validation for signTypedData. This is dangerous because invalid inputs can result in non-standard encodings.

Some examples of this are:

  • Negative uint values are currently encoded as positive values. The negative is ignored.
  • Some out-of-bounds integer values and byte values are possible to encode right now.
  • We don't validate address input, so the address field can be used to store values far larger than an address.

We should strictly validate input, so that users don't accidentally become reliant upon non-standard and non-portable encodings.

Dominant language
TypeScript
Stars
584
Forks
230
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from MetaMask/eth-sig-util

All issues in MetaMask/eth-sig-util

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.