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

PACKAGE
Advisory Identifier: GHSA-qc4v-xq2m-65wc
Advisory Summary

CVE-2024-47762 is a MODERATE (CVSS 5.8) unexpected visibility of environment variable vulnerability (CWE-440: Expected Behavior Violation) affecting @backstage/plugin app backend libraries in the npm ecosystem. The issue involves unexpected visibility of environment variable configurations in @backstage/plugin-app-backend. Remediation is available by upgrading affected packages to version 0.3.75.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

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

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-qc4v-xq2m-65wc CVE-2024-47762 MODERATE Unexpected visibility of environment variable configurations in @backstage/plugin-app-backend

CVE-2024-47762 at a Glance

CVE Identifier CVE-2024-47762
GHSA Identifier GHSA-qc4v-xq2m-65wc
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-440: Expected Behavior Violation
Affected Product @backstage/plugin app backend
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.8

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

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

How to Fix CVE-2024-47762

To remediate this vulnerability, upgrade all affected @backstage/plugin app backend 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/plugin-app-backend fixed: 0.3.75
npm install @backstage/plugin-app-backend@0.3.75
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/plugin-app-backend

How to Check if You Are Affected

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

npm ls @backstage/plugin-app-backend

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

Note: The npm ls @backstage/plugin-app-backend 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-440: Expected Behavior Violation, where a feature, api, or function does not perform according to its specification. In @backstage/plugin app backend, 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

### Impact Configuration supplied through `APP_CONFIG_*` environment variables, for example `APP_CONFIG_backend_listen_port=7007`, where unexpectedly ignoring the visibility defined in configuration schema. This occurred even if the configuration schema specified that they should have backend or secret visibility. This was an intended feature of the `APP_CONFIG_*` way of supplying configuration, but now clearly goes against the expected behavior of the configuration system. This behavior leads to a risk of potentially exposing sensitive configuration details intended to remain private or restricted to backend processes. ### Patches The issue has been resolved in version `0.3.75` of the `@backstage/plugin-app-backend` package. Users are encouraged to upgrade to this version to mitigate the vulnerability. ### Workarounds As a temporary measure, avoid supplying secrets using the `APP_CONFIG_` configuration pattern. Consider alternative methods for setting secrets, such as the [environment substitution](https://backstage.io/docs/conf/writing#environment-variable-substitution) available for Backstage configuration. ### References If you have any questions or comments about this advisory: Open an issue in the [Backstage repository](https://github.com/backstage/backstage) Visit our Discord, linked to in [Backstage README](https://github.com/backstage/backstage)

CVE-2024-47762 Affected @backstage/plugin app backend Versions

1 component(s)
Fixed Versions:
0.3.75
Product / Package Ecosystem Affected Versions Fixed Version
@backstage/plugin-app-backend
npm
< 0.3.75
0.3.75

References

Frequently Asked Questions

What is CVE-2024-47762?
CVE-2024-47762 is a security vulnerability in @backstage/plugin app backend involving Unexpected visibility of environment variable configurations in @backstage/plugin-app-backend under CWE-440: Expected Behavior Violation.
Which @backstage/plugin app backend versions are affected?
Affected versions include releases prior to 0.3.75 across affected packages: @backstage/plugin-app-backend.
What version fixes CVE-2024-47762?
Upgrading to 0.3.75 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @backstage/plugin-app-backend affected?
Yes, @backstage/plugin-app-backend is affected in releases prior to 0.3.75. Upgrade your dependency to 0.3.75 or later.
What is the CVSS score of CVE-2024-47762?
CVE-2024-47762 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N.
What CWE is associated with CVE-2024-47762?
CVE-2024-47762 is classified under CWE-440: Expected Behavior Violation (A feature, API, or function does not perform according to its specification.).
How can I check npm dependencies for CVE-2024-47762?
Run the dependency tree command: 'npm ls @backstage/plugin-app-backend'. 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-qc4v-xq2m-65wc",
  "modified" : "2024-10-03T18:41:10Z",
  "published" : "2024-10-03T16:51:24Z",
  "aliases" : [ "CVE-2024-47762" ],
  "summary" : "Unexpected visibility of environment variable configurations in @backstage/plugin-app-backend",
  "details" : "### Impact\n\nConfiguration supplied through `APP_CONFIG_*` environment variables, for example `APP_CONFIG_backend_listen_port=7007`, where unexpectedly ignoring the visibility defined in configuration schema. This occurred even if the configuration schema specified that they should have backend or secret visibility. This was an intended feature of the `APP_CONFIG_*` way of supplying configuration, but now clearly goes against the expected behavior of the configuration system. This behavior leads to a risk of potentially exposing sensitive configuration details intended to remain private or restricted to backend processes.\n\n### Patches\n\nThe issue has been resolved in version `0.3.75` of the `@backstage/plugin-app-backend` package. Users are encouraged to upgrade to this version to mitigate the vulnerability.\n\n### Workarounds\n\nAs a temporary measure, avoid supplying secrets using the `APP_CONFIG_` configuration pattern. Consider alternative methods for setting secrets, such as the [environment substitution](https://backstage.io/docs/conf/writing#environment-variable-substitution) available for Backstage configuration.\n\n### References\n\nIf you have any questions or comments about this advisory:\n\nOpen an issue in the [Backstage repository](https://github.com/backstage/backstage)\nVisit our Discord, linked to in [Backstage README](https://github.com/backstage/backstage)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/plugin-app-backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.3.75"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/security/advisories/GHSA-qc4v-xq2m-65wc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-47762"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/commit/323e6129073c5cb4cc106a1239eaec31a129554f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/backstage/backstage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-440" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-10-03T16:51:24Z",
    "nvd_published_at" : "2024-10-03T18:15:05Z"
  }
}