Vulnerabilities in pkg:npm/@backstage/backend-app-api

PACKAGE
Advisory Identifier: GHSA-86rg-pf4c-5grg
Advisory Summary

CVE-2023-6944 is a HIGH (CVSS 7.3) @backstage/backend-app-api leaks gitlab access tokens vulnerability (CWE-209: Generation of Error Message Containing Sensitive Information) affecting @backstage/backend app api libraries in the npm ecosystem. The issue involves @backstage/backend-app-api leaks gitlab access tokens. Remediation is available by upgrading affected packages to version 0.5.9-next.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@backstage/backend-app-api

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@backstage/backend-app-api. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-86rg-pf4c-5grg CVE-2023-6944 HIGH @backstage/backend-app-api leaks GitLab access tokens

CVE-2023-6944 at a Glance

CVE Identifier CVE-2023-6944
GHSA Identifier GHSA-86rg-pf4c-5grg
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-209: Generation of Error Message Containing Sensitive Information
Affected Product @backstage/backend app api
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2023-6944

To remediate this vulnerability, upgrade all affected @backstage/backend app api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@backstage/backend-app-api fixed: 0.5.9-next.1
npm install @backstage/backend-app-api@0.5.9-next.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @backstage/backend-app-api

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-6944, inspect your project dependencies using npm:

npm ls @backstage/backend-app-api

Analyze the terminal output to locate any version of @backstage/backend app api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.9-next.1), your application is affected.

Note: The npm ls @backstage/backend-app-api command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-209: Generation of Error Message Containing Sensitive Information, where the product generates an error message that includes sensitive information about its environment, users, or associated data. In @backstage/backend app api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A flaw was found in the Red Hat Developer Hub (RHDH). The catalog-import function leaks GitLab access tokens on the frontend when the base64 encoded GitLab token includes a newline at the end of the string. The sanitized error can display on the frontend, including the raw access token. Upon gaining access to this token and depending on permissions, an attacker could push malicious code to repositories, delete resources in Git, revoke or generate new keys, and sign code illegitimately.

CVE-2023-6944 Affected @backstage/backend app api Versions

1 component(s)
Fixed Versions:
0.5.9-next.1
Product / Package Ecosystem Affected Versions Fixed Version
@backstage/backend-app-api
npm
< 0.5.9-next.1
0.5.9-next.1

References

Frequently Asked Questions

What is CVE-2023-6944?
CVE-2023-6944 is a security vulnerability in @backstage/backend app api involving @backstage/backend-app-api leaks GitLab access tokens under CWE-209: Generation of Error Message Containing Sensitive Information.
Which @backstage/backend app api versions are affected?
Affected versions include releases prior to 0.5.9-next.1 across affected packages: @backstage/backend-app-api.
What version fixes CVE-2023-6944?
Upgrading to 0.5.9-next.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @backstage/backend-app-api affected?
Yes, @backstage/backend-app-api is affected in releases prior to 0.5.9-next.1. Upgrade your dependency to 0.5.9-next.1 or later.
What is the CVSS score of CVE-2023-6944?
CVE-2023-6944 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-6944?
CVE-2023-6944 is classified under CWE-209: Generation of Error Message Containing Sensitive Information (The product generates an error message that includes sensitive information about its environment, users, or associated data.).
How can I check npm dependencies for CVE-2023-6944?
Run the dependency tree command: 'npm ls @backstage/backend-app-api'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-86rg-pf4c-5grg",
  "modified" : "2025-10-01T20:11:27Z",
  "published" : "2024-01-04T12:30:20Z",
  "aliases" : [ "CVE-2023-6944" ],
  "summary" : "@backstage/backend-app-api leaks GitLab access tokens",
  "details" : "A flaw was found in the Red Hat Developer Hub (RHDH). The catalog-import function leaks GitLab access tokens on the frontend when the base64 encoded GitLab token includes a newline at the end of the string. The sanitized error can display on the frontend, including the raw access token. Upon gaining access to this token and depending on permissions, an attacker could push malicious code to repositories, delete resources in Git, revoke or generate new keys, and sign code illegitimately.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/backend-app-api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.9-next.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-6944"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/issues/21503"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/pull/21582"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/commit/0382db60f6c8e8715a702bde6408ad10a48d8e11"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHBA-2024:5869"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/security/cve/CVE-2023-6944"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2255204"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/backstage/backstage"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/blob/master/docs/releases/v1.21.0-next.2-changelog.md"
  }, {
    "type" : "WEB",
    "url" : "https://www.cve.org/CVERecord?id=CVE-2023-6944"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-209" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-05T17:59:41Z",
    "nvd_published_at" : "2024-01-04T10:15:11Z"
  }
}