Emissary has a Path Traversal via Blacklist Bypass in Configuration API
Summary
The configuration API endpoint (/api/configuration/{name}) validated
configuration names using a blacklist approach that checked for \, /, ..,
and trailing .. This could potentially be bypassed using URL-encoded variants,
double-encoding, or Unicode normalization to achieve path traversal and read
configuration files outside the intended directory.
Details
Vulnerable code — Configs.java (line 126)
protected static String validate(String config) {
if (StringUtils.isBlank(config) || config.contains("\\") || config.contains("/")
|| config.contains("..") || config.endsWith(".")) {
throw new IllegalArgumentException("Invalid config name: " + config);
}
return Strings.CS.appendIfMissing(config.trim(), CONFIG_FILE_ENDING);
}
Weakness
The blacklist blocked literal \, /, .., and trailing . but could
potentially miss:
- URL-encoded variants (
%2e%2e%2f) if decoded after validation - Double-encoded sequences (
%252e%252e%252f) - Unicode normalization bypasses
- The approach relies on string matching rather than canonical path resolution
Impact
- Potential read access to configuration files outside the intended config directory
- Information disclosure of sensitive configuration values
Remediation
Fixed in PR #1292, merged into release 8.39.0.
The blacklist was replaced with an allowlist regex that only permits characters
matching ^[a-zA-Z0-9._-]+$:
protected static final Pattern VALID_CONFIG_NAME = Pattern.compile("^[a-zA-Z0-9._-]+$");
protected static String validate(String config) {
if (!VALID_CONFIG_NAME.matcher(config).matches() || config.contains("..") || config.endsWith(".")) {
throw new IllegalArgumentException("Invalid config name: " + config);
}
return Strings.CS.appendIfMissing(config.trim(), CONFIG_FILE_ENDING);
}
This ensures that any character outside the allowed set — including encoded slashes, percent signs, and Unicode sequences — is rejected before the config name reaches the filesystem.
Tests were added to verify that URL-encoded (%2e%2e%2f), double-encoded
(%252e%252e%252f), and Unicode (U+002F) traversal attempts are blocked.
Workarounds
If upgrading is not immediately possible, deploy a reverse proxy or WAF rule
that rejects requests to /api/configuration/ containing encoded path traversal
sequences.
References
- PR #1292 — validate config name with an allowlist
- Original report: GHSA-wjqm-p579-x3ww
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| Java / Kotlin (Maven) | gov.nsa.emissary:emissary | < 8.39.0 | 8.39.0 |
Verweise
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N- Schwäche (CWE)
CWE-22- Plattform
- Java / Kotlin (Maven)
- Paket
gov.nsa.emissary:emissary- Veröffentlicht
- 08.04.2026
- Aktualisiert
- 11.10.2026 12:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-hxf2-gm22-7vcm - CC BY 4.0
Schwachstellenhistorie: gov.nsa.emissary:emissary
Alle veröffentlichten Schwachstellen dieses Pakets (Java / Kotlin (Maven)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
- Einträge insgesamt
- 6
- Erste → letzte
- 03.2025 04.2026
- Ohne Fix
- 0
- In Angriffen ausgenutzt
- 0
Verteilung nach Schweregrad
- Kritisch 1
- Hoch 3
- Mittel 2
Veröffentlichungen pro Jahr
- 2025: 1
- 2026: 5
-
Emissary has a Path Traversal via Blacklist Bypass in Configuration API dieser Eintrag
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.