/

CVE-2026-106560

Severity:

HIGH RISK

(7.1)

Path Traversal (CWE-22) in Backstage Confluence Module

CVE-2026-106560

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Application Integrity Compromise

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

A path traversal vulnerability in Backstage's Confluence-to-Markdown scaffolder backend module can allow generated content to be written outside the intended task workspace. An authenticated user who can run an affected template and control its repository file location may overwrite files in locations writable by the Backstage backend process.

A path traversal vulnerability in Backstage's Confluence-to-Markdown scaffolder backend module can allow generated content to be written outside the intended task workspace. An authenticated user who can run an affected template and control its repository file location may overwrite files in locations writable by the Backstage backend process.

Affected context

The issue occurs in Backstage deployments using the affected Confluence-to-Markdown scaffolder backend module when repository file locations are derived from user-controlled template input without sufficient path containment checks. Risk depends on whether an authenticated user can execute the relevant template and whether the backend process has write access to sensitive locations outside the task workspace.

The issue occurs in Backstage deployments using the affected Confluence-to-Markdown scaffolder backend module when repository file locations are derived from user-controlled template input without sufficient path containment checks. Risk depends on whether an authenticated user can execute the relevant template and whether the backend process has write access to sensitive locations outside the task workspace.

Exploit preconditions

  • Attack surface: Backstage scaffolder backend template execution
  • Required access: Authentication and permission to execute an affected template
  • Required control: Ability to influence the repository file location used by the module
  • Trigger point: Generation of Confluence-derived Markdown content
  • Why exploitation is possible: The destination path may escape the intended workspace and resolve to another backend-writable location
  • Attack surface: Backstage scaffolder backend template execution
  • Required access: Authentication and permission to execute an affected template
  • Required control: Ability to influence the repository file location used by the module
  • Trigger point: Generation of Confluence-derived Markdown content
  • Why exploitation is possible: The destination path may escape the intended workspace and resolve to another backend-writable location

Why this happens

The underlying bug is improper validation and containment of a path assembled from repository or template-controlled input. When a component accepts a destination path without reliably normalizing it and confirming that it remains beneath an approved workspace directory, traversal sequences or equivalent path representations may redirect writes elsewhere. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

The underlying bug is improper validation and containment of a path assembled from repository or template-controlled input. When a component accepts a destination path without reliably normalizing it and confirming that it remains beneath an approved workspace directory, traversal sequences or equivalent path representations may redirect writes elsewhere. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive or operational files may be overwritten
  • Generated content may be placed in unintended application directories
  • Backstage task and repository integrity could be compromised
  • The backend process may be exposed to configuration or code changes
  • Further compromise could occur if overwritten files are later loaded or executed
  • Sensitive or operational files may be overwritten
  • Generated content may be placed in unintended application directories
  • Backstage task and repository integrity could be compromised
  • The backend process may be exposed to configuration or code changes
  • Further compromise could occur if overwritten files are later loaded or executed

General mitigation guidance

Mitigation generally focuses on enforcing a strict destination boundary and reducing trust in paths supplied through templates or repository metadata.

Common defensive patterns include:

  • Canonicalizing paths before validation and requiring them to remain beneath an approved workspace root
  • Rejecting absolute paths, traversal components, and alternate path representations
  • Using trusted path-joining utilities with explicit containment checks
  • Restricting template authors and execution permissions according to least privilege
  • Running the backend with minimal filesystem write permissions
  • Separating generated-content directories from configuration, source, and executable locations

Mitigation generally focuses on enforcing a strict destination boundary and reducing trust in paths supplied through templates or repository metadata.

Common defensive patterns include:

  • Canonicalizing paths before validation and requiring them to remain beneath an approved workspace root
  • Rejecting absolute paths, traversal components, and alternate path representations
  • Using trusted path-joining utilities with explicit containment checks
  • Restricting template authors and execution permissions according to least privilege
  • Running the backend with minimal filesystem write permissions
  • Separating generated-content directories from configuration, source, and executable locations

How teams detect issues like this

Organizations can look for path traversal risks through:

  • Static analysis rules for path joins involving template, repository, or request-controlled values
  • Code review checks requiring canonicalization and workspace-boundary enforcement
  • Tests covering absolute paths, traversal sequences, encoded separators, symlinks, and platform-specific path forms
  • Runtime monitoring for writes outside approved scaffolder workspace directories
  • Policy enforcement that limits backend filesystem permissions and template execution capabilities

Automated code review and software composition analysis tools may help identify related unsafe path-handling patterns.

Organizations can look for path traversal risks through:

  • Static analysis rules for path joins involving template, repository, or request-controlled values
  • Code review checks requiring canonicalization and workspace-boundary enforcement
  • Tests covering absolute paths, traversal sequences, encoded separators, symlinks, and platform-specific path forms
  • Runtime monitoring for writes outside approved scaffolder workspace directories
  • Policy enforcement that limits backend filesystem permissions and template execution capabilities

Automated code review and software composition analysis tools may help identify related unsafe path-handling patterns.

Sources

SourceLink
github.comgithub.com/backstage/backstage/commit/5f0000c1d0af05571e357926b3fa33a453337ff0
github.comgithub.com/backstage/backstage/releases/tag/v1.54.6
github.comgithub.com/backstage/backstage/security/advisories/GHSA-2cmg-v53w-8xfp

Frequently asked

questions

An attacker generally needs to be authenticated and authorized to execute an affected scaffolder template, along with the ability to influence its repository file location.

No. The relevant path can be supplied through the affected scaffolding workflow, but the backend process must have write access to the unintended destination.

Treat destination paths as untrusted, canonicalize them, and enforce that every resulting path remains within a dedicated workspace directory.

Limit template execution privileges, apply least-privilege filesystem permissions, use trusted path-handling utilities, and test path validation against platform-specific and symlink-based bypasses.

An attacker generally needs to be authenticated and authorized to execute an affected scaffolder template, along with the ability to influence its repository file location.

No. The relevant path can be supplied through the affected scaffolding workflow, but the backend process must have write access to the unintended destination.

Treat destination paths as untrusted, canonicalize them, and enforce that every resulting path remains within a dedicated workspace directory.

Limit template execution privileges, apply least-privilege filesystem permissions, use trusted path-handling utilities, and test path validation against platform-specific and symlink-based bypasses.

Find out what's already
exploitable in your codebase.