CyberRota Analysis
AI-GeneratedThe vulnerability arises from the improper handling of command-line arguments in the RunAdHocCommand.build_args() function, which appends a limit as a bare positional argument instead of as a properly formatted option. This flaw could lead to unintended command-line behavior if a limit starts with a dash, potentially allowing for the execution of unintended ansible CLI options. Organizations using affected versions of ansible-core should prioritize this issue to prevent future escalation of the vulnerability as defaults change.
Original NVD Description
RunAdHocCommand.build_args() appends limit as bare positional (args.append(limit)) instead of using args.extend(['-l', limit]) like RunJob. A limit beginning with - is parsed as an ansible CLI option. Currently limited to short-circuit flags (--version, --help) since injected element displaces required pattern positional. Would escalate if ansible-core ever defaults pattern.