SQL Injection Affecting github.com/goharbor/harbor/src/common/utils package, versions <2.8.6 >=2.9.0 <2.9.4 >=2.10.0 <2.10.2


Severity

Recommended
0.0
low
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.04% (11th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMGOHARBORHARBORSRCCOMMONUTILS-7243483
  • published 11 Jun 2024
  • disclosed 10 Jun 2024
  • credit Taisei Inoue

How to fix?

Upgrade github.com/goharbor/harbor/src/common/utils to version 2.8.6, 2.9.4, 2.10.2 or higher.

Overview

Affected versions of this package are vulnerable to SQL Injection through the scan log API. An attacker can leak sensitive information by manipulating SQL queries.

Note: Because raw SQL executed in ormer.Raw(Sql).QueryRows() is PrepareStatement. In the driver of Postgres, one PrepareStatement must contain only ONE SQL command. The SQL should start with:

SELECT * FROM task WHERE extra_attrs::jsonb->'report_uuids' @>

References

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
2.7 low
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    High
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    None
  • Availability (A)
    None