HighGHSA-cp96-jpmq-xrr2CVE-2023-26484

On a compromised node, the virt-handler service account can be used to modify all node specs

Published 16 Mar 2023 · Updated 8 Nov 2023

Is your project on an affected kubevirt.io/kubevirt?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<=0.59.0
Fixed in
No fix released

Details

Impact

If a malicious user has taken over a Kubernetes node where virt-handler (the KubeVirt node-daemon) is running, the virt-handler service account can be used to modify all node specs.

This can be misused to lure-in system-level-privileged components (which can for instance read all secrets on the cluster, or can exec into pods on other nodes). This way a compromised node can be used to elevate privileges beyond the node until potentially having full privileged access to the whole cluster.

The simplest way to exploit this, once a user could compromise a specific node, is to set with the virt-handler service account all other nodes to unschedulable and simply wait until system-critical components with high privileges appear on its node.

Since this requires a node to be compromised first, the severity of this finding is considered Medium.

Patches

Not yet available.

Workarounds

Gatekeeper users can add a webhook which will block the virt-handler service account to modify the spec of a node.

An example policy, preventing virt-handler from changing the node spec may look like this:

apiVersion: templates.gatekeeper.sh/v1
kind: ConstraintTemplate
metadata:
  name: virthandlerrestrictions
spec:
[...]
  targets:
    - libs:
        - |         
[...]          
          is_virt_handler(username) {
              username == "system:serviceaccount:kubevirt:virt-handler"
          }
          mutates_node_in_unintended_way {
            # TODO
            # only allow kubevirt.io/ prefixed metadata node changes
          }
      rego: |
[...]
        
        violation[{"msg": msg}] {
          is_virt_handler(username)
          mutates_node_in_unintended_way(input.review.object, input.review.oldObject)
          msg := sprintf("virt-handler tries to modify node <%v> in an unintended way.", [input.review.object.name])
        }

and applying this template to node modifications.

Credits

Special thanks to the discoverers of this issue:

Nanzi Yang (nzyang@stu.xidian.edu.cn) Xin Guo (guox@stu.xidian.edu.cn) Jietao Xiao (jietaoXiao@stu.xidian.edu.cn) Wenbo Shen (shenwenbo@zju.edu.cn) Jinku Li (jkli@xidian.edu.cn)

References

https://github.com/kubevirt/kubevirt/issues/9109

Is GHSA-cp96-jpmq-xrr2 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected kubevirt.io/kubevirt, and gives you the command that fixes it.

More advisories for kubevirt.io/kubevirt

  • LowCVE-2026-13322KubeVirt downward metrics virtio-serial server vulnerable to unbounded memory consumption in kubevirt.io/kubevirt · 5 Nov 2026
  • LowCVE-2026-13218KubeVirt virt-handler network cache symlink vulnerability allows arbitrary host file overwrite in kubevirt.io/kubevirt · 5 Nov 2026
  • LowCVE-2026-9804KubeVirt has a Link Following issue in kubevirt.io/kubevirt · 7 Jul 2026
  • LowCVE-2026-7374KubeVirt has a Link Following vulnerability in kubevirt.io/kubevirt · 7 Jul 2026
  • MediumCVE-2026-13318KubeVirt virt-api port-forward handler vulnerable to SSRF via guest-controlled VMI IP address · 26 Jun 2026
  • MediumCVE-2026-13218KubeVirt virt-handler network cache symlink vulnerability allows arbitrary host file overwrite · 26 Jun 2026
All 36 advisories for kubevirt.io/kubevirt

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.