ethers@5.4.2 vulnerabilities

A complete and compact Ethereum library, for dapps, wallets and any other tools.

Direct Vulnerabilities

Known vulnerabilities in the ethers package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • H
Regular Expression Denial of Service (ReDoS)

ethers is an A complete Ethereum wallet implementation and utilities in JavaScript (and TypeScript).

Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the parseFixed function.

PoC

import { parseFixed } from '@ethersproject/bignumber'

console.log(parseFixed('0.' + '0'.repeat(8e6) + '1')) // hangs

How to fix Regular Expression Denial of Service (ReDoS)?

Upgrade ethers to version 5.4.7 or higher.

>=5.2.0 <5.4.7