/

CVE-2026-43887

Severity:

HIGH RISK

(7.3)

Cross-Site Scripting (XSS) in Outline User Mentions

CVE-2026-43887

Deferred

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-79

Impact:

Client-Side Code Execution / Stored XSS

Severity:

HIGH RISK

(7.3)

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

A stored cross-site scripting vulnerability in Outline's comment mention feature allows unvalidated href attributes on user mentions to include dangerous protocols such as javascript:.

When other users view comments containing these crafted mentions, attacker-controlled client-side code can execute in their browser, potentially compromising accounts and session data.

Affected context

This vulnerability occurs in Outline deployments using versions 0.84.0 through 1.6.1 where collaborative comments are enabled and users can mention other users.

The backend accepts and persists the href associated with user mentions without validating the protocol or sanitizing unsafe schemes.

When comments are rendered in the browser, these unsafe links are presented as legitimate user mention hyperlinks, creating a persistent client-side attack vector.

Exploit preconditions

  • Attack surface: Web UI of the Outline application, specifically the comment section where mentions appear.
  • Required access: Ability to create or edit comments that contain user mentions (typically any authenticated user with comment permissions).
  • Trigger point: A victim user views a comment containing a crafted mention whose href uses a dangerous protocol (e.g., javascript:).
  • Why exploitation is possible: The server does not validate or sanitize the href attribute for mentions, allowing arbitrary protocols and script-capable URLs to be stored and rendered, which can be executed by the browser when interacted with or in certain rendering contexts.

Why this happens

The root cause is insufficient output handling for dynamically generated links within user mentions, mapping to CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).

The backend logic responsible for persisting and returning mention metadata does not constrain the href attribute to safe protocols (such as https: or mailto:) and does not neutralize or reject dangerous schemes.

As a result, untrusted user-controlled data flows directly into link attributes in the rendered HTML, enabling execution of attacker-controlled script in the context of the application's origin.

Potential impact

  • Theft of session tokens, CSRF tokens, or other sensitive data accessible via the browser context.
  • Execution of arbitrary JavaScript in victims' browsers under the trusted Outline origin.
  • Unauthorized actions performed on behalf of victims (e.g., modifying documents, changing settings, managing users) via script-driven requests.
  • Defacement of content or injection of phishing interfaces within the application UI.
  • Pivoting into broader organizational accounts or SSO providers by abusing authenticated user context.

General mitigation guidance

Mitigation generally focuses on strict output encoding and protocol validation for user-controlled links:

  • Enforce an allowlist of safe URL schemes for href attributes (e.g., https:, http:, mailto:, tel:) and reject or strip anything else.
  • Normalize and validate mention metadata on the server side before storage and again before rendering.
  • Apply robust output encoding for all user-controlled data inserted into HTML, including attribute contexts, to prevent script execution.
  • Treat rich-text features (mentions, links, embeds) as untrusted input and process them through a sanitization pipeline designed for HTML and URL contexts.
  • Limit the privileges available from a browser session (e.g., apply least-privilege design and defense-in-depth controls) so that a successful XSS has reduced impact.

How teams detect issues like this

Detection can rely on a combination of code-level review and runtime monitoring:

  • Use static analysis rules and linters that flag direct insertion of user-controlled data into href and other sensitive attributes without validation or encoding.
  • During code review, trace data flows from comment input and mention construction to HTML rendering templates or React components, ensuring protocol checks and encoding steps are present.
  • Implement security-focused tests (unit and integration) that cover edge cases like javascript:, data:, and other non-HTTP schemes in mention links.
  • Employ Content Security Policy (CSP) reporting modes to surface unexpected inline script execution or dangerous URL usage as a signal of potential XSS issues.
  • Use automated application security testing tools capable of generating and detecting stored XSS payloads in collaborative and comment workflows.

Sources

SourceLink
github.comgithub.com/outline/outline/security/advisories/GHSA-rqrg-f3qc-xvgh

Frequently asked

questions

Yes. Any attacker who can access the Outline instance and create or edit comments with mentions can exploit it, and the impact occurs when other users view those comments via their browsers.

Typically, no. The attacker generally only needs the level of access required to post comments with mentions, which is often available to regular authenticated users in collaborative environments.

The safest pattern is to strictly validate and normalize all URL fields on the server side using an allowlist of permitted schemes and to apply proper output encoding in templates or UI components so that user-controlled data cannot become executable HTML or script.

Establish a secure coding guideline for handling rich-text and hyperlink features, require protocol allowlists for all href/src attributes, integrate automated security checks into CI pipelines, and consistently use frameworks or helper functions that perform context-aware encoding and sanitization by default.

Find out what's already
exploitable in your codebase.