Oct 7, 2026·7 min read·30 visits
An authenticated user authorized to view at least one TechDocs site can craft a request with directory traversal sequences to bypass the Backstage permission framework and read private documentation from other entities.
An authorization bypass vulnerability in the Spotify Backstage TechDocs backend plugin allows authenticated attackers with access to at least one valid TechDocs site to read arbitrary static documentation from other entities. This occurs due to un-sanitized relative subpaths passing directly to external storage drivers.
Spotify Backstage is an open-source framework used to build centralized developer portals. The TechDocs plugin (@backstage/plugin-techdocs-backend) is responsible for serving technical documentation directly within the Backstage portal. In standard deployment scenarios, documentation is written in Markdown, generated as static assets (HTML, CSS, and images) using tools like MkDocs, and then hosted on external storage systems like Amazon S3, Google Cloud Storage, or Azure Blob Storage.
When the Backstage permission framework is enabled, access to specific entity documentation is regulated through access control policies. When an authenticated developer attempts to view a document, the application performs permission checks using the catalog entity details (namespace, kind, and name). This design prevents unauthorized developers from accessing proprietary designs, infrastructure schemas, or internal API structures.
A vulnerability in the routing component of @backstage/plugin-techdocs-backend breaks this isolation model. When configured with an external TechDocs builder and an external storage provider, the application fails to validate directory containment of requested subpaths. This exposes an attack surface where low-privileged authenticated users can view restricted files from unrelated entities, provided they have access to at least one valid TechDocs repository.
The core flaw resides in how Backstage routes requests for static TechDocs files. The backend application implements an Express route handler to serve these assets under /static/docs/:namespace/:kind/:name.
During request processing, the Backstage permission middleware extracts the parsed parameter values (such as namespace, kind, and name) to execute access authorization lookups. If the user is authorized to read the specified entity, the request is passed to the underlying storage publisher. However, the application uses the raw request path (req.path), which contains the subpath of the requested file, without sanitizing it for path traversal vectors.
An attacker can supply URL-encoded traversal sequences like %2e%2e within the subpath portion of the request. Since the route parameters still map to a valid, permitted entity, the authorization check succeeds. The downstream storage client receives the un-sanitized path containing traversal sequences, which are decoded and normalized during interaction with the external storage provider (e.g., S3 or GCS). This shifts the target file lookup outside of the authorized entity's directory into an unauthorized peer directory.
The official fix, introduced in commit bf6bbf7326ada7d96d7b2c4ebc4a71546106f311, addresses the root cause by validating the containment of requested subpaths before checking permissions or fetching files. It introduces the helper function isPathWithinEntity to check that the path does not escape the parent entity context.
Below is the security validation logic added in router.ts:
import path from 'node:path';
// Helper to evaluate if the request path stays within the entity boundary
const isPathWithinEntity = (requestPath: string): boolean => {
// Decode URL encoding first to catch encoded patterns like %2e%2e
const relativePath = path.posix.normalize(
decodeURI(requestPath).replace(/^\/+/, ''),
);
// Ensure the path does not resolve to a parent directory
return relativePath !== '..' && !relativePath.startsWith('../');
};This verification functions as follows:
decodeURI: Decodes URL-encoded sequences like %2e to . and %2f to /. This ensures the validation detects hidden traversal characters.path.posix.normalize: Resolves relative sequences such as . and ... For example, entity-a/../entity-b resolves to entity-b, which would then fail the containment check if normalized from the root... and does not start with ../.While this fix successfully mitigates standard traversal attacks, several implementation considerations exist:
path.posix.normalize. On Windows-based systems where Backstage is run locally with the local file publisher, native Windows path separators (\) are resolved by the OS. Since POSIX normalization does not handle backslashes, a path utilizing Windows separators (e.g., ..%5c..%5c) might bypass POSIX normalization but still cause traversal when accessed via the local Windows filesystem.isPathWithinEntity using decodeURI. If there is an upstream proxy (e.g., NGINX, Cloudflare, or AWS Application Load Balancer) that normalizes double URL-encoded sequences, or if downstream drivers perform extra decodes, double-encoded traversal sequences (%252e%252e) might bypass this single-stage filter.To execute this attack, an attacker must satisfy several prerequisites. First, they must possess valid credentials to authenticate to the Backstage developer portal. Second, the Backstage portal must have the permission framework enabled, utilize an external TechDocs builder, and fetch documentation from an external storage provider. Finally, the attacker must have read permissions for at least one catalog entity that hosts TechDocs.
In a typical scenario, the attacker identifies a permitted entity (entity-a) and a target restricted entity (entity-b). The attacker then constructs a GET request targeting the /api/techdocs/static/docs/ routing endpoint. By appending a URL-encoded traversal string (%2e%2e/entity-b/index.html) to the authorized endpoint, the attacker initiates the exploit.
An example HTTP request demonstrating this bypass:
GET /api/techdocs/static/docs/default/component/entity-a/%2e%2e/entity-b/index.html HTTP/1.1
Host: backstage.internal.net
Authorization: Bearer <valid_low_privilege_token>
User-Agent: Mozilla/5.0
Accept: text/html,application/xhtml+xmlWhen this request is processed:
:name to entity-a.default/component/entity-a.entity-a, the system permits the request.default/component/entity-b/index.html, returning unauthorized internal information to the attacker.The impact of this vulnerability is classified as Medium, with a CVSS 3.1 score of 6.5. This classification represents high confidentiality impact but zero direct impact on integrity or availability. The vulnerability does not allow write access, meaning attackers cannot alter documentation files, upload malicious assets, or achieve remote code execution on the underlying server.
Despite the Medium severity rating, the confidentiality risks inside corporate developer portals are significant. Technical documentation within developer portals frequently contains sensitive system architecture diagrams, internal endpoint definitions, database models, internal service dependencies, and potentially hardcoded non-production credentials or API keys.
Exposing internal system maps and service dependencies provides high-value intelligence to malicious actors. An attacker can use this information to map the internal attack surface of an organization, identifying high-value targets, security weaknesses, and authentication boundaries for secondary exploits.
The recommended path of remediation is upgrading the affected packages to their patched versions. Specifically, @backstage/plugin-techdocs-backend must be updated to version 2.2.4 or higher, and the core backstage framework must be updated to version 1.54.6 or higher.
To update these packages in your workspace, run the following commands:
# Upgrade the plugin in your backend workspace
yarn workspace backend upgrade @backstage/plugin-techdocs-backend@^2.2.4
# Alternatively, execute the core CLI upgrade process
yarn backstage-cli versions:bumpIn situations where upgrading cannot be executed immediately, administrators should implement temporary network-level and application-level mitigations. Web Application Firewalls (WAFs) should be configured with custom rules to inspect inbound URL paths targeting the /api/techdocs/static/docs/ endpoint. Any request containing encoded traversal sequences (%2e%2e, %2f, %5c, or native ..) should be blocked immediately.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@backstage/plugin-techdocs-backend Spotify | < 2.2.4 | 2.2.4 |
backstage Spotify | < 1.54.6 | 1.54.6 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-22 |
| Attack Vector | Network |
| CVSS v3.1 Score | 6.5 |
| EPSS Score | 0.00287 |
| Impact | High Confidentiality |
| Exploit Status | poc |
| KEV Status | Not Listed |
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
NATS Server prior to versions 2.12.8 and 2.14.3 contains an incorrect authorization vulnerability (CWE-863) in its message tracing subsystem. When evaluating whether a connection is permitted to publish trace events to a destination subject specified in the Nats-Trace-Dest header, the server only checks standard client permissions and omits permission checks for leaf node connections. This allows a connected leaf node operator with restricted publishing privileges to emit internal trace events to unauthorized subjects and suppress standard message delivery using the Nats-Trace-Only header.
CVE-2026-63341 is a high-severity Denial of Service (DoS) vulnerability in the Aedes MQTT broker for Node.js affecting all versions prior to 1.1.1. The flaw stems from missing input validation on the hierarchical depth of incoming MQTT topic strings before they are passed to the underlying topic-matching engine, qlobber. Because qlobber enforces a hardcoded limit of 100 topic levels and throws a synchronous exception when this threshold is exceeded, an attacker can send a single MQTT packet containing 101 or more forward-slash-separated levels to trigger an uncaught exception that immediately terminates the Node.js broker process.
CVE-2026-61725 is a path traversal vulnerability (CWE-22) in the sevenz-rust2 Cargo package prior to version 0.21.1. The vulnerability occurs because the decompression utility fails to validate or sanitize archive entry filenames before joining them with the destination directory path via std::path::Path::join. An attacker who supplies a crafted 7z archive containing parent directory traversal sequences or absolute paths can write or overwrite arbitrary files on the host filesystem with the privileges of the extracting process.
CVE-2026-77309 (GHSA-jrjx-9jjw-747m) is a high-severity unauthenticated remote code execution vulnerability affecting NASA-AMMOS AIT-GUI versions 1.0.0 through 2.5.0. The flaw results from chaining an incomplete file cleanup error in the telemetry query endpoint (/tlm/query) with a directory traversal flaw in the script execution endpoint (/script/run). An attacker on an adjacent network can stage arbitrary Python statements into a static file on disk and execute that file under the privileges of the AIT-GUI web server process.
A vulnerability classified under CWE-116 (Improper Encoding or Escaping of Output) exists in memtomem-stm versions 0.1.0 through 0.1.33. The software acts as a Model Context Protocol (MCP) short-term memory proxy gateway for AI agent architectures. When surfacing retrieved memories and scratchpad items into downstream Large Language Model (LLM) context envelopes, the SurfacingFormatter component fails to properly sanitize untrusted memory attributes. An attacker with the ability to plant untrusted content into the agent's long-term or working memory store can inject arbitrary structural delimiters, close the <surfaced-memories> XML boundary prematurely, visually obscure instructions using Unicode bidirectional overrides, and execute stored prompt injection attacks against downstream LLM agents.
CVE-2026-77331 (GHSA-72jh-722p-rqr3) is a concurrency and session-state synchronization vulnerability in memtomem-stm, a short-term memory proxy gateway for AI agents. In versions 0.1.2 prior to 0.1.34, concurrent Model Context Protocol (MCP) Remote Procedure Call (RPC) failures or mid-flight task cancellations can initiate duplicate reconnect loops and permit dirty or cancelled transport sessions to be reused. This deficiency results in session-state integrity loss and local service degradation.