Skip to main content
Menu
Advisories

AsyncAPI definition widget resolved external references from viewers' browsers

GHSA-XX8F-JMM6-8754Published Updated GitHub

Description

The @backstage/plugin-api-docs AsyncAPI definition widget resolved absolute external http/https $ref URLs found in AsyncAPI definitions from viewers' browsers, without an allowlist or opt-in.

Details

AsyncAPI documents are supplied as catalog kind: API entity content. The default AsyncAPI definition widget passed these definitions to the AsyncAPI parser with default resolvers that fetch() any absolute external http/https $ref URL embedded in the document. In deployments that allow users to register catalog entities, a document containing such a reference caused every viewer's browser to issue a request to the referenced URL when the entity was viewed. Viewing the entity is required (user interaction), and the request is made with default fetch options: a GET request that carries no credentials cross-origin and whose response is subject to the browser's CORS policy.

Impact

Anyone able to register catalog entities in a default deployment could cause viewers' browsers to send blind, unauthenticated GET requests to attacker-chosen URLs, and disclose viewers' source IP addresses and confirmation that the entity was viewed. No confidentiality or integrity impact on Backstage-hosted data is demonstrated: cross-origin responses are not readable without a CORS opt-in, and no credentials are attached.

Patches

External references are no longer resolved by default; the widget now leaves external references unresolved unless the resolvers prop is provided. References to whole external documents still render, with a placeholder naming the document that was not loaded; references that point into an external document (using a # fragment) fail to render with an error naming the reference.

Affected versions: @backstage/plugin-api-docs >= 0.8.5, < 0.14.7. Fixed in 0.14.7 (Backstage release 1.57.0), 0.14.8 (Backstage release 1.56.6), and 0.14.9 (Backstage release 1.57.1).

Workarounds

Restrict who can register catalog entities (permissions, catalog rules, or location allowlists), or provide custom reference resolvers that only resolve trusted hosts.

References

Affected versions

References

GitHub · backstage/backstage