Skip to content

OSV mirroring only parses affected.versions when affected.ranges is not available, leading to over-reporting #5776

Closed

Description

@nscuro

Current Behavior

The OSV mirroring logic currently only parses affected.versions when no affected.ranges property is defined for an advisory:

// if ranges are not available or only commit hash range is available, look for versions
if (osvAffectedPackageList.size() == 0 && versions != null && versions.length() > 0) {
for (int j=0; j<versions.length(); j++) {
OsvAffectedPackage vuln = createAffectedPackage(affected);
if (vuln == null) {
continue;
}
vuln.setVersion(versions.getString(j));
osvAffectedPackageList.add(vuln);
}
}

This leads to over-reporting for advisories such as https://test.osv.dev/vulnerability/DEBIAN-CVE-2005-1119, which uses both a range, and individual versions:

Image Image

Steps to Reproduce

  1. Enable OSV mirroring for the Debian ecosystem
  2. Upload a BOM with vulnerable Debian components

Expected Behavior

OSV mirroring should recognize this pattern (range >= 0 + individual versions), and only persist the individual versions.

This must be fixed before v4.14.0 is released.

Dependency-Track Version

4.14.0-SNAPSHOT

Dependency-Track Distribution

Container Image

Database Server

N/A

Database Server Version

No response

Browser

N/A

Checklist

Activity

  1. added this to the 4.14.0 milestone on Feb 3, 2026
  2. added
    defect
    p1
    size/M
    integration/osv
    on Feb 3, 2026
  3. nscuro commented on Feb 3, 2026

    @nscuro
    MemberAuthor

    Curiously, the OSV spec says:

    A version is considered affected if it lies within any one of the ranges or is listed in the versions list.

    So it seems the Debian data is simply reported in a wrong way?

  4. nscuro commented on Feb 3, 2026

    @nscuro
    MemberAuthor

    Asked a question here: google/osv.dev#4746

  5. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked as resolved and limited conversation to collaborators on Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectintegration/osvp1size/M

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions