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. Learn more

Threat Intelligence

EPSS
0.04% (12th 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 IDSNYK-GOLANG-GITHUBCOMGOHARBORHARBORSRCCOMMONUTILS-7243483
  • published11 Jun 2024
  • disclosed10 Jun 2024
  • creditTaisei Inoue

Introduced: 10 Jun 2024

CVE-2024-22261  (opens in a new tab)
CWE-566  (opens in a new tab)

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