Skip to content

Snyk Vulnerabilities on react-scripts@5.0.1 #13062

Open

Description

@velsonjr

When our application was run through Snyk recently, We found couple of vulnerabilities. The details are as follows

Regular Expression Denial of Service (ReDoS) (High Severity)
Package Manager: npm
Vulnerable module: nth-check
Paths : react-scripts@5.0.1 › @svgr/webpack@5.5.0 › @svgr/plugin-svgo@5.5.0 › svgo@1.3.2 › css-select@2.1.0
› nth-check@1.0.2

MPL-2.0 license ( Medium Severity)
Package Manager: npm
Module: axe-core
Paths : react-scripts@5.0.1 › eslint-config-react-app@7.0.1 › eslint-plugin-jsx-a11y@6.5.1 › axe-core@4.4.1

Denial of Service (DoS) ( Medium Severity)
Package Manager: npm
Vulnerable module: nwsapi
Paths: react-scripts@5.0.1 › jest@27.5.1 › @jest/core@27.5.1 › jest-config@27.5.1 › jest-environment-jsdom@27.5.1 ›
jsdom@16.7.0 › nwsapi@2.2.0

We are already running latest version of react-scripts. Any remediations possible?

Activity

  1. michaelssavage commented on Mar 16, 2023

    @michaelssavage

    Would adding the following to your package.json work?

    "overrides": {
        "nth-check": "2.1.1"
      }
    
  2. getsalty commented on Mar 17, 2023

    @getsalty

    Edit: the article Dan Abramov (dev) wrote about the vulnerabilities (TLDR: they don't think its an issue and won't fix it) https://overreacted.io/npm-audit-broken-by-design/

    This has been discussed many, many times. The CRA devs don't care about vulnerabilities and won't do anything to fix it. If you care, stop using CRA. CRA is officially no longer a recommended project for creating React apps. Use something else.

    If you want a close to 1-to-1 experience to CRA, then use Vite. This command can get you started:
    npm create vite@latest my_project -- --template react-ts

    If you want to go down the framework route, then use a suggestion from React's official docs: https://react.dev/learn/start-a-new-react-project

  3. giwiro commented on Apr 14, 2023

    @giwiro

    Would adding the following to your package.json work?

    "overrides": {
        "nth-check": "2.1.1"
      }
    

    It did the trick for me. Thanks.

  4. burakd81 commented on May 31, 2023

    @burakd81

    Would adding the following to your package.json work?

    "overrides": {
        "nth-check": "2.1.1"
      }
    

    It did the trick for me. Thanks.

    tenks its working <3

  5. arifsoer commented on Jun 5, 2023

    @arifsoer

    "overrides": {
    "nth-check": "2.1.1"
    }

    this one doesn't work for me..
    anyone has other suggestion?

  6. Gaurav-Sodhani commented on Jun 13, 2023

    @Gaurav-Sodhani

    "overrides": {
    "nth-check": "2.1.1"
    }

    this one doesn't work for me.. anyone has other suggestion?

    Make sure you run 'npm audit fix' in your terminal after adding this to package.json
    Hope it works!

  7. CoderAWei commented on Jun 28, 2023

    @CoderAWei

    Have you ever meet this question?
    Affected versions of this package are vulnerable to Sandbox Bypass when ImportParserPlugin.js mishandles magic comments to allow cross-realm object access. An attacker who controls a property of an untrusted object can access the real global object.

  8. AlonNavon commented on Aug 1, 2023

    @AlonNavon

    Hey @velsonjr @michaelssavage @arifsoer,

    We're part of a startup called Seal Security that mitigates software vulnerabilities in older open source versions by backporting/creating standalone security patches - enabling more straightforward remediation in cases like this. We created an nth-check 1.02-sp1 that's vulnerability-free. As with all of our patches, it's open-source and available for free.

    If relevant, check out our GitHub repo if you wish to learn more, or start using our app.

    Please feel free to reach us at info@seal.security if you have any requests/questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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