Skip to content

Vulnerability: Denial-of-Service Vulnerability via Malformed “Unit Price” Input Leading to Application Crash #76

@aniket866

Description

@aniket866
  • Issue: The "Unit Price" input field is set to type="text". The component uses a useEffect that parses this input via parseUnits on every render.

  • Impact: If a user types any non-numeric character (e.g., "$10" or "10 USD") into the price field, ethers.parseUnits throws an error inside the useEffect, causing the entire React application to crash (White Screen of Death) immediately.

  • **Fix: Change the input type to number and implement a try/catch block or validation function before passing values to parseUnits.

  • Pinpoints a specific runtime crash vector caused by the interaction between loose HTML input types and strict blockchain library parsing within React's lifecycle.**

@kumawatkaran523 Please assign me this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions