/

CVE-2025-69517

Severity:

HIGH RISK

(8.8)

HTML / Script Injection in Tactical RMM Agent Management

CVE-2025-69517

Awaiting Analysis

Vulnerability type

Category:

HTML / Script Injection

CWE:

CWE-94

Impact:

Stored client-side compromise of administrator sessions (e.g., phishing, UI redress, potential script execution depending on browser behavior)

Severity:

HIGH RISK

(8.8)

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

An HTML injection issue in Tactical RMM up to v1.3.1 allows authenticated users to store arbitrary HTML in the agent_id field when creating a new agent via the /api/v3/newagent/ endpoint.

When an administrator later views, removes, or shuts down the affected agent in the management panel, the injected HTML is rendered in their browser, enabling client-side attacks such as UI manipulation or phishing within the admin interface.

Affected context

This vulnerability occurs in the Tactical RMM web-based management interface where agents are created and administered.

It specifically affects deployments where:

  • Authenticated users can create or register agents via the /api/v3/newagent/ HTTP POST endpoint.
  • The agent_id field is persisted and later rendered in the web UI of the management console.
  • DOMPurify.sanitize() is used with an HTML-permissive configuration (html: true), allowing crafted HTML content to survive sanitization and be reflected back into the admin view.

The risk is concentrated around views in which administrators interact with or manage the injected agent entry.

Exploit preconditions

  • Attack surface: Tactical RMM web API (/api/v3/newagent/) and subsequent rendering in the management UI.
  • Required access: Authenticated access capable of creating a new agent (e.g., standard user, technician, or any role with agent-registration rights).
  • Trigger point: The vulnerability is triggered when an administrator opens management views that display the malicious agent_id, such as during agent removal, shutdown, or detail inspection.
  • Why exploitation is possible: The agent_id parameter is treated as HTML content and sanitized with DOMPurify configured to allow HTML (html: true), which may fail to strip all potentially dangerous markup. The resulting HTML is then embedded into the admin interface and interpreted by the browser, enabling hostile user-controlled markup to influence the page.

Why this happens

The core issue is improper neutralization of user-controlled HTML content before it is embedded into a privileged web interface.

The application relies on DOMPurify.sanitize() with an HTML-permissive configuration that assumes the resulting content is safe to render, but still allows attackers to craft markup that alters the UI or user perception.

This falls under CWE-94 when user-controlled content is not adequately constrained or encoded and ends up being handled in a way that can affect execution behavior or security decisions in the client environment.

Abstractly, the pattern is: user input is accepted as a label/identifier, stored without strict validation, sanitized in a mode that preserves HTML semantics, and then reinserted into the DOM in a context where it can impact the administrator's interaction with the interface.

Potential impact

  • Attackers could inject deceptive UI elements (e.g., fake buttons or dialogs) to trick administrators into performing unintended actions.
  • The injected HTML could be used for phishing-style attacks, such as presenting fake login prompts within the management console.
  • Visual tampering with the interface may cause administrators to misinterpret system state, leading to operational mistakes or misconfiguration.
  • Depending on browser behavior and any surrounding context, the injected content could potentially contribute to script execution or other client-side compromise scenarios.

General mitigation guidance

Effective mitigation focuses on tightening how user-controlled fields are handled, especially those intended as identifiers or labels:

  • Treat agent_id and similar fields as plain text, not HTML; enforce strict character sets and length limits, and reject input containing markup-like characters where feasible.
  • Prefer output encoding (e.g., HTML-escaping) at render time so that user input cannot be interpreted as markup by the browser.
  • If sanitization libraries like DOMPurify are used, configure them defensively (e.g., disallow arbitrary HTML, restrict to a minimal and well-understood subset) and avoid using modes that preserve rich HTML unless genuinely required.
  • Apply a least-privilege approach in the UI: do not place user-controlled content in locations that influence security decisions, critical controls, or authentication flows.
  • Consider a clear separation between data storage and presentation: store identifiers in canonical, constrained form and derive any display formatting on the server using trusted templates.

How teams detect issues like this

Organizations can approach detection of this type of issue via:

  • Static analysis and linting: Flagging patterns where user-controlled data is inserted into templates without proper encoding or where sanitization is configured in permissive modes that allow HTML.
  • Code review practices: Explicitly reviewing endpoints that accept identifiers, labels, or descriptions and tracking how those values flow into rendered views, especially in administrative panels.
  • Policy enforcement: Establishing internal standards that all user-controlled text must be HTML-encoded by default, and that rich HTML input is allowed only in narrowly scoped, well-documented areas.
  • Automated testing: Using security tests or fuzzing tools to inject benign but clearly visible HTML markers into fields like agent_id and verifying whether they render as markup in any UI screens.

Sources

SourceLink
gist.github.comgist.github.com/NtGabrielGomes/fdabcd9e85d841c5490739686e0f8b72
github.comgithub.com/amidaware/tacticalrmm
amidaware.comamidaware.com/

Frequently asked

questions

It can be, if the Tactical RMM interface or API is exposed to remote users who hold credentials. The vulnerability requires authenticated access to create a new agent but does not inherently require local network access.

The attacker must be an authenticated user with the ability to create agents through the /api/v3/newagent/ endpoint. They do not need administrative privileges; the exploit targets admins who later view the compromised agent in the management UI.

The safest pattern is to treat all user-controlled fields as plain text and apply strict server-side validation plus context-appropriate output encoding before rendering. Only allow HTML input in carefully controlled components, and even then, restrict to a minimal, well-reviewed subset.

Adopt a default-deny posture for HTML in user input, enforce encoding at every template boundary, and bake these constraints into coding standards, review checklists, and automated quality gates. Training developers on secure output handling and establishing consistent use of templating frameworks that auto-escape variables will also reduce the chance of recurrence.

Find out what's already
exploitable in your codebase.