CVE-2024-45816: @backstage/plugin techdocs backend Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-39v3-f278-vj3g
CVSS 7.7
CWE-23 CWE-22
Published
Advisory Summary

CVE-2024-45816 is a HIGH (CVSS 7.7) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting @backstage/plugin techdocs backend libraries in the npm ecosystem. The issue involves @backstage/plugin-techdocs-backend storage bucket directory traversal vulnerability. Remediation is available by upgrading affected packages to version 1.10.13.

CVE-2024-45816 at a Glance

CVE Identifier CVE-2024-45816
GHSA Identifier GHSA-39v3-f278-vj3g
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-23: Relative Path Traversal
Affected Product @backstage/plugin techdocs backend
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.7

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:N/S:C/C:H/I:N/A:N).

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

How to Fix CVE-2024-45816

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

How to Check if You Are Affected

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

npm ls @backstage/plugin-techdocs-backend

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

Note: The npm ls @backstage/plugin-techdocs-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-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In @backstage/plugin techdocs 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 When using the AWS S3 or GCS storage provider for TechDocs it is possible to access content in the entire storage bucket. This can leak contents of the bucket that are not intended to be accessible, as well as bypass permission checks in Backstage. ### Patches This has been fixed in the 1.10.13 release of the `@backstage/plugin-techdocs-backend` package. ### 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-45816 Affected @backstage/plugin techdocs backend Versions

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

References

Frequently Asked Questions

What is CVE-2024-45816?
CVE-2024-45816 is a security vulnerability in @backstage/plugin techdocs backend involving @backstage/plugin-techdocs-backend storage bucket Directory Traversal vulnerability under CWE-23: Relative Path Traversal.
Which @backstage/plugin techdocs backend versions are affected?
Affected versions include releases prior to 1.10.13 across affected packages: @backstage/plugin-techdocs-backend.
What version fixes CVE-2024-45816?
Upgrading to 1.10.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @backstage/plugin-techdocs-backend affected?
Yes, @backstage/plugin-techdocs-backend is affected in releases prior to 1.10.13. Upgrade your dependency to 1.10.13 or later.
What is the CVSS score of CVE-2024-45816?
CVE-2024-45816 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2024-45816?
CVE-2024-45816 is classified under CWE-23: Relative Path Traversal (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory.).
How can I check npm dependencies for CVE-2024-45816?
Run the dependency tree command: 'npm ls @backstage/plugin-techdocs-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-39v3-f278-vj3g",
  "modified" : "2025-01-03T16:12:39Z",
  "published" : "2024-09-17T21:30:20Z",
  "aliases" : [ "CVE-2024-45816" ],
  "summary" : "@backstage/plugin-techdocs-backend storage bucket Directory Traversal vulnerability",
  "details" : "### Impact\n\nWhen using the AWS S3 or GCS storage provider for TechDocs it is possible to access content in the entire storage bucket. This can leak contents of the bucket that are not intended to be accessible, as well as bypass permission checks in Backstage.\n\n### Patches\n\nThis has been fixed in the 1.10.13 release of the `@backstage/plugin-techdocs-backend` package.\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:L/UI:N/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/plugin-techdocs-backend"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/security/advisories/GHSA-39v3-f278-vj3g"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45816"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/backstage/backstage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22", "CWE-23" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-17T21:30:20Z",
    "nvd_published_at" : "2024-09-17T21:15:12Z"
  }
}