storage_path and filename go into the command unquoted; a space, ; or $(…) in either is interpreted by the node's root shell. #43 quoted the cloud-image download the same way; this path was left.
Expected
Both values go through shlex.quote (and filename is restricted to a safe basename, like _import_volume_name). Test-first: a filename with ;reboot; stays one argument when the command runs through a local sh.
Priority: P3 — root command injection on the hypervisor from values passed to create_vm_from_cloud_init.
## What happens
`_write_snippet` (`napalm_proxmox/vm_provision_mixin.py` ~281-292) writes the cloud-init snippet with a root shell command built by string formatting:
```python
f"mkdir -p {storage_path}/snippets && "
f"echo {encoded} | base64 -d > {storage_path}/snippets/{filename}",
```
`storage_path` and `filename` go into the command unquoted; a space, `;` or `$(…)` in either is interpreted by the node's root shell. #43 quoted the cloud-image download the same way; this path was left.
## Expected
Both values go through `shlex.quote` (and `filename` is restricted to a safe basename, like `_import_volume_name`). Test-first: a filename with `;reboot;` stays one argument when the command runs through a local `sh`.
Priority: P3 — root command injection on the hypervisor from values passed to `create_vm_from_cloud_init`.
Found during the bug sweep of 2026-11-02 (#43).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
_write_snippet(napalm_proxmox/vm_provision_mixin.py~281-292) writes the cloud-init snippet with a root shell command built by string formatting:storage_pathandfilenamego into the command unquoted; a space,;or$(…)in either is interpreted by the node's root shell. #43 quoted the cloud-image download the same way; this path was left.Expected
Both values go through
shlex.quote(andfilenameis restricted to a safe basename, like_import_volume_name). Test-first: a filename with;reboot;stays one argument when the command runs through a localsh.Priority: P3 — root command injection on the hypervisor from values passed to
create_vm_from_cloud_init.Found during the bug sweep of 2026-11-02 (#43).