CVE-2026-106509 Overview
Backstage is an open framework for building developer portals. CVE-2026-106509 affects the @backstage/plugin-techdocs-node package through improper validation of mkdocs theme configuration in TechDocs. When TechDocs builds documentation locally or inside a container, a user with write access to a registered repository can inject configuration values into mkdocs.yml that trigger arbitrary code execution during the build process. The flaw is categorized as Code Injection [CWE-94]. Fixed versions are 1.14.6 and 1.15.4.
Critical Impact
Authenticated users with repository write access can execute arbitrary code on the TechDocs build host, impacting confidentiality, integrity, and availability of the documentation pipeline.
Affected Products
- Backstage @backstage/plugin-techdocs-node prior to 1.14.6
- Backstage @backstage/plugin-techdocs-node prior to 1.15.4
- Backstage distributions prior to releases v1.50.5 and v1.54.6
Discovery Timeline
- 2026-10-06 - CVE-2026-106509 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-106509
Vulnerability Analysis
TechDocs renders repository-hosted Markdown via mkdocs. During the build stage, the plugin reads mkdocs.yml from the registered source repository and passes configuration values to the mkdocs process. Insufficient validation of the theme block and nested markdown_extensions configurations allowed attacker-controlled fields to flow into executable contexts invoked by mkdocs plugins. A documented example is the plantuml_cmd option, which specifies a shell command executed during rendering. Any repository contributor with commit access could land a crafted mkdocs.yml that executes code on the TechDocs builder when documentation is generated.
Root Cause
The plugins/techdocs-node/src/stages/generate/helpers.ts module maintained an allowlist of acceptable top-level mkdocs keys but did not enforce an allowlist on nested theme configuration or deny dangerous sub-keys inside extension configurations. Attacker-supplied values in these nested structures reached mkdocs plugins that interpret them as commands or executable paths, producing a classic code injection sink [CWE-94].
Attack Vector
Exploitation requires write access to a repository already registered as a TechDocs source and a TechDocs deployment configured to build documentation locally or in a container. The attacker commits a crafted mkdocs.yml containing dangerous options (for example a markdown_extensions entry supplying plantuml_cmd). When the TechDocs builder processes the commit, mkdocs invokes the supplied command, executing attacker code in the build environment.
// Patch excerpt: plugins/techdocs-node/src/stages/generate/helpers.ts
'google_analytics',
]);
+/**
+ * Denylist of configuration keys that must be stripped from extension
+ * configurations nested within `markdown_extensions`.
+ */
+export const DANGEROUS_EXTENSION_CONFIG_KEYS = new Set(['plantuml_cmd']);
+
+/**
+ * Allowlist of theme configuration keys supported by TechDocs.
+ *
+ * @see https://squidfunk.github.io/mkdocs-material/setup/
+ */
+export const ALLOWED_THEME_KEYS = new Set([
+ 'name',
+ 'font',
+ 'icon',
+ 'logo',
+ 'favicon',
+ 'language',
+ 'direction',
+ 'palette',
+ 'features',
+]);
+
/**
* Validating mkdocs config file for incorrect/insecure values
* Throws on invalid configs
Source: Backstage commit 02cd7cdbb18b687446277b5602adaee7f1d53cbb
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-106509
Indicators of Compromise
- Unexpected changes to mkdocs.yml adding plantuml_cmd or other command-style keys under markdown_extensions.
- theme blocks containing keys outside the supported mkdocs-material set (anything beyond name, font, icon, logo, favicon, language, direction, palette, features).
- TechDocs builder processes spawning unexpected child processes (shells, interpreters, network clients) during documentation generation.
Detection Strategies
- Scan all registered TechDocs repositories for mkdocs.yml files that reference plantuml_cmd or declare custom executables within extension configurations.
- Instrument the TechDocs build container with process-execution logging and alert on non-mkdocs child processes.
- Audit repository access logs to correlate mkdocs.yml modifications with the committer identity for post-incident attribution.
Monitoring Recommendations
- Forward TechDocs builder process telemetry and container runtime logs to a central analytics platform for behavioral baselining.
- Alert on outbound network connections initiated from documentation build pods, which should normally be scoped to artifact storage.
- Track the deployed version of @backstage/plugin-techdocs-node across environments and alert when it falls below 1.14.6 or 1.15.4.
How to Mitigate CVE-2026-106509
Immediate Actions Required
- Upgrade @backstage/plugin-techdocs-node to version 1.14.6 or 1.15.4, or deploy Backstage release v1.50.5 or v1.54.6.
- Review every registered TechDocs repository for malicious mkdocs.yml modifications introduced before patching.
- Rotate any secrets or tokens that were available in the TechDocs build environment.
Patch Information
The fix is delivered in Backstage releases v1.50.5 and v1.54.6. The patch introduces ALLOWED_THEME_KEYS and DANGEROUS_EXTENSION_CONFIG_KEYS in helpers.ts and applies them within mkdocsPatchers.ts to strip disallowed values before mkdocs executes. Full technical context is available in GitHub Security Advisory GHSA-8w7q-29mw-gf5c.
Workarounds
- Switch TechDocs to a pre-built documentation workflow where mkdocs runs in CI under repository owner control rather than on the Backstage builder.
- Restrict repository write access to trusted maintainers and enforce mandatory code review for mkdocs.yml changes.
- Run the TechDocs builder inside an ephemeral, network-restricted container with no access to production secrets.
# Upgrade the vulnerable package to a fixed release
yarn up @backstage/plugin-techdocs-node@^1.15.4
# or for the 1.14.x line
yarn up @backstage/plugin-techdocs-node@^1.14.6
# Verify the installed version
yarn why @backstage/plugin-techdocs-node
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

