/

CVE-2026-78203

Severity:

HIGH RISK

(7.1)

Broken Access Control (CWE-639) in Ghostwriter Templates

CVE-2026-78203

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-639

Impact:

Cross-Client Information Disclosure

Severity:

HIGH RISK

(7.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

Ghostwriter fails to verify that a selected report template belongs to the client associated with the report. An attacker who can access the template-swap endpoint may enumerate template identifiers, attach another client's template to their own report, and disclose its contents when generating the report.

Affected context

The issue occurs in Ghostwriter report workflows that allow users to swap templates by referencing template primary keys. It becomes risky when the endpoint relies on the supplied identifier without enforcing ownership or client-scope checks, particularly where identifiers are predictable or sequential.

Exploit preconditions

  • Attack surface: The report template swap endpoint
  • Required access: Access to create or modify reports and invoke the template-selection workflow
  • Trigger point: Supplying a template identifier while attaching a template to a report
  • Why exploitation is possible: The endpoint does not sufficiently confirm that the selected template belongs to the requesting user's client or authorized scope, and sequential identifiers may support enumeration

Why this happens

The vulnerability is an object-level authorization failure mapped to CWE-639: Authorization Bypass Through User-Controlled Key. The application accepts a user-controlled template primary key and uses it to retrieve or attach an object without consistently checking ownership, tenant boundaries, or effective authorization for the referenced resource. Predictable identifiers increase discoverability, but the fundamental flaw is the missing server-side authorization decision.

Potential impact

  • Unauthorized users may attach templates belonging to other clients
  • Confidential letterhead, boilerplate, or methodology text may be disclosed
  • Cross-client data separation may be weakened
  • Generated reports may contain content outside the user's authorized scope
  • Exposed templates could support further social engineering or information gathering

General mitigation guidance

Mitigation generally focuses on enforcing object-level authorization at every template access and attachment operation.

Common defensive patterns include:

  • Deriving the permitted client or tenant scope from the authenticated session rather than request parameters
  • Checking template ownership and report ownership server-side before retrieval, attachment, and rendering
  • Using opaque, non-sequential identifiers as a defense-in-depth measure, without treating them as an authorization control
  • Returning consistent responses that do not reveal whether unauthorized template identifiers exist
  • Applying least privilege and strict tenant isolation to report-generation services
  • Validating authorization again at sensitive downstream operations such as report rendering and export

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis and code review searches for database lookups driven directly by request-supplied object identifiers
  • Review of endpoints that update, attach, export, or render tenant-scoped resources
  • Test cases that attempt cross-tenant access using valid identifiers from another scope
  • Monitoring for sequential enumeration patterns and repeated authorization failures
  • Policy enforcement requiring explicit ownership or scope checks before object retrieval and mutation
  • Automated application-security testing that exercises object-level authorization boundaries

Sources

SourceLink
github.comgithub.com/GhostManager/Ghostwriter
github.comgithub.com/GhostManager/Ghostwriter/blob/v7.1.1/ghostwriter/reporting/views.py#L275-L315
github.comgithub.com/GhostManager/Ghostwriter/commit/5b2a4a297e44c823c16f65b1ba101c742791cd0b
github.comgithub.com/geo-chen/oss/blob/main/Ghostwriter.md
vulncheck.comvulncheck.com/advisories/ghostwriter-before-cross-client-report-template-disclosure-via-unauthorized-template-swap

Frequently asked

questions

It may be exploitable through the Ghostwriter application endpoint by a user who can access the relevant report and template workflow. Exploitability depends on deployment permissions and endpoint exposure.

Not necessarily. The key requirement is sufficient access to invoke the template-swap operation, combined with the absence of effective ownership checks.

Enforce server-side object-level authorization for every template lookup, attachment, and rendering operation, using the authenticated user's permitted client scope.

Apply deny-by-default authorization, test cross-client access in automated security tests, avoid exposing predictable identifiers where practical, and monitor enumeration and authorization-failure patterns.

Find out what's already
exploitable in your codebase.