Summary
Wanderer can render a crafted waypoint icon value as HTML in a trail map without validating it, allowing script execution in a viewer's browser. An authenticated user may store the value, and federated waypoint data may also reach the vulnerable rendering path; successful exploitation could expose session tokens or enable actions as the viewer.
Affected context
The issue occurs when Wanderer creates map markers from waypoint data and passes the icon value to FontawesomeMarker, which inserts it into marker markup as HTML. It affects instances where crafted waypoint data can reach this rendering path, including data stored by an authenticated user or received through federation. The issue was fixed in version 0.19.3.
Exploit preconditions
- Attack surface: Trail map rendering in a Wanderer instance
- Required access: An attacker may need an authenticated account to store a crafted waypoint locally; federated waypoint data may reach the affected instance without a local account.
- Trigger point: A viewer opens a trail map containing the crafted waypoint.
- Why exploitation is possible: The waypoint icon value is inserted into marker HTML without validation or safe text handling.
Why this happens
The application treats waypoint data as trusted markup when creating a map marker. Inserting an unvalidated value with insertAdjacentHTML allows attacker-controlled content to be interpreted as HTML and script in the viewer's browser. This is a cross-site scripting weakness, mapped to CWE-79: Improper Neutralization of Input During Web Page Generation.
Potential impact
- Attacker-controlled script may execute in a map viewer's browser.
- Session tokens or other data accessible to the page could be exposed.
- The script could perform actions with the viewer's permissions.
- Trust in federated waypoint content could extend the issue to receiving instances.
General mitigation guidance
Defensive patterns focus on preventing untrusted waypoint values from becoming executable markup:
- Render values as text or use safe DOM APIs instead of HTML insertion.
- Accept only predefined icon identifiers using a strict allowlist.
- Validate data at trust boundaries, including when receiving federated content.
- Apply contextual output encoding where values must be rendered.
- Limit application privileges and use browser-side security policies as defense in depth.
How teams detect issues like this
- Use static analysis to identify unsafe HTML insertion APIs and trace whether their inputs can be influenced by waypoint or federated data.
- Review marker-rendering code for missing allowlists, validation, or safe DOM construction.
- Add tests and policy checks that verify untrusted data is never interpreted as markup.
- Use automated code review tools to help flag potentially unsafe rendering patterns.

