Vulnerabilities in pkg:npm/@backstage/techdocs-common

PACKAGE
Advisory Summary

GHSA-4jqc-jvh2-pxg9 is a MODERATE path traversal vulnerability (General Security Weakness) affecting @backstage/plugin techdocs node libraries in the npm ecosystem. The issue involves path traversal for local publishers in techdocs backend. Remediation is available by upgrading affected packages to version 1.1.2, 0.11.16.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@backstage/techdocs-common

3 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-4jqc-jvh2-pxg9 - MODERATE Path traversal for local publishers in TechDocs backend
GHSA-pgf8-28gg-vpr6 CVE-2021-32662 MODERATE Path traversal
GHSA-pwhf-39xg-4rxw CVE-2021-32660 MODERATE Script injection

GHSA-4jqc-jvh2-pxg9 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4jqc-jvh2-pxg9
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product @backstage/plugin techdocs node
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-4jqc-jvh2-pxg9

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

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-4jqc-jvh2-pxg9, inspect your project dependencies using npm:

npm ls @backstage/plugin-techdocs-node

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

Note: The npm ls @backstage/plugin-techdocs-node 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 General Security Weakness. In @backstage/plugin techdocs node, 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 A malicious actor with the ability to register entities in the Software Catalog is able to write files to arbitrary paths on the techdocs backend host instance when `techdocs.publisher.type` is set to `local`. This vulnerability is mitigated by the fact that the Software Catalog must be configured with non-standard field format validators and/or non-standard entity policies. ### Patches Those affected are advised to upgrade to `@backstage/plugin-techdocs-node` version `1.1.2` or higher. ### Workarounds If patching or upgrading is not possible, it would be sufficient to update any custom Catalog field format validators and/or custom entity policies to disallow entity names, kinds, and namespaces containing `..` <!-- ### References todo: Link to blog post / published report. --> ### For more information If you have any questions or comments about this advisory: - Open an issue in the [Backstage repository](https://github.com/backstage/backstage) - Visit our chat, linked to in the [Backstage README](https://github.com/backstage/backstage)

GHSA-4jqc-jvh2-pxg9 Affected @backstage/plugin techdocs node Versions

2 component(s)
Fixed Versions:
1.1.20.11.16
Product / Package Ecosystem Affected Versions Fixed Version
@backstage/plugin-techdocs-node
npm
< 1.1.2
1.1.2
@backstage/techdocs-common
npm
< 0.11.16
0.11.16

References

Frequently Asked Questions

What is GHSA-4jqc-jvh2-pxg9?
GHSA-4jqc-jvh2-pxg9 is a security vulnerability in @backstage/plugin techdocs node involving Path traversal for local publishers in TechDocs backend under General Security Weakness.
Which @backstage/plugin techdocs node versions are affected?
Affected versions include releases prior to 1.1.2, 0.11.16 across affected packages: @backstage/plugin-techdocs-node, @backstage/techdocs-common.
What version fixes GHSA-4jqc-jvh2-pxg9?
Upgrading to 1.1.2, 0.11.16 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @backstage/plugin-techdocs-node affected?
Yes, @backstage/plugin-techdocs-node is affected in releases prior to 1.1.2. Upgrade your dependency to 1.1.2 or later.
Is @backstage/techdocs-common affected?
Yes, @backstage/techdocs-common is affected in releases prior to 0.11.16. Upgrade your dependency to 0.11.16 or later.
What CWE is associated with GHSA-4jqc-jvh2-pxg9?
GHSA-4jqc-jvh2-pxg9 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-4jqc-jvh2-pxg9?
Run the dependency tree command: 'npm ls @backstage/plugin-techdocs-node'. 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-4jqc-jvh2-pxg9",
  "modified" : "2022-06-17T01:11:10Z",
  "published" : "2022-06-17T01:11:10Z",
  "aliases" : [ ],
  "summary" : "Path traversal for local publishers in TechDocs backend",
  "details" : "### Impact\nA malicious actor with the ability to register entities in the Software Catalog is able to write files to arbitrary paths on the techdocs backend host instance when `techdocs.publisher.type` is set to `local`.\n\nThis vulnerability is mitigated by the fact that the Software Catalog must be configured with non-standard field format validators and/or non-standard entity policies.\n\n### Patches\nThose affected are advised to upgrade to `@backstage/plugin-techdocs-node` version `1.1.2` or higher.\n\n### Workarounds\nIf patching or upgrading is not possible, it would be sufficient to update any custom Catalog field format validators and/or custom entity policies to disallow entity names, kinds, and namespaces containing `..`\n\n<!--\n### References\ntodo: Link to blog post / published report.\n-->\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an issue in the [Backstage repository](https://github.com/backstage/backstage)\n- Visit our chat, linked to in the [Backstage README](https://github.com/backstage/backstage)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/plugin-techdocs-node"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@backstage/techdocs-common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.11.16"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/security/advisories/GHSA-4jqc-jvh2-pxg9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/backstage/backstage/commit/429c9f9daa5654dd1b996aa85f7264eb23a2e4fa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/backstage/backstage"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-17T01:11:10Z",
    "nvd_published_at" : null
  }
}