angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Security vulnerability with Elliptic dependency in angular/cli

Open codesandtags opened this issue 6 years ago • 3 comments

🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑

Security Issue with https://dev.snyk.io/test/npm/elliptic/6.5.2

🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑

Currently I'm using in many Front-End projects (~30) and now I've been reported with a security issue in the elliptic library. After review in details, it seems angular/cli is using the [email protected] version.

https://github.com/angular/angular-cli/search?q=elliptic&unscoped_q=elliptic

In order to solve this security issue I propose to upgrade elliptic to version 6.5.2 or higher, according to https://snyk.io/vuln/SNYK-JS-ELLIPTIC-511941 .

Here is a similar vulnerability reported and the proposal https://github.com/crypto-browserify/createECDH/issues/14

For more information related to the vulnerability:

  • https://nvd.nist.gov/vuln/detail/CVE-2020-13822
  • https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-13822

codesandtags avatar Jun 17 '20 14:06 codesandtags

Hi, @angular/cli doesn't directly depend on elliptic. It's a transitive dependency of node-libs-browser and create-ecdh which are both used by Webpack.

From what I am seeing both dependency ranges for elliptic are specified with a carat Ie: elliptic@^6.0.0, elliptic@^6.5.2.

So updating your lock file should be enough to fix the security error.

Please let me know if I missed something!

alan-agius4 avatar Jun 17 '20 17:06 alan-agius4

Thanks @alan-agius4 I decided to use a npm-force-resolution in order to avoid the report by blackduck, and update the transitive dependency. :)

https://www.npmjs.com/package/npm-force-resolutions?activeTab=readme

codesandtags avatar Jun 17 '20 20:06 codesandtags

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.