/

CVE-2026-62346

Severity:

HIGH RISK

(7.6)

Stored Cross-Site Scripting (CWE-79) in Wanderer Trails

CVE-2026-62346

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Client-side script execution in a victim's browser

Severity:

HIGH RISK

(7.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Wanderer can render attacker-controlled waypoint names or icons as HTML in its trail elevation graph without safely encoding or validating them. When a victim views the affected elevation profile, the injected script may run in their browser; malicious waypoint data can come from a local authenticated user or a federated instance.

Affected context

The issue occurs in Wanderer's MapLibre elevation-profile component, where waypoint name and icon values are interpolated into an innerHTML template. Deployments running versions before 0.19.3 may be affected when crafted waypoint data is displayed in an elevation profile. The data may be submitted by an authenticated local user or received through federation.

Exploit preconditions

  • Attack surface: Waypoint data displayed in a trail elevation profile.
  • Required access: An attacker may need a local account to submit waypoint data directly. Alternatively, malicious federated waypoint data may reach an instance without the attacker having a local account there.
  • Trigger point: A victim views an elevation profile containing the crafted waypoint.
  • Why exploitation is possible: The waypoint name and icon are inserted into HTML without adequate encoding or icon validation.

Why this happens

The component interpolates data that may be attacker-controlled into an innerHTML template without context-appropriate HTML encoding. The icon value is also not validated before rendering. This is a cross-site scripting flaw covered by CWE-79: Improper Neutralization of Input During Web Page Generation.

Potential impact

  • Attacker-controlled script may execute in a victim's browser.
  • Script could expose session data accessible to the page.
  • Script could perform actions in the victim's context.
  • User trust in shared or federated trail data could be undermined.

General mitigation guidance

Defensive patterns focus on treating waypoint data as untrusted and preventing it from becoming executable markup. Common approaches include:

  • Render names and other text through framework APIs that escape content by default.
  • Avoid assigning untrusted values to innerHTML; use safe DOM construction or text-only insertion.
  • Validate icon values against a narrow allowlist of supported identifiers.
  • Apply context-appropriate encoding at the point where data is rendered.
  • Limit the privileges available to browser sessions and protect sensitive actions with appropriate authorization checks.

How teams detect issues like this

Detection can include:

  • Static analysis rules that flag untrusted data interpolated into innerHTML or equivalent HTML sinks.
  • Code review checks for missing output encoding and unrestricted icon or markup values.
  • Tests that verify waypoint fields are rendered as text and that icons are constrained to approved values.
  • Policies requiring safe DOM APIs and review of data received through federation.

Sources

SourceLink
github.comgithub.com/open-wanderer/wanderer/commit/6135332ea69a3d9a4fe1dec5af1cb1ee74f70e2b
github.comgithub.com/open-wanderer/wanderer/pull/1093
github.comgithub.com/open-wanderer/wanderer/releases/tag/v0.19.3
github.comgithub.com/open-wanderer/wanderer/security/advisories/GHSA-m7v2-6gj3-3g2p

Frequently asked

questions

Malicious waypoint data may arrive through federation, so an attacker may not need an account on the receiving instance. A victim still needs to view an elevation profile containing that data.

Submitting waypoint data directly requires an authenticated local account. Federated waypoint data provides a separate route that does not require an account on the receiving instance.

Keep untrusted values out of HTML interpretation: render text with auto-escaping or text-only DOM APIs, and allowlist icon values.

Treat local and federated data as untrusted, use safe rendering APIs by default, and include static checks and rendering tests for dangerous HTML sinks.

Find out what's already
exploitable in your codebase.