In a Yarn classic (v1) project, a dependency declared through an npm alias, for example "util-lib": "npm:lodash@4.17.20", is looked up under the wrong package name. Yarn 1.22 writes the lockfile key util-lib@npm:lodash@4.17.20 and installs lodash@4.17.20, but the Yarn classic parser takes everything before the last @ as the name, so the scan queries OSV for util-lib@npm:lodash, finds nothing, and reports "No known vulnerabilities found".
The scan exits 0 even under --fail-on high, so a CI gate relying on the scanner passes over a known vulnerable package. The same lodash@4.17.20 declared directly reports 4 CVEs, including CVE-2021-23337, and exits 1.
Confirmed on v1.41.0 and on main at 77bde74.
Treat @npm: as the alias marker in the Yarn classic parser and the Yarn lock graph, keep the install name, and resolve the registry package (scoped targets and the no-range form included). After the fix the same project reports the 4 CVEs, suggests yarn add util-lib@npm:lodash@4.18.1, and exits 1.
Reported by @alex-powell.
소스: NVD
무료 취약점 평가
9개 보안 영역에서 클라우드 보안 관행을 평가하여 위험 수준을 벤치마킹하고 방어의 허점을 파악하세요.
맞춤형 데모를 받아보세요
"내가 본 최고의 사용자 경험은 클라우드 워크로드에 대한 완전한 가시성을 제공합니다."
"Wiz는 클라우드 환경에서 무슨 일이 일어나고 있는지 볼 수 있는 단일 창을 제공합니다."
"우리는 Wiz가 무언가를 중요한 것으로 식별하면 실제로 중요하다는 것을 알고 있습니다."