/

CVE-2026-106486

Severity:

HIGH RISK

(8.5)

Path Traversal (CWE-22) in Backstage Bitbucket Plugin

CVE-2026-106486

Analyzed

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-59

Impact:

Backend confidentiality, integrity, and availability compromise

Severity:

HIGH RISK

(8.5)

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

Backstage Bitbucket pull-request Scaffolder actions may insufficiently validate filesystem paths, allowing an authenticated user to influence locations outside the intended working area. If the user can run an eligible template and control an allowed Bitbucket repository, the issue could expose or alter backend files and affect service availability.

Backstage Bitbucket pull-request Scaffolder actions may insufficiently validate filesystem paths, allowing an authenticated user to influence locations outside the intended working area. If the user can run an eligible template and control an allowed Bitbucket repository, the issue could expose or alter backend files and affect service availability.

Affected context

The vulnerability can occur in Backstage deployments that use the Bitbucket Cloud or Bitbucket Server Scaffolder backend modules for pull-request actions. Risk depends on whether authenticated users can execute eligible templates and influence repository content or parameters that reach filesystem operations without sufficiently constrained path validation.

The vulnerability can occur in Backstage deployments that use the Bitbucket Cloud or Bitbucket Server Scaffolder backend modules for pull-request actions. Risk depends on whether authenticated users can execute eligible templates and influence repository content or parameters that reach filesystem operations without sufficiently constrained path validation.

Exploit preconditions

  • Attack surface: Backstage Scaffolder Bitbucket pull-request actions
  • Required access: Authenticated access sufficient to execute an eligible template
  • Required influence: Ability to influence an allowed Bitbucket repository or related input
  • Trigger point: Filesystem operations performed while processing the pull-request action
  • Why exploitation is possible: User-controlled path information may resolve outside the intended working directory, potentially including paths affected by symbolic-link behavior
  • Attack surface: Backstage Scaffolder Bitbucket pull-request actions
  • Required access: Authenticated access sufficient to execute an eligible template
  • Required influence: Ability to influence an allowed Bitbucket repository or related input
  • Trigger point: Filesystem operations performed while processing the pull-request action
  • Why exploitation is possible: User-controlled path information may resolve outside the intended working directory, potentially including paths affected by symbolic-link behavior

Why this happens

The underlying bug is insufficient restriction and canonicalization of filesystem paths derived from user-influenced repository or template data. When an application accepts a path without reliably constraining its resolved location to an approved working area, path traversal can reach unintended filesystem objects. This maps primarily to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, with CWE-59 relevant where symbolic links can redirect operations outside the expected path boundary.

The underlying bug is insufficient restriction and canonicalization of filesystem paths derived from user-influenced repository or template data. When an application accepts a path without reliably constraining its resolved location to an approved working area, path traversal can reach unintended filesystem objects. This maps primarily to CWE-22, Improper Limitation of a Pathname to a Restricted Directory, with CWE-59 relevant where symbolic links can redirect operations outside the expected path boundary.

Potential impact

  • An attacker may read sensitive backend files
  • An attacker could modify or delete files accessible to the backend process
  • Backend configuration or source material may be exposed or altered
  • Service availability could be degraded
  • Compromise may extend to other resources reachable through the backend's privileges
  • An attacker may read sensitive backend files
  • An attacker could modify or delete files accessible to the backend process
  • Backend configuration or source material may be exposed or altered
  • Service availability could be degraded
  • Compromise may extend to other resources reachable through the backend's privileges

General mitigation guidance

Mitigation generally focuses on enforcing a strict filesystem trust boundary

around every path used by Scaffolder actions.

Common defensive patterns include:

  • Resolve and canonicalize paths before use, then verify they remain beneath an approved directory
  • Prefer controlled identifiers over user-supplied filesystem paths
  • Reject traversal segments, absolute paths, and unexpected path formats
  • Account for symbolic links and race conditions when validating and accessing files
  • Use isolated, temporary working directories with restrictive permissions
  • Run backend workers with least privilege and limit access to sensitive filesystem locations
  • Keep repository content and template inputs untrusted by default

Mitigation generally focuses on enforcing a strict filesystem trust boundary

around every path used by Scaffolder actions.

Common defensive patterns include:

  • Resolve and canonicalize paths before use, then verify they remain beneath an approved directory
  • Prefer controlled identifiers over user-supplied filesystem paths
  • Reject traversal segments, absolute paths, and unexpected path formats
  • Account for symbolic links and race conditions when validating and accessing files
  • Use isolated, temporary working directories with restrictive permissions
  • Run backend workers with least privilege and limit access to sensitive filesystem locations
  • Keep repository content and template inputs untrusted by default

How teams detect issues like this

Detection approaches can include:

  • Static analysis for path joins, file operations, and archive or repository extraction using user-influenced values
  • Code review checks for canonicalization performed after file access or for validation based only on string prefixes
  • Tests covering relative paths, absolute paths, encoded traversal, symlinks, and concurrent filesystem changes
  • Policy enforcement requiring approved-directory checks before filesystem access
  • Runtime monitoring for Scaffolder processes accessing paths outside designated workspaces
  • Automated security review tools that flag path traversal and unsafe link-following patterns

Detection approaches can include:

  • Static analysis for path joins, file operations, and archive or repository extraction using user-influenced values
  • Code review checks for canonicalization performed after file access or for validation based only on string prefixes
  • Tests covering relative paths, absolute paths, encoded traversal, symlinks, and concurrent filesystem changes
  • Policy enforcement requiring approved-directory checks before filesystem access
  • Runtime monitoring for Scaffolder processes accessing paths outside designated workspaces
  • Automated security review tools that flag path traversal and unsafe link-following patterns

Sources

SourceLink
github.comgithub.com/backstage/backstage/commit/818528e112c36167d76187e9e63fb518399c4dd2
github.comgithub.com/backstage/backstage/releases/tag/v1.54.6
github.comgithub.com/backstage/backstage/security/advisories/GHSA-g8rx-f7m5-7794

Frequently asked

questions

Exploitation generally requires an authenticated user who can execute an

eligible Scaffolder template and influence an allowed Bitbucket repository or

related action input.

Typically not. The relevant access controls are template execution permissions,

repository influence, and the backend operations exposed by the action.

Treat repository and template-derived paths as untrusted, canonicalize them

safely, and verify that every resolved path remains within a dedicated,

restricted working directory.

Use allowlisted path handling, test symbolic-link and traversal edge cases,

isolate temporary workspaces, and apply least-privilege permissions to the

backend process.

Exploitation generally requires an authenticated user who can execute an

eligible Scaffolder template and influence an allowed Bitbucket repository or

related action input.

Typically not. The relevant access controls are template execution permissions,

repository influence, and the backend operations exposed by the action.

Treat repository and template-derived paths as untrusted, canonicalize them

safely, and verify that every resolved path remains within a dedicated,

restricted working directory.

Use allowlisted path handling, test symbolic-link and traversal edge cases,

isolate temporary workspaces, and apply least-privilege permissions to the

backend process.

Find out what's already
exploitable in your codebase.