yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.43k stars 2.72k forks source link

yarn audit does not throw warnings for known vulnerabilities in package.json #7579

Open lzzluca opened 5 years ago

lzzluca commented 5 years ago

Bug report for Yarn audit version 1.17.3

How to replicate it

dompurify@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-0.9.0.tgz#470f9dd95657a644a84be1ed950677946259d055" integrity sha1-Rw+d2VZXpkSoS+HtlQZ3lGJZ0FU=


- run `yarn audit`; the output from `yarn audit` does say for me:
>0 vulnerabilities found - Packages audited: 1

can't figure out why there are 0 vulnerabilities reported: the dependency _dompurify_ is vulnerable at versions minor than `2.0.3`, as from [CVE here](https://nvd.nist.gov/vuln/detail/CVE-2019-16728). Was able to replicate the exploit, following steps [as described here](https://research.securitum.com/dompurify-bypass-using-mxss/).

Other tools, `Snyk` in this case, warned for the vulnerability.

There is anything that I am missing, about why `yarn audit` is not warning for the vulnerability above?

Thank you.
lzzluca commented 5 years ago

Experiencing the same with the dependency react-pdf@^3.0.5, installed version is 3.0.6.

Snyk warns about this vulnerability, yarn auditdoes not.