2026-02-25 10:49CVE-2025-62878suse
PUBLISHED5.2CWE-23

Local Path Provisioner vulnerable to Path Traversal via parameters.pathPattern

A malicious user can manipulate the parameters.pathPattern to create PersistentVolumes in arbitrary locations on the host node, potentially overwriting sensitive files or gaining access to unintended directories.

Problem type

Affected products

SUSE

Rancher

< 0.0.34 - AFFECTED

References

GitHub Security Advisories

GHSA-jr3w-9vfr-c746

Local Path Provisioner vulnerable to Path Traversal via parameters.pathPattern

https://github.com/advisories/GHSA-jr3w-9vfr-c746

Impact

A malicious user can manipulate the parameters.pathPattern to create PersistentVolumes in arbitrary locations on the host node, potentially overwriting sensitive files or gaining access to unintended directories.

Example:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"storage.k8s.io/v1","kind":"StorageClass","metadata":{"annotations":{},"name":"local-path"},"provisioner":"rancher.io/local-path","reclaimPolicy":"Delete","volumeBindingMode":"WaitForFirstConsumer"}
    storageclass.kubernetes.io/is-default-class: 'true'
  name: local-path
provisioner: rancher.io/local-path
reclaimPolicy: Delete
parameters:
  pathPattern: "{{ .PVC.Namespace }}/{{ .PVC.Name }}/../../../../../etc/new-dir"
volumeBindingMode: WaitForFirstConsumer
Results in the PersistentVolume to target /etc/new-dir:

This produces a PersistentVolume that points to /etc/new-dir, instead of a path under the configured base directory.

Expected Behavior:

  • Paths generated from pathPattern should always resolve under the configured base path.
  • Relative path elements (e.g., ..) should be normalized or rejected.

Patches

This vulnerability is addressed by validating and normalizing the parameters.pathPattern to ensure that generated PersistentVolume paths always resolve under the configured base directory. Any path traversal attempts using relative path elements are rejected, preventing PersistentVolumes from being created in arbitrary locations on the host node.

Previously, a malicious user could manipulate pathPattern to escape the base path and create volumes pointing to sensitive or unintended directories (for example, /etc), potentially overwriting host files or gaining unauthorized access.

With this fix, path patterns that resolve outside of the base directory are denied, and only safe, normalized paths under the configured base path are allowed.

Patched versions of local-path-provisioner include releases v0.0.34 (and later).

No patches are provided for earlier releases, as they do not include the necessary path validation and normalization logic.

Workarounds

There are no workarounds for this issue. Users must upgrade to a patched version of local-path-provisioner to fully mitigate the vulnerability.

References

There are any questions or comments about this advisory:

JSON source

https://cveawg.mitre.org/api/cve/CVE-2025-62878
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-62878",
    "assignerOrgId": "404e59f5-483d-4b8a-8e7a-e67604dd8afb",
    "assignerShortName": "suse",
    "dateUpdated": "2026-02-25T10:50:22.691Z",
    "dateReserved": "2025-10-24T10:34:22.765Z",
    "datePublished": "2026-02-25T10:49:29.596Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "404e59f5-483d-4b8a-8e7a-e67604dd8afb",
        "shortName": "suse",
        "dateUpdated": "2026-02-25T10:50:22.691Z"
      },
      "datePublic": "2026-02-04T19:17:00.000Z",
      "title": "Local Path Provisioner vulnerable to Path Traversal via parameters.pathPattern",
      "descriptions": [
        {
          "lang": "en",
          "value": "A malicious user can manipulate the parameters.pathPattern to create PersistentVolumes in arbitrary locations on the host node, potentially overwriting sensitive files or gaining access to unintended directories.",
          "supportingMedia": [
            {
              "type": "text/html",
              "base64": false,
              "value": "A malicious user can manipulate the parameters.pathPattern&nbsp;to create PersistentVolumes in arbitrary locations on the host node, potentially overwriting sensitive files or gaining access to unintended directories."
            }
          ]
        }
      ],
      "affected": [
        {
          "vendor": "SUSE",
          "product": "Rancher",
          "packageName": "github.com/rancher/local-path-provisioner",
          "defaultStatus": "unaffected",
          "versions": [
            {
              "version": "0",
              "status": "affected",
              "versionType": "semver",
              "lessThan": "0.0.34"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-23: Relative Path Traversal",
              "cweId": "CWE-23",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://bugzilla.suse.com/show_bug.cgi?id=CVE-2025-62878"
        },
        {
          "url": "https://github.com/advisories/GHSA-jr3w-9vfr-c746"
        }
      ],
      "metrics": [
        {
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ],
          "cvssV3_1": {
            "version": "3.1",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
            "attackVector": "NETWORK",
            "attackComplexity": "LOW",
            "privilegesRequired": "LOW",
            "userInteraction": "NONE",
            "scope": "CHANGED",
            "confidentialityImpact": "HIGH",
            "integrityImpact": "HIGH",
            "availabilityImpact": "HIGH",
            "baseScore": 9.9,
            "baseSeverity": "CRITICAL"
          }
        }
      ]
    }
  }
}