Lookup for vulnerabilities affecting packages.

Vulnerability_idVCID-41ah-1nyc-aych
Summary
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)

```java
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](https://github.com/NationalSecurityAgency/emissary/pull/1292),
merged into release 8.39.0.

The blacklist was replaced with an allowlist regex that only permits characters
matching `^[a-zA-Z0-9._-]+$`:

```java
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](https://github.com/NationalSecurityAgency/emissary/pull/1292)
- Original report: GHSA-wjqm-p579-x3ww
Aliases
0
alias CVE-2026-35583
1
alias GHSA-hxf2-gm22-7vcm
Fixed_packages
0
url pkg:maven/gov.nsa.emissary/emissary@8.39.0
purl pkg:maven/gov.nsa.emissary/emissary@8.39.0
is_vulnerable false
affected_by_vulnerabilities
resource_url http://public2.vulnerablecode.io/packages/pkg:maven/gov.nsa.emissary/emissary@8.39.0
Affected_packages
References
0
reference_url https://api.first.org/data/v1/epss?cve=CVE-2026-35583
reference_id
reference_type
scores
0
value 0.00038
scoring_system epss
scoring_elements 0.11499
published_at 2026-04-08T12:55:00Z
1
value 0.00038
scoring_system epss
scoring_elements 0.11534
published_at 2026-04-12T12:55:00Z
2
value 0.00038
scoring_system epss
scoring_elements 0.11568
published_at 2026-04-11T12:55:00Z
3
value 0.00038
scoring_system epss
scoring_elements 0.11558
published_at 2026-04-09T12:55:00Z
4
value 0.0005
scoring_system epss
scoring_elements 0.15526
published_at 2026-04-13T12:55:00Z
5
value 0.0005
scoring_system epss
scoring_elements 0.15473
published_at 2026-04-21T12:55:00Z
6
value 0.0005
scoring_system epss
scoring_elements 0.15422
published_at 2026-04-18T12:55:00Z
7
value 0.0005
scoring_system epss
scoring_elements 0.15452
published_at 2026-04-16T12:55:00Z
url https://api.first.org/data/v1/epss?cve=CVE-2026-35583
1
reference_url https://github.com/NationalSecurityAgency/emissary
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/NationalSecurityAgency/emissary
2
reference_url https://github.com/NationalSecurityAgency/emissary/pull/1292
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://github.com/NationalSecurityAgency/emissary/pull/1292
3
reference_url https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-hxf2-gm22-7vcm
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
2
value MODERATE
scoring_system generic_textual
scoring_elements
3
value Track
scoring_system ssvc
scoring_elements SSVCv2/E:N/A:Y/T:P/P:M/B:A/M:M/D:T/2026-04-09T16:12:26Z/
url https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-hxf2-gm22-7vcm
4
reference_url https://nvd.nist.gov/vuln/detail/CVE-2026-35583
reference_id
reference_type
scores
0
value 5.3
scoring_system cvssv3.1
scoring_elements CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
1
value MODERATE
scoring_system generic_textual
scoring_elements
url https://nvd.nist.gov/vuln/detail/CVE-2026-35583
5
reference_url https://github.com/advisories/GHSA-hxf2-gm22-7vcm
reference_id GHSA-hxf2-gm22-7vcm
reference_type
scores
0
value MODERATE
scoring_system cvssv3.1_qr
scoring_elements
url https://github.com/advisories/GHSA-hxf2-gm22-7vcm
Weaknesses
0
cwe_id 22
name Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
description The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
Exploits
Severity_range_score4.0 - 6.9
Exploitabilitynull
Weighted_severitynull
Risk_scorenull
Resource_urlhttp://public2.vulnerablecode.io/vulnerabilities/VCID-41ah-1nyc-aych