Summary
A critical OS command injection vulnerability in the MOOS-IvP iSay message handler allows shell metacharacters in published SAY_MOOS messages to be interpreted as commands. An attacker who can publish messages may execute arbitrary commands with the privileges of the iSay process.
Affected context
The vulnerability occurs in MOOS-IvP iSay deployments that process SAY_MOOS messages through the affected variable handler and pass message content to a shell command without adequate separation between data and executable arguments. Risk depends on whether an attacker can publish messages to the relevant MOOS communication channel and on the operating-system privileges granted to the iSay process.
Exploit preconditions
- Attack surface: The MOOS messaging interface handling SAY_MOOS values
- Required access: Ability to publish or inject messages accepted by the iSay process
- Trigger point: Processing of a SAY_MOOS message by the vulnerable handler
- Why exploitation is possible: Unsanitized message content is incorporated into a shell command, allowing shell syntax to alter command execution
Why this happens
The underlying bug is improper neutralization of special elements used in an operating-system command. The handler treats externally influenced message text as part of a shell command rather than as data passed through a safe argument interface. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.
Potential impact
- Arbitrary commands may execute as the iSay process user
- The host or vehicle-control environment could be compromised
- Sensitive files or operational data may be accessed or modified
- Attackers could disrupt services or alter mission-related behavior
- Compromise could enable lateral movement where additional privileges or network access are available
General mitigation guidance
Mitigation generally focuses on eliminating shell interpretation for message-derived data and reducing the trust placed in messaging inputs.
Common defensive patterns include:
- Invoking programs directly with structured argument arrays instead of shell command strings
- Applying strict allowlists for supported speech or action values
- Separating message parsing, validation, and command execution
- Rejecting unexpected control characters and shell metacharacters where appropriate
- Running the iSay process with the minimum required operating-system privileges
- Restricting which components and network identities can publish relevant MOOS messages
- Applying filesystem, process, and network containment appropriate to the deployment
How teams detect issues like this
Organizations can look for command-injection risks through:
- Static analysis rules identifying shell execution APIs that receive message, network, or configuration data
- Code review checks for string concatenation or interpolation used to construct commands
- Tests that verify message values are passed as literal arguments rather than interpreted shell syntax
- Runtime monitoring for unexpected child processes spawned by the iSay service
- Message-bus authorization and policy enforcement that limits publishers of SAY_MOOS data
- Automated security review tools that flag unsanitized data flows into process-launching functions

