Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nsprc file to npm-audit with expiration for ip vulnerability #1056

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

dlpzx
Copy link
Contributor

@dlpzx dlpzx commented Feb 12, 2024

Feature or Bugfix

  • Bugfix

Detail

The vulnerability found in ip affects us because we use the react-native-community/cli package. In this package repository an issue reporting the vulnerabilty was already raised.

Update: ip team is working on a fix: indutny/node-ip#138

Relates

Security

Please answer the questions below briefly where applicable, or write N/A. Based on
OWASP 10.

  • Does this PR introduce or modify any input fields or queries - this includes
    fetching data from storage outside the application (e.g. a database, an S3 bucket)?
    • Is the input sanitized?
    • What precautions are you taking before deserializing the data you consume?
    • Is injection prevented by parametrizing queries?
    • Have you ensured no eval or similar functions are used?
  • Does this PR introduce any functionality or component that requires authorization?
    • How have you ensured it respects the existing AuthN/AuthZ mechanisms?
    • Are you logging failed auth attempts?
  • Are you using or adding any cryptographic features?
    • Do you use a standard proven implementations?
    • Are the used keys controlled by the customer? Where are they stored?
  • Are you introducing any new policies/roles/users?
    • Have you used the least-privilege principle? How?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@noah-paige noah-paige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good - hope there is a patch for this soon! Approving this PR since we are not affected by this vulnerability

@dlpzx dlpzx merged commit f13ba5f into main Feb 13, 2024
8 checks passed
@dlpzx dlpzx deleted the fix/dependabot-npm-audit-add-ignore-file branch February 13, 2024 09:42
@levpachmanov
Copy link

Hi @dlpzx ,

The node-ip library seems to be unmaintained - the last commit is from 2 years ago and vulnerability was published after the maintainer haven't responded within 90 days

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 ip 1.1.8-sp and 2.0.0-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 [email protected] if you have any requests/questions.

@dlpzx
Copy link
Contributor Author

dlpzx commented Feb 14, 2024

Hi @levpachmanov, thank you for reaching out :)

We are keeping an eye on node-ip and on this PR, where I see you also commented. We will assess your solution as well. One question, in our case we do not use ip directly, it is a dependency of a dependency. Do you have any recommendations/drawbacks for such cases?

dlpzx added a commit that referenced this pull request Jun 3, 2024
### Feature or Bugfix
- Bugfix

### Detail
There is a new vulnerability found in the package `ip`. Similar to the
one that we faced a couple of months ago (check this
[PR](#1056)). In fact the
CVE opened now is the result of the old vulnerability being only
partially fixed.

There is not a fixed version and there are no PRs open in the original
repo. There is not much activity happening in this repository, so a fix
might take some time. At the same time, we do not use this package
directly, it is a sub-dependency from react-native packages. Since
`node_modules/@react-native-community/cli` version: 13.6.6, does not use
`ip`, the easiest way for us to avoid this issue is to upgrade
react-native packages.

In addition, this PR removes an expired ignore for npm-audit.

### Relates
- #1056 

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- Does this PR introduce or modify any input fields or queries - this
includes
fetching data from storage outside the application (e.g. a database, an
S3 bucket)?
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization?
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features?
  - Do you use a standard proven implementations?
  - Are the used keys controlled by the customer? Where are they stored?
- Are you introducing any new policies/roles/users?
  - Have you used the least-privilege principle? How?


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants