Backstage: Code Execution in the TechDocs Build via Gaps in the `mkdocs.yml` Allowlist
The mkdocs.yml sanitizer in Backstage TechDocs filters top-level keys only. An authenticated user who can register an entity with a TechDocs annotation runs operating system commands in the build container through allowed keys.
Advisory ID: TP-2026-171
Product: Backstage (open-source framework for developer portals, originally by Spotify)
Vulnerability type: Permissive List of Allowed Inputs (CWE-183, CWE-470)
CVE: CVE-2026-106510
CVSS 3.1: 7.7 (High) · CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L
Vendor advisory: GHSA-4488-j8vj-vqqv
Affected versions: @backstage/plugin-techdocs-node < 1.14.6 and 1.15.0 to < 1.15.4
Fixed in: @backstage/plugin-techdocs-node 1.14.6 and 1.15.4
Reported: 12 July 2026
Summary
Backstage is an open-source framework for developer portals whose TechDocs plugin builds documentation from registered repositories with MkDocs. After GHSA-6jr7-99pf-8vgf and GHSA-928r-fm4v-mvrw, sanitizeMkdocsYml rewrites mkdocs.yml and keeps only keys from an allowlist. The check stops at the top level, so markdown_extensions, theme and extra_templates pass through with arbitrary content. An authenticated user who can register an entity with a TechDocs annotation runs operating system commands in the build container. Tested on Backstage v1.52.1.
Root cause
sanitizeMkdocsYml rebuilds the configuration and copies every allowed top-level key verbatim (plugins/techdocs-node/src/stages/generate/mkdocsPatchers.ts:255-303). ALLOWED_MKDOCS_KEYS contains markdown_extensions, theme and extra_templates as whole values without inspecting their content (plugins/techdocs-node/src/stages/generate/helpers.ts:274-311). A plantuml_markdown entry with plantuml_cmd reaches Popen(self.config['plantuml_cmd'].split(' ')) in the build image (plantuml_markdown.py:499), while theme.custom_dir and extra_templates render attacker files through non-sandboxed Jinja2 (MkDocs commands/build.py:124). The generator reads the repository's mkdocs.yml, calls the sanitizer and then starts the build in the spotify/techdocs container (plugins/techdocs-node/src/stages/generate/techdocs.ts:110, :119, :180-195). With the default techdocs.builder: local, every request for the documentation of a registered entity triggers this build.
Proof of Concept
# mkdocs.yml in the registered repository
site_name: docs
plugins:
- techdocs-core
markdown_extensions:
- plantuml_markdown:
plantuml_cmd: "/bin/sh -c id>/output/poc.txt"
# docs/index.md contains any plantuml code block
GET /api/techdocs/sync/default/component/<name> HTTP/1.1
Authorization: Bearer <user>
The sanitizer leaves markdown_extensions untouched, and plantuml_markdown starts the configured command when it renders the code block. The file poc.txt then sits in the published documentation and contains uid=1000 gid=1000 groups=1000.
Impact
- Execution of arbitrary operating system commands in the TechDocs build container by any user who can register entities.
- Manipulation of the built documentation that the portal serves to other users.
- Network access from the build container to internal services of the Backstage host.
References
- GHSA-4488-j8vj-vqqv
- CVE-2026-106510
- Fix release: @backstage/plugin-techdocs-node 1.15.4
- Fix release: @backstage/plugin-techdocs-node 1.14.6
- Related,
themeconfiguration: GHSA-8w7q-29mw-gf5c (CVE-2026-106509) - Related, sanitizer bypass: GHSA-p75x-jh7p-ppcx (CVE-2026-106505)
- Original fix: GHSA-6jr7-99pf-8vgf, GHSA-928r-fm4v-mvrw
Is Something Like This in Your Software?
Our team discovered this vulnerability during its work. Have your applications reviewed by the same specialists, with a penetration test from turingpoint.
