DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.44k stars 530 forks source link

False positives due to erroneous comparison of component versions #3808

Open lukas-braune opened 1 month ago

lukas-braune commented 1 month ago

Current Behavior

DT attributes CVE-2022-48174 to the component pkg:apk/alpine/busybox@1.36.1-r18?arch=x86_64&distro=3.19.1 although the vulnerability has already been resolved in the earlier package version 1.36.1-r2:

image https://osv.dev/vulnerability/CVE-2022-48174

The root cause of this issue appears to be DT's sorting methodology. Instead of a numerical sort, the application is performing a lexical sort on version identifiers, mistakenly interpreting the version 1.36.1-r18 as an earlier, and thus vulnerable, release compared to 1.36.1-r2.

Steps to Reproduce

  1. Ensure that Google OSV advisory mirroring is enabled.
  2. Create a new project.
  3. In the newly created project, create a new component with the following purl: pkg:apk/alpine/busybox@1.36.1-r18?arch=x86_64&distro=3.19.1.
  4. Check whether CVE-2022-48174 has been attributed to the newly created component.

Expected Behavior

CVE-2022-48174 should not be attributed to the newly created component.

Dependency-Track Version

4.11.3

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

15.5

Browser

Microsoft Edge

Checklist

nscuro commented 1 month ago

Related: #2826