/

CVE-2026-129165

Severity:

CRITICAL RISK

(9.1)

Arbitrary File Read (CWE-73) in Tactical RMM Reports

CVE-2026-129165

Received

Vulnerability type

Category:

Arbitrary File Read

CWE:

CWE-73

Impact:

Sensitive file disclosure and potential command execution on managed agents

Severity:

CRITICAL RISK

(9.1)

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

Tactical RMM's report-template preview can read local files when user-supplied Markdown contains file:// links that WeasyPrint resolves while generating a PDF. A user with report management permission could potentially retrieve sensitive files, including the Django SECRET_KEY, which the description says is reused as the NATS password.

Affected context

The issue occurs in the /reporting/templates/preview/ endpoint when report templates are rendered into PDFs. It is risky when user-supplied template_md can contain file references that WeasyPrint resolves and embeds in the returned PDF, and an account has report management permission.

Exploit preconditions

  • Attack surface: The report-template preview endpoint
  • Required access: Report management permission
  • Trigger point: PDF generation using user-supplied template_md
  • Why exploitation is possible: The renderer resolves local file:// references and may include the referenced file contents in the PDF

Why this happens

The application allows user-controlled template content to influence which files the PDF renderer accesses. This is an external control of file names or paths, mapping to CWE-73. The insecure pattern is passing untrusted references to a rendering component that can resolve local files without sufficiently restricting permitted schemes and paths.

Potential impact

  • Attackers may read sensitive files accessible to the application process.
  • Disclosure of the Django SECRET_KEY could expose credentials or enable further compromise, depending on how it is used.
  • Reuse of that key as the NATS password could allow unauthorized access to NATS.
  • An attacker could potentially publish runscript commands to managed agents, as described, increasing the risk of fleet-wide impact.

General mitigation guidance

Mitigation generally focuses on separating template input from local file access and limiting the renderer's capabilities.

  • Use secure-by-default rendering settings that disable local-file access and unnecessary URL schemes.
  • Restrict templates to trusted content or a narrowly defined set of approved assets.
  • Apply allowlists and path boundaries where resource loading is required; reject references outside those boundaries.
  • Keep secrets out of files or credentials accessible to the rendering process, and avoid reusing secrets across services.
  • Run rendering workloads with least privilege and limited access to the filesystem and messaging systems.

How teams detect issues like this

  • Review renderer configuration and code paths that pass user-controlled templates or URLs to PDF-generation libraries.
  • Use static analysis and code review checks to flag local-file URL handling and uncontrolled resource loading.
  • Monitor preview requests and generated PDFs for unexpected local resource references or sensitive content.
  • Enforce policies that disable local-file access in rendering components and restrict which resources they may fetch.
  • Automated security review tools can help identify these patterns during development.

Sources

SourceLink
github.comgithub.com/amidaware/tacticalrmm/blob/086e2d9714b1716796722c7e0c19a1ebe08a39f2/api/tacticalrmm/ee/reporting/utils.py#L110-L117
github.comgithub.com/amidaware/tacticalrmm/blob/086e2d9714b1716796722c7e0c19a1ebe08a39f2/api/tacticalrmm/ee/reporting/views.py#L202-L245
github.comgithub.com/amidaware/tacticalrmm/blob/086e2d9714b1716796722c7e0c19a1ebe08a39f2/api/tacticalrmm/tacticalrmm/utils.py#L227-L236
vul.yulun.ac.cnvul.yulun.ac.cn/20261028/tacticalrmm/
vulncheck.comvulncheck.com/advisories/tactical-rmm-0.17.0-through-1.6.1-arbitrary-file-read-via-report-preview

Frequently asked

questions

The described attack requires report management permission and access to the template-preview functionality.

User-supplied template content can influence file references that WeasyPrint resolves during PDF generation, potentially exposing local file contents.

Disable local-file resource loading by default and allow only narrowly approved resources when rendering templates.

Treat templates as untrusted input, restrict renderer permissions and resource access, and review code for user-controlled paths or URL schemes.

Find out what's already
exploitable in your codebase.