CVE-2022-24877CWE-22CWE-36

Improper path handling in kustomization files allows path traversal

Critical · published May 6, 2022

CVSS v3.1
9.9
EPSS
1%
Percentile
67.6
In the wild
Unconfirmed
What it is

🚨 A crafty path traversal flaw in Flux’s kustomize-controller could let an attacker rummage through sensitive files like a thief searching through someone’s personal drawers! 🔥 Think of the kustomization.yaml file as a delivery order that contains all the instructions and permissions for the kitchen. If a rogue chef can sneak a peek at the order, they might whip up something dangerous instead of a delicious dish! This vulnerability could allow an attacker to expose sensitive data from the controller’s pod filesystem, potentially leading to privilege escalation in multi-tenancy environments. Essentially, it's like giving an unauthorized person access to your entire recipe book, which could lead to a disaster in a shared kitchen!

Put simply

Think of the kustomization.yaml file as a delivery order that contains all the instructions and permissions for the kitchen. If a rogue chef can sneak a peek at the order, they might whip up something dangerous instead of a delicious dish! The path traversal vulnerability exists because the kustomize-controller does not properly validate input in the kustomization.yaml file, allowing attackers to access files outside the intended directory structure.

What to do

This vulnerability could allow an attacker to expose sensitive data from the controller’s pod filesystem, potentially leading to privilege escalation in multi-tenancy environments. Essentially, it's like giving an unauthorized person access to your entire recipe book, which could lead to a disaster in a shared kitchen! Upgrade to kustomize-controller version 0.24.0 or later, and ensure Flux version 0.29.0 is installed. Implement automated tooling in your CI/CD pipeline to validate kustomization.yaml files against specific policies to prevent this from happening in the future. This is fixable! Follow these steps and you'll have your security reinforced in no time. 🛡️

The record
Technical detail
CVSS v3.1
9.9 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01187 · 67.6th percentile
Weaknesses
CWE-22 · Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'); CWE-36 · Absolute Path Traversal
Published
2022-05-06T01:10Z
EPSS history
Timeline
  • 06 MAY 01:10Z
    Improper path handling in kustomization files allows path traversal
    cvelistv5