Summary
UAC versions before 3.3.0 contain a command injection flaw in the user substitution logic of parse_artifact.sh. If an attacker can influence /etc/passwd entries, crafted usernames or home-directory paths may cause shell commands to execute on the analyst's host during artifact collection.
Affected context
The vulnerability occurs in UAC environments that use the affected parse_artifact.sh logic to process usernames and home directories from /etc/passwd. Risk is present when those values can contain shell metacharacters and are incorporated into command strings that are later evaluated by the shell.
Exploit preconditions
- Attack surface: UAC artifact collection scripts running on an analyst's host
- Required access: Ability to influence or provide an
/etc/passwdfile, or otherwise control relevant username or home-directory values - Trigger point: User substitution and subsequent command execution in
parse_artifact.sh - Why exploitation is possible: Input values are inserted into command strings without adequate escaping before execution through
eval
Why this happens
The underlying bug is the construction of shell commands from externally influenced account data followed by evaluation as shell code. Shell metacharacters, command substitutions, and separators within usernames or home-directory paths can therefore alter the intended command behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.
Potential impact
- An attacker may execute arbitrary commands on the analyst's host
- The local UAC execution context could be compromised
- Collected artifacts may be modified, disclosed, or deleted
- Additional local systems or credentials may be exposed
- Analysis workflows could be disrupted or used to distribute tampered results
General mitigation guidance
Mitigation generally focuses on avoiding shell evaluation of data-derived command strings and reducing trust in account metadata.
Common defensive patterns include:
- Replacing
eval-based execution with direct command invocation and explicit argument handling - Treating usernames and home-directory paths as untrusted input
- Applying strict validation and allowlisting for expected path and account formats
- Separating data from executable command logic
- Running collection tools with the minimum host privileges required
- Restricting access to source artifact files and using controlled analysis environments
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static analysis rules for
eval, shell command construction, and unquoted variable expansion - Code review checks for account, path, or environment data embedded in command strings
- Tests using metacharacters and other boundary characters in representative input fields
- Shell security policies that prohibit dynamic evaluation in collection scripts
- Runtime monitoring for unexpected child processes launched by artifact collection tools
Automated code review and shell-linting tools may help identify unsafe command construction patterns.

