Arbitrary File Read Affecting github.com/kubevirt/kubevirt/pkg/container-disk package, versions <0.57.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.04% (13th 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 Learn

Learn about Arbitrary File Read vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMKUBEVIRTKUBEVIRTPKGCONTAINERDISK-2986806
  • published18 Aug 2022
  • disclosed8 Aug 2022
  • creditNCC Group

Introduced: 8 Aug 2022

CVE-2022-1798  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade github.com/kubevirt/kubevirt/pkg/container-disk to version 0.57.0 or higher.

Overview

Affected versions of this package are vulnerable to Arbitrary File Read due to missing sanitization of imagePath. Exploiting this vulnerability is possible by providing access to host files in a KubeVirt VM.

Mitigation

Affected users should sanitize imagePath in pkg/container-disk/container-disk.go following ISE best practices and add checks in pkg/virt-api/webhooks/validating-webhook/admitters/vmi-create-admitter.go

CVSS Scores

version 3.1