CVE-2026-35582 Overview
CVE-2026-35582 is a critical OS command injection vulnerability in Emissary, a P2P-based data-driven workflow engine developed by the National Security Agency (NSA). The vulnerability exists in the Executrix.getCommand() method, which fails to properly sanitize user-controlled file path inputs before passing them to a shell command. In versions 8.42.0 and below, the IN_FILE_ENDING and OUT_FILE_ENDING configuration keys are interpolated directly into /bin/sh -c shell command strings without escaping or input validation, allowing attackers to inject arbitrary shell metacharacters that execute OS commands within the JVM process's security context.
Critical Impact
An attacker with place configuration authorship privileges can achieve arbitrary OS command execution in the JVM process security context without requiring API or network access, potentially leading to full system compromise.
Affected Products
- Emissary versions 8.42.0 and below
Discovery Timeline
- April 18, 2026 - CVE-2026-35582 published to NVD
- April 20, 2026 - Last updated in NVD database
Technical Details for CVE-2026-35582
Vulnerability Analysis
This command injection vulnerability (CWE-78) represents a framework-level security defect with significant impact potential. The Executrix.getCommand() method constructs shell command strings by interpolating temporary file paths that include the IN_FILE_ENDING and OUT_FILE_ENDING configuration values. While the framework implements an allowlist-based sanitization for placeName before embedding it in the shell string, no equivalent protection is applied to file ending values.
The local attack vector requires low privileges (place configuration authorship) and no user interaction. Due to the scope change capability, successful exploitation can impact resources beyond the vulnerable component, enabling high-severity impacts to confidentiality, integrity, and availability. This is particularly dangerous because the framework provides neither built-in escaping mechanisms nor documented preconditions warning against metacharacters in file ending inputs, leaving downstream implementors with no safe mitigation path.
Root Cause
The root cause of CVE-2026-35582 is the direct interpolation of unsanitized configuration values into shell command strings. The IN_FILE_ENDING and OUT_FILE_ENDING configuration keys flow directly from .cfg files into the command construction logic without any input validation or shell metacharacter escaping. This inconsistency—where placeName receives allowlist sanitization but file ending values do not—indicates an incomplete security implementation in the command construction process.
Attack Vector
An attacker with the ability to write or modify a .cfg configuration file can inject shell metacharacters into the IN_FILE_ENDING or OUT_FILE_ENDING configuration values. When Executrix.getCommand() processes these values, the malicious metacharacters are passed directly to /bin/sh -c, resulting in arbitrary command execution. The attack requires local access and configuration authorship privileges but does not require API access, network access, or user interaction to exploit.
The vulnerability mechanism involves shell metacharacter injection through configuration file values. When the Emissary framework processes a configuration file containing malicious file ending values such as shell command substitution sequences, these are passed unsanitized to the shell interpreter. For detailed technical information, see the GitHub Security Advisory.
Detection Methods for CVE-2026-35582
Indicators of Compromise
- Unexpected shell processes spawned as children of Emissary JVM processes
- Configuration files (.cfg) containing shell metacharacters such as backticks, semicolons, or command substitution patterns in IN_FILE_ENDING or OUT_FILE_ENDING values
- Abnormal system calls or process execution patterns originating from the Emissary application context
- Unauthorized modifications to Emissary place configuration files
Detection Strategies
- Monitor for suspicious process trees where the Emissary JVM spawns unexpected child processes or shell commands
- Implement file integrity monitoring on Emissary configuration directories to detect unauthorized .cfg file modifications
- Audit configuration file contents for shell metacharacters in IN_FILE_ENDING and OUT_FILE_ENDING values
- Deploy runtime application self-protection (RASP) to detect command injection attempts
Monitoring Recommendations
- Enable comprehensive logging of Emissary framework operations and shell command executions
- Implement behavioral analysis to identify anomalous process execution patterns from JVM processes
- Configure security monitoring to alert on configuration file changes in Emissary deployment directories
- Use SentinelOne Singularity platform for real-time detection of command injection exploitation attempts and post-exploitation activities
How to Mitigate CVE-2026-35582
Immediate Actions Required
- Upgrade Emissary to version 8.43.0 or later immediately
- Audit all existing .cfg configuration files for suspicious or unexpected values in IN_FILE_ENDING and OUT_FILE_ENDING fields
- Restrict write access to configuration files to trusted administrators only
- Implement file integrity monitoring on configuration directories
Patch Information
The vulnerability has been fixed in Emissary version 8.43.0. The fix is available in commit 1faf33f2494c0128f250d7d2e8f2da99bbd32ae8. Organizations should upgrade to version 8.43.0 or later as soon as possible. For additional details, consult the GitHub Security Advisory.
Workarounds
- Restrict configuration file authorship to highly trusted personnel only, as this is a framework-level defect with no safe mitigation available to downstream implementors
- Implement strict access controls on all Emissary configuration directories and files
- Deploy application-level sandboxing to limit the impact of potential command execution
- Consider disabling affected functionality until the patch can be applied if the risk is unacceptable
# Restrict access to Emissary configuration files
chmod 600 /path/to/emissary/config/*.cfg
chown root:root /path/to/emissary/config/*.cfg
# Implement file integrity monitoring (example with AIDE)
echo "/path/to/emissary/config CONTENT_EX" >> /etc/aide/aide.conf
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


