/

CVE-2026-106558

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization (CWE-502) in Backstage TechDocs

CVE-2026-106558

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(8.8)

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 high-severity unsafe deserialization vulnerability in Backstage TechDocs can allow Python objects to be imported and instantiated during documentation generation. An authenticated attacker who can register or influence an SCM-backed documentation source may bypass sanitization and achieve arbitrary code execution in the generator runtime.

A high-severity unsafe deserialization vulnerability in Backstage TechDocs can allow Python objects to be imported and instantiated during documentation generation. An authenticated attacker who can register or influence an SCM-backed documentation source may bypass sanitization and achieve arbitrary code execution in the generator runtime.

Affected context

The issue occurs in the @backstage/plugin-techdocs-node package when TechDocs processes SCM-backed documentation and improperly validates mapping-style markdown_extensions configuration. Risk is greater when the documentation generator runs with backend credentials, filesystem permissions, or access to internal network services.

The issue occurs in the @backstage/plugin-techdocs-node package when TechDocs processes SCM-backed documentation and improperly validates mapping-style markdown_extensions configuration. Risk is greater when the documentation generator runs with backend credentials, filesystem permissions, or access to internal network services.

Exploit preconditions

  • Attack surface: SCM-backed TechDocs documentation generation
  • Required access: An authenticated ability to register or influence a documentation source
  • Trigger point: Processing markdown_extensions configuration during generator execution
  • Why exploitation is possible: A supported mapping representation can bypass incomplete validation, allowing unsafe Python object handling before sanitization and generation complete
  • Attack surface: SCM-backed TechDocs documentation generation
  • Required access: An authenticated ability to register or influence a documentation source
  • Trigger point: Processing markdown_extensions configuration during generator execution
  • Why exploitation is possible: A supported mapping representation can bypass incomplete validation, allowing unsafe Python object handling before sanitization and generation complete

Why this happens

The vulnerability results from incomplete validation of a configuration structure that is passed into a Python-based documentation generator. When mapping-style markdown_extensions data is insufficiently constrained, deserialization or object-construction behavior may interpret attacker-influenced values as importable Python objects rather than inert configuration.

This maps to CWE-502: Deserialization of Untrusted Data, because untrusted or insufficiently trusted configuration is allowed to influence object creation in the generator runtime.

The vulnerability results from incomplete validation of a configuration structure that is passed into a Python-based documentation generator. When mapping-style markdown_extensions data is insufficiently constrained, deserialization or object-construction behavior may interpret attacker-influenced values as importable Python objects rather than inert configuration.

This maps to CWE-502: Deserialization of Untrusted Data, because untrusted or insufficiently trusted configuration is allowed to influence object creation in the generator runtime.

Potential impact

  • An attacker may execute arbitrary code in the documentation generator runtime
  • Backend credentials available to the generator could be exposed or misused
  • Files accessible to the generator process may be modified or disclosed
  • Internal network services may be contacted from the compromised runtime
  • Documentation generation workflows or downstream build environments could be disrupted
  • An attacker may execute arbitrary code in the documentation generator runtime
  • Backend credentials available to the generator could be exposed or misused
  • Files accessible to the generator process may be modified or disclosed
  • Internal network services may be contacted from the compromised runtime
  • Documentation generation workflows or downstream build environments could be disrupted

General mitigation guidance

Mitigation generally focuses on eliminating dynamic object construction from untrusted documentation configuration and reducing trust in SCM-controlled inputs.

Common defensive patterns include:

  • Permit only explicitly allowlisted markdown extension names and scalar settings
  • Reject mapping structures that do not conform to a strict schema before generator use
  • Use safe parsing and restricted import mechanisms instead of general-purpose object deserialization
  • Separate documentation generation from highly privileged backend credentials and sensitive network segments
  • Run generators with least-privilege filesystem, process, and network permissions
  • Treat repository documentation and configuration as untrusted content, even when sourced from approved SCM systems

Mitigation generally focuses on eliminating dynamic object construction from untrusted documentation configuration and reducing trust in SCM-controlled inputs.

Common defensive patterns include:

  • Permit only explicitly allowlisted markdown extension names and scalar settings
  • Reject mapping structures that do not conform to a strict schema before generator use
  • Use safe parsing and restricted import mechanisms instead of general-purpose object deserialization
  • Separate documentation generation from highly privileged backend credentials and sensitive network segments
  • Run generators with least-privilege filesystem, process, and network permissions
  • Treat repository documentation and configuration as untrusted content, even when sourced from approved SCM systems

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules identifying unsafe deserialization, dynamic imports, or object construction in documentation tooling
  • Code review checks for configuration values that can select Python classes, modules, or constructors
  • Schema and policy enforcement that rejects unexpected mapping keys or non-scalar extension values
  • Runtime monitoring for unexpected child processes, filesystem writes, module imports, or outbound connections from documentation generators
  • CI tests that exercise supported configuration representations, including mapping-style markdown_extensions values

Automated code review and dependency-analysis tools may help identify unsafe parser and validation patterns.

Organizations can look for this class of issue through:

  • Static analysis rules identifying unsafe deserialization, dynamic imports, or object construction in documentation tooling
  • Code review checks for configuration values that can select Python classes, modules, or constructors
  • Schema and policy enforcement that rejects unexpected mapping keys or non-scalar extension values
  • Runtime monitoring for unexpected child processes, filesystem writes, module imports, or outbound connections from documentation generators
  • CI tests that exercise supported configuration representations, including mapping-style markdown_extensions values

Automated code review and dependency-analysis tools may help identify unsafe parser and validation patterns.

Sources

SourceLink
github.comgithub.com/backstage/backstage/commit/32723a0fe4e12ed80535fc65d5331765c55aa91b
github.comgithub.com/backstage/backstage/commit/944edb51c8524d3664b18f2d57ba101b1c93b709
github.comgithub.com/backstage/backstage/commit/f18e9abcc6051491862b15e4fc60e69f8d52310c
github.comgithub.com/backstage/backstage/releases/tag/v1.50.7
github.comgithub.com/backstage/backstage/releases/tag/v1.54.9
github.comgithub.com/backstage/backstage/releases/tag/v1.55.2
github.comgithub.com/backstage/backstage/security/advisories/GHSA-qmw3-745m-w99g

Frequently asked

questions

It can be exploitable through the Backstage application when an authenticated user can register or influence an SCM-backed documentation source. The exact exposure depends on access controls and deployment architecture.

Authentication alone may not be sufficient; the attacker must also have a permitted path to control or influence documentation source content or configuration processed by TechDocs.

Constrain markdown extension configuration to a strict allowlist and safe schema, and prevent untrusted values from selecting or instantiating Python objects.

Treat repository-controlled documentation as untrusted input, test every supported configuration representation, apply least privilege to generator runtimes, and enforce static analysis and policy checks for unsafe deserialization or dynamic imports.

It can be exploitable through the Backstage application when an authenticated user can register or influence an SCM-backed documentation source. The exact exposure depends on access controls and deployment architecture.

Authentication alone may not be sufficient; the attacker must also have a permitted path to control or influence documentation source content or configuration processed by TechDocs.

Constrain markdown extension configuration to a strict allowlist and safe schema, and prevent untrusted values from selecting or instantiating Python objects.

Treat repository-controlled documentation as untrusted input, test every supported configuration representation, apply least privilege to generator runtimes, and enforce static analysis and policy checks for unsafe deserialization or dynamic imports.

Find out what's already
exploitable in your codebase.