Skip to content

Upgrade metro to v0.58.0 (fix inherited mem vulnerability) #922

@sethahrenbach

Description

@sethahrenbach

Current dependency path contains os-locale v2.1.0, which contains mem v1.1.0

Dependency path:
│ Path @react-native-community/cli > metro > yargs > os-locale > mem

Results in:

https://npmjs.com/advisories/1084

Overview

Versions of mem prior to 4.0.0 are vulnerable to Denial of Service (DoS). The package fails to remove old values from the cache even after a value passes its maxAge property. This may allow attackers to exhaust the system's memory if they are able to abuse the application logging.

Solution:

metro v0.58.0 upgrades yargs from ^9.0.0 to ^14.2.0:

Diff metro v0.57.0 | metro v0.58.0

yargs 14.2.0 removes os-locale from package.json:

Diff yargs v9.0.1 | yargs v14.2.0:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions