/

CVE-2026-106556

Severity:

HIGH RISK

(7.7)

OS Command Injection (CWE-78) in Backstage TechDocs

CVE-2026-106556

Analyzed

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-184

Impact:

Arbitrary Command Execution

Severity:

HIGH RISK

(7.7)

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 configuration sanitization weakness in Backstage TechDocs can allow MkDocs settings to pass unsafe command-related content during documentation generation. An authenticated user who can register or modify documentation sources may be able to execute arbitrary commands in the TechDocs build environment.

A configuration sanitization weakness in Backstage TechDocs can allow MkDocs settings to pass unsafe command-related content during documentation generation. An authenticated user who can register or modify documentation sources may be able to execute arbitrary commands in the TechDocs build environment.

Affected context

The issue occurs in the @backstage/plugin-techdocs-node package when TechDocs processes MkDocs configuration during documentation builds. Risk is present where authenticated users can register or modify documentation sources and where the resulting build process has access to sensitive resources in the TechDocs backend or build container.

The issue occurs in the @backstage/plugin-techdocs-node package when TechDocs processes MkDocs configuration during documentation builds. Risk is present where authenticated users can register or modify documentation sources and where the resulting build process has access to sensitive resources in the TechDocs backend or build container.

Exploit preconditions

  • Attack surface: TechDocs documentation-source registration and build workflows
  • Required access: Authenticated access that permits registering or modifying documentation sources or their MkDocs configuration
  • Trigger point: MkDocs configuration sanitization and processing during TechDocs generation
  • Why exploitation is possible: Insufficient validation allows unsafe configuration values to reach command-execution paths in the build environment
  • Attack surface: TechDocs documentation-source registration and build workflows
  • Required access: Authenticated access that permits registering or modifying documentation sources or their MkDocs configuration
  • Trigger point: MkDocs configuration sanitization and processing during TechDocs generation
  • Why exploitation is possible: Insufficient validation allows unsafe configuration values to reach command-execution paths in the build environment

Why this happens

The vulnerability results from incomplete sanitization and validation of MkDocs configuration before it is consumed by the TechDocs generation process. Configuration fields that can influence command execution are not sufficiently restricted, allowing attacker-controlled documentation settings to affect backend behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-184: Incomplete List of Disallowed Inputs describing the failure to comprehensively reject unsafe configuration constructs.

The vulnerability results from incomplete sanitization and validation of MkDocs configuration before it is consumed by the TechDocs generation process. Configuration fields that can influence command execution are not sufficiently restricted, allowing attacker-controlled documentation settings to affect backend behavior. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-184: Incomplete List of Disallowed Inputs describing the failure to comprehensively reject unsafe configuration constructs.

Potential impact

  • An attacker may execute arbitrary commands in the TechDocs build environment.
  • Build-container credentials or files may be exposed.
  • The attacker could alter generated documentation or build artifacts.
  • Backend-accessible resources may be modified or exfiltrated.
  • A compromised build environment could support lateral movement, depending on runtime privileges and network access.
  • An attacker may execute arbitrary commands in the TechDocs build environment.
  • Build-container credentials or files may be exposed.
  • The attacker could alter generated documentation or build artifacts.
  • Backend-accessible resources may be modified or exfiltrated.
  • A compromised build environment could support lateral movement, depending on runtime privileges and network access.

General mitigation guidance

Mitigation generally focuses on treating MkDocs configuration and documentation metadata as untrusted input.

Common defensive patterns include:

  • Allowlisting supported configuration keys and permitted value types.
  • Rejecting command-bearing, executable, or otherwise unsafe configuration constructs before build processing.
  • Applying schema validation at every documentation-source registration and build boundary.
  • Running documentation builds in isolated, short-lived containers with minimal filesystem, network, and identity privileges.
  • Preventing build containers from receiving unnecessary secrets or backend credentials.
  • Separating documentation-source administration from ordinary authenticated user capabilities.
  • Using secure-by-default build settings and immutable, reviewed configuration where practical.

Mitigation generally focuses on treating MkDocs configuration and documentation metadata as untrusted input.

Common defensive patterns include:

  • Allowlisting supported configuration keys and permitted value types.
  • Rejecting command-bearing, executable, or otherwise unsafe configuration constructs before build processing.
  • Applying schema validation at every documentation-source registration and build boundary.
  • Running documentation builds in isolated, short-lived containers with minimal filesystem, network, and identity privileges.
  • Preventing build containers from receiving unnecessary secrets or backend credentials.
  • Separating documentation-source administration from ordinary authenticated user capabilities.
  • Using secure-by-default build settings and immutable, reviewed configuration where practical.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying incomplete denylist-based sanitization of configuration.
  • Code review checks for configuration values that reach shell commands, subprocess APIs, templates, or build tools.
  • Tests using unexpected command-related fields, nested configuration, and alternate representations to verify schema enforcement.
  • Runtime monitoring of TechDocs build processes for unexpected child processes, outbound connections, or writes outside approved directories.
  • Policy enforcement requiring isolated build workers, restricted service accounts, and minimized secret exposure.
  • Automated security review tools that flag command execution paths fed by user-controlled documentation metadata.

Organizations can look for this class of issue through:

  • Static analysis rules identifying incomplete denylist-based sanitization of configuration.
  • Code review checks for configuration values that reach shell commands, subprocess APIs, templates, or build tools.
  • Tests using unexpected command-related fields, nested configuration, and alternate representations to verify schema enforcement.
  • Runtime monitoring of TechDocs build processes for unexpected child processes, outbound connections, or writes outside approved directories.
  • Policy enforcement requiring isolated build workers, restricted service accounts, and minimized secret exposure.
  • Automated security review tools that flag command execution paths fed by user-controlled documentation metadata.

Sources

SourceLink
github.comgithub.com/backstage/backstage/commit/25125ee727a3de3418a8fa6a9e458cd5b73ecf26
github.comgithub.com/backstage/backstage/commit/b6d1aea0bef99b8dfec3c8746032474867ba677a
github.comgithub.com/backstage/backstage/releases/tag/v1.50.5
github.comgithub.com/backstage/backstage/releases/tag/v1.54.6
github.comgithub.com/backstage/backstage/security/advisories/GHSA-g2hj-v2j6-vfvg

Frequently asked

questions

An authenticated user generally needs permission to register or modify documentation sources or associated MkDocs configuration. Users without that capability may not reach the vulnerable processing path.

The immediate impact is generally limited to resources accessible from the TechDocs backend or build container. Broader impact depends on container privileges, mounted resources, credentials, and network connectivity.

Treat documentation configuration as untrusted, enforce a strict allowlist and schema, and ensure no attacker-controlled value can reach command-execution behavior.

Combine boundary validation with isolated least-privilege build workers, restricted administrative permissions, minimal secrets, and tests that cover nested and unexpected configuration values.

An authenticated user generally needs permission to register or modify documentation sources or associated MkDocs configuration. Users without that capability may not reach the vulnerable processing path.

The immediate impact is generally limited to resources accessible from the TechDocs backend or build container. Broader impact depends on container privileges, mounted resources, credentials, and network connectivity.

Treat documentation configuration as untrusted, enforce a strict allowlist and schema, and ensure no attacker-controlled value can reach command-execution behavior.

Combine boundary validation with isolated least-privilege build workers, restricted administrative permissions, minimal secrets, and tests that cover nested and unexpected configuration values.

Find out what's already
exploitable in your codebase.