# CVE-2021-43776: Backstage plugin-auth-backend reflected cross-site scripting

Source: https://junglewise.ai/threats/cve-2021-43776-backstage-plugin-auth-backend-reflected-cross-site-scripting  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-12-01. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2021-43776 · Severity: low · CVSS 3.1 · Published 2021-12-01

Backstage is a platform for building and managing internal developer portals. The authentication backend plugin contains a reflected cross-site scripting (XSS) vulnerability that allows an attacker to trick a user into visiting a malicious URL, potentially exfiltrating access tokens or other sensitive secrets from the user's browser. While default Content Security Policy settings provide some protection, deployments with disabled policies are at risk.

Technologies: [Backstage Plugin-Auth-Backend](https://junglewise.ai/threats/technologies/plugin-auth-backend), [@backstage/plugin-auth-backend (npm)](https://junglewise.ai/threats/technologies/backstage-plugin-auth-backend). Vendors: [Backstage](https://junglewise.ai/threats/vendors/backstage), [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2021-43776 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-43776 being exploited in the wild.

**How severe is CVE-2021-43776?** Low severity, with a CVSS score of 3.1, published 1 December 2021.

**Which products and versions are affected?** Backstage Plugin-Auth-Backend < 0.4.9; @backstage/plugin-auth-backend (npm) SEMVER:introduced=0,fixed=0.4.9.

**Is there a fix for CVE-2021-43776?** Yes. @backstage/plugin-auth-backend (npm): upgrade to 0.4.9 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-43776 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-43776?** Check whether you run Backstage Plugin-Auth-Backend or @backstage/plugin-auth-backend (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- @backstage/plugin-auth-backend (npm): upgrade to 0.4.9 or later

  ```sh
  npm install @backstage/plugin-auth-backend@0.4.9
  ```


## Technical details

This is a reflected XSS vulnerability (CWE-79) in the @backstage/plugin-auth-backend library, caused by improper neutralization of script-related HTML tags in user input. The vulnerability requires user interaction (clicking a malicious link) and affects network-accessible deployments. An attacker can craft a vulnerable URL containing unescaped input that executes arbitrary JavaScript in the victim's browser, allowing token theft or session hijacking. The attack depends on Content Security Policy not being properly enforced. Patches are available in version 0.4.9 and later.

## Affected products

- Backstage plugin-auth-backend < 0.4.9

## Identifiers

- CVE-2021-43776
- GHSA-w7fj-336r-vw49

## Timeline

- 2021-11-26: disclosed: Vulnerability disclosed via GitHub Security Advisory
- 2021-12-01: patched: Patch released in version 0.4.9

## References

- [https://github.com/backstage/backstage/security/advisories/GHSA-w7fj-336r-vw49](https://github.com/backstage/backstage/security/advisories/GHSA-w7fj-336r-vw49)

## Related threats

- [Backstage plugin-auth-backend OAuth redirect_uri allowlist bypass](https://junglewise.ai/threats/cve-2026-73563-backstage-plugin-auth-backend-oauth-redirect-uri-allowlist-bypass)
- [Backstage auth-backend SSRF in CIMD metadata fetch](https://junglewise.ai/threats/cve-2026-32236-backstage-auth-backend-ssrf-in-cimd-metadata-fetch)
- [Backstage Auth Backend OAuth redirect URI allowlist bypass](https://junglewise.ai/threats/cve-2026-32235-backstage-auth-backend-oauth-redirect-uri-allowlist-bypass)
