CVE-2026-35571: Emissary Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-cpm7-cfpx-3hvp
CVSS 4.8
CWE-79
Published
Advisory Summary

CVE-2026-35571 is a MODERATE (CVSS 4.8) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Emissary libraries in the Maven ecosystem. The issue involves emissary has stored xss via navigation template link injection. Remediation is available by upgrading affected packages to version 8.39.0.

CVE-2026-35571 at a Glance

CVE Identifier CVE-2026-35571
GHSA Identifier GHSA-cpm7-cfpx-3hvp
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Emissary
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-35571

To remediate this vulnerability, upgrade all affected Emissary dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

gov.nsa.emissary:emissary fixed: 8.39.0
<dependency>
    <groupId>gov.nsa.emissary</groupId>
    <artifactId>emissary</artifactId>
    <version>8.39.0</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=gov.nsa.emissary

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2026-35571, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=gov.nsa.emissary

Analyze the terminal output to locate any version of Emissary in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.39.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=gov.nsa.emissary command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Emissary, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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) ```html {{#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](https://github.com/NationalSecurityAgency/emissary/pull/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: ```java 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: ```html <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 - [PR #1293 — validate nav links](https://github.com/NationalSecurityAgency/emissary/pull/1293) - Original report: GHSA-wjqm-p579-x3ww

CVE-2026-35571 Affected Emissary Versions

1 component(s)
Fixed Versions:
8.39.0
Product / Package Ecosystem Affected Versions Fixed Version
gov.nsa.emissary:emissary
Maven
< 8.39.0
8.39.0

References

Frequently Asked Questions

What is CVE-2026-35571?
CVE-2026-35571 is a security vulnerability in Emissary involving Emissary has Stored XSS via Navigation Template Link Injection under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Emissary versions are affected?
Affected versions include releases prior to 8.39.0 across affected packages: gov.nsa.emissary:emissary.
What version fixes CVE-2026-35571?
Upgrading to 8.39.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is emissary affected?
Yes, gov.nsa.emissary:emissary is affected in releases prior to 8.39.0. Upgrade your dependency to 8.39.0 or later.
What is the CVSS score of CVE-2026-35571?
CVE-2026-35571 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-35571?
CVE-2026-35571 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2026-35571?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=gov.nsa.emissary'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cpm7-cfpx-3hvp",
  "modified" : "2026-04-07T20:17:14Z",
  "published" : "2026-04-07T20:17:14Z",
  "aliases" : [ "CVE-2026-35571" ],
  "summary" : "Emissary has Stored XSS via Navigation Template Link Injection",
  "details" : "## Summary\n\nMustache navigation templates interpolated configuration-controlled link values\ndirectly into `href` attributes without URL scheme validation. An administrator\nwho could modify the `navItems` configuration could inject `javascript:` URIs,\nenabling stored cross-site scripting (XSS) against other authenticated users\nviewing the Emissary web interface.\n\n## Details\n\n### Vulnerable code — `nav.mustache` (line 10)\n\n```html\n{{#navItems}}\n<li class=\"nav-item\">\n  <a class=\"nav-link\" href=\"{{link}}\">{{display}}</a>\n</li>\n{{/navItems}}\n```\n\nThe `{{link}}` value was rendered without any scheme validation. Mustache's\ndefault HTML escaping protects against injection of new HTML tags but does\n**not** prevent `javascript:` URIs in `href` attributes, since `javascript:`\ncontains no characters that HTML-escaping would alter.\n\n### Attack vector\n\nAn administrator sets a navigation item's link to:\n```\njavascript:alert(document.cookie)\n```\n\nAny authenticated user who clicks the navigation link executes the script in\ntheir browser context.\n\n### Impact\n\n- Session hijacking via cookie theft\n- Actions performed on behalf of the victim user\n- Requires administrative access to modify navigation configuration\n- Requires user interaction (clicking the malicious link)\n\n### Mitigating factors\n\n- Exploitation requires administrative access to modify the `navItems`\n  configuration\n- User interaction (clicking the link) is required\n- The Emissary web interface is typically accessed only by authenticated\n  operators within a trusted network\n\n## Remediation\n\nFixed in [PR #1293](https://github.com/NationalSecurityAgency/emissary/pull/1293),\nmerged into release 8.39.0.\n\n### Server-side link validation — `NavAction.java`\n\nAn allowlist regex was added that only permits `http://`, `https://`, or\nsite-relative (`/`) URLs:\n\n```java\nprivate static final Pattern VALID_LINK = Pattern.compile(\"^(https?:/)?/.*\");\n\nprivate static boolean isValidLink(String link) {\n    if (!VALID_LINK.matcher(link).matches()) {\n        logger.warn(\"Skipping invalid navigation link '{}'\", link);\n        return false;\n    }\n    return true;\n}\n```\n\nInvalid links are logged and silently dropped from the rendered navigation.\n\n### Template hardening — `nav.mustache`\n\nAdded `rel=\"noopener noreferrer\"` to all navigation link anchor tags as a\ndefense-in-depth measure:\n\n```html\n<a class=\"nav-link\" href=\"{{link}}\" rel=\"noopener noreferrer\">{{display}}</a>\n```\n\nTests were added to verify that `javascript:` and `ftp://` URIs are rejected\nwhile `http://`, `https://`, and site-relative (`/path`) links are accepted.\n\n## Workarounds\n\nIf upgrading is not immediately possible, audit the navigation configuration\nto ensure all `navItems` link values use only `http://`, `https://`, or\nrelative (`/`) URL schemes.\n\n## References\n\n- [PR #1293 — validate nav links](https://github.com/NationalSecurityAgency/emissary/pull/1293)\n- Original report: GHSA-wjqm-p579-x3ww",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "gov.nsa.emissary:emissary"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.39.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 8.38.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/NationalSecurityAgency/emissary/security/advisories/GHSA-cpm7-cfpx-3hvp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35571"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NationalSecurityAgency/emissary/pull/1293"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/NationalSecurityAgency/emissary/commit/e2078417464b9004620dde28dcbca2f73ea06c13"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/NationalSecurityAgency/emissary"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-07T20:17:14Z",
    "nvd_published_at" : "2026-04-07T16:16:29Z"
  }
}