GHSA-cpm7-cfpx-3hvp

Suggest an improvement
Source
https://github.com/advisories/GHSA-cpm7-cfpx-3hvp
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-cpm7-cfpx-3hvp/GHSA-cpm7-cfpx-3hvp.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-cpm7-cfpx-3hvp
Aliases
  • CVE-2026-35571
Published
2026-04-07T20:17:14Z
Modified
2026-04-07T20:32:51.555837Z
Severity
  • 4.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
Emissary has Stored XSS via Navigation Template Link Injection
Details

Summary

Mustache navigation templates interpolated configuration-controlled link values directly into href attributes without URL scheme validation. An administrator who could modify the navItems configuration could inject javascript: URIs, enabling stored cross-site scripting (XSS) against other authenticated users viewing the Emissary web interface.

Details

Vulnerable code — nav.mustache (line 10)

{{#navItems}}


<li class="nav-item">
  <a class="nav-link" href="{{link}}">{{display}}</a>
</li>

{{/navItems}}

The {{link}} value was rendered without any scheme validation. Mustache's default HTML escaping protects against injection of new HTML tags but does not prevent javascript: URIs in href attributes, since javascript: contains no characters that HTML-escaping would alter.

Attack vector

An administrator sets a navigation item's link to:

javascript:alert(document.cookie)

Any authenticated user who clicks the navigation link executes the script in their browser context.

Impact

  • Session hijacking via cookie theft
  • Actions performed on behalf of the victim user
  • Requires administrative access to modify navigation configuration
  • Requires user interaction (clicking the malicious link)

Mitigating factors

  • Exploitation requires administrative access to modify the navItems configuration
  • User interaction (clicking the link) is required
  • The Emissary web interface is typically accessed only by authenticated operators within a trusted network

Remediation

Fixed in PR #1293, merged into release 8.39.0.

Server-side link validation — NavAction.java

An allowlist regex was added that only permits http://, https://, or site-relative (/) URLs:

private static final Pattern VALID_LINK = Pattern.compile("^(https?:/)?/.*");

private static boolean isValidLink(String link) {
    if (!VALID_LINK.matcher(link).matches()) {
        logger.warn("Skipping invalid navigation link '{}'", link);
        return false;
    }
    return true;
}

Invalid links are logged and silently dropped from the rendered navigation.

Template hardening — nav.mustache

Added rel="noopener noreferrer" to all navigation link anchor tags as a defense-in-depth measure:

<a class="nav-link" href="{{link}}" rel="noopener noreferrer">{{display}}</a>

Tests were added to verify that javascript: and ftp:// URIs are rejected while http://, https://, and site-relative (/path) links are accepted.

Workarounds

If upgrading is not immediately possible, audit the navigation configuration to ensure all navItems link values use only http://, https://, or relative (/) URL schemes.

References

Database specific
{
    "nvd_published_at": "2026-04-07T16:16:29Z",
    "severity": "MODERATE",
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-79"
    ],
    "github_reviewed_at": "2026-04-07T20:17:14Z"
}
References

Affected packages

Maven / gov.nsa.emissary:emissary

Package

Name
gov.nsa.emissary:emissary
View open source insights on deps.dev
Purl
pkg:maven/gov.nsa.emissary/emissary

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
8.39.0

Affected versions

8.*
8.0.0
8.1.0
8.2.0
8.3.0
8.4.0
8.5.0
8.6.0
8.7.0
8.7.1
8.8.0
8.9.0
8.10.0
8.11.0
8.11.1
8.12.0
8.13.0
8.14.0
8.15.0
8.16.0
8.17.0
8.18.0
8.19.0
8.19.1
8.20.0
8.21.0
8.22.0
8.23.0
8.24.0
8.25.0
8.26.0
8.27.0
8.28.0
8.29.0
8.30.0
8.31.0
8.32.0
8.33.0
8.34.0
8.35.0
8.36.0
8.37.0
8.38.0

Database specific

last_known_affected_version_range
"<= 8.38.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-cpm7-cfpx-3hvp/GHSA-cpm7-cfpx-3hvp.json"