Bug 2506209 (CVE-2026-16658) - CVE-2026-16658 community.proxmox: community.general: community.proxmox: proxmox_pct_remote shel injection via unquoted pct exec command allows
Summary: CVE-2026-16658 community.proxmox: community.general: community.proxmox: proxm...
Keywords:
Status: NEW
Alias: CVE-2026-16658
Deadline: 2026-08-22
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-07-22 19:39 UTC by OSIDB Bzimport
Modified: 2026-08-31 18:50 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-07-22 19:39:08 UTC
A flaw was found in the community.proxmox Ansible collection's
proxmox_pct_remote connection plugin (plugins/connection/
proxmox_pct_remote.py). The _build_pct_command() method constructs
the pct exec command by joining command arguments with spaces:
  cmd = ["/usr/sbin/pct", "exec", str(vmid), "--", cmd]
  return " ".join(cmd)
This string is passed to Paramiko's chan.exec_command(), which
executes it through the Proxmox host's shell. Shell metacharacters
in the Ansible task's command (>, <, |, ;, &&, $()) are interpreted
by the host shell as root instead of being passed to pct exec for
execution inside the target LXC container. For example, a task
"echo test > /tmp/file" results in the redirect creating the file
on the host rather than inside the container. The reporter
discovered this in production when an ansible.builtin.raw task
writing /etc/resolv.conf silently overwrote the Proxmox host's
resolver. The plugin's put_file and fetch_file methods correctly
use self._shell.quote() to wrap inner commands — the fix is to
apply the same pattern to the exec path. A deprecated copy of
this plugin also exists in community.general since version 10.3.0.
shlex is never imported in the plugin.

    Upstream: https://github.com/ansible-collections/community.proxmox
    Affected code: plugins/connection/proxmox_pct_remote.py
    Affected version: all versions containing proxmox_pct_remote
    Also in: community.general >= 10.3.0 (deprecated copy)
    Fixed version: (pending — reporter provides 1-line fix)
    Reporter: Jake Badoino (jake.badoino)


Note You need to log in before you can comment on or make changes to this bug.