A flaw was found in the Visual Studio Code Ansible Lightspeed extension's AnsiblePlaybookRunProvider. This command injection vulnerability allows an attacker to craft a malicious playbook filename containing special characters. When a victim runs the playbook, these characters are not properly sanitized, leading to the execution of arbitrary code with the privileges of the user running VS Code. This could result in a full system compromise, including the exfiltration of sensitive data, modification of project files, and permanent data loss.
To mitigate this issue, users of the Visual Studio Code Ansible Lightspeed extension should avoid running Ansible playbooks from untrusted sources or those with suspicious filenames. Always verify the origin and integrity of playbook files before execution to prevent command injection. This operational control limits exposure by preventing the processing of maliciously crafted filenames.