Vulnerabilities in pkg:npm/@vivaxy/here

PACKAGE
Advisory Summary

GHSA-m4vv-p6fq-jhqp is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting @vivaxy/here libraries in the npm ecosystem. The issue involves directory traversal in @vivaxy/here. Remediation is available by upgrading affected packages to version 3.2.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@vivaxy/here

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@vivaxy/here. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-m4vv-p6fq-jhqp - HIGH Directory Traversal in @vivaxy/here

GHSA-m4vv-p6fq-jhqp at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-m4vv-p6fq-jhqp
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product @vivaxy/here
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-m4vv-p6fq-jhqp

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

@vivaxy/here fixed: 3.2.2
npm install @vivaxy/here@3.2.2
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 @vivaxy/here

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-m4vv-p6fq-jhqp, inspect your project dependencies using npm:

npm ls @vivaxy/here

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

Note: The npm ls @vivaxy/here 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-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In @vivaxy/here, 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

The @vivaxy/here module is a small web server that serves files with the process' working directory acting as the web root. It is vulnerable to a directory traversal attack. This means that files on the local file system which exist outside of the web root may be disclosed to an attacker. This might include confidential files. Mitigating Factors: If the node process is run as a user with very limited filesystem permissions, there is significantly less risk of exposing confidential/private information. Proof of Concept: ``` curl "http://${SERVER_IP}:${SERVER_PORT}/..%2f..%2fetc/passwd" ``` ## Recommendation Run `npm i @vivaxy/here` to install the latest version that addresses this vulnerability.

GHSA-m4vv-p6fq-jhqp Affected @vivaxy/here Versions

1 component(s)
Fixed Versions:
3.2.2
Product / Package Ecosystem Affected Versions Fixed Version
@vivaxy/here
npm
< 3.2.2
3.2.2

References

Frequently Asked Questions

What is GHSA-m4vv-p6fq-jhqp?
GHSA-m4vv-p6fq-jhqp is a security vulnerability in @vivaxy/here involving Directory Traversal in @vivaxy/here under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which @vivaxy/here versions are affected?
Affected versions include releases prior to 3.2.2 across affected packages: @vivaxy/here.
What version fixes GHSA-m4vv-p6fq-jhqp?
Upgrading to 3.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @vivaxy/here affected?
Yes, @vivaxy/here is affected in releases prior to 3.2.2. Upgrade your dependency to 3.2.2 or later.
What CWE is associated with GHSA-m4vv-p6fq-jhqp?
GHSA-m4vv-p6fq-jhqp is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for GHSA-m4vv-p6fq-jhqp?
Run the dependency tree command: 'npm ls @vivaxy/here'. 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-m4vv-p6fq-jhqp",
  "modified" : "2021-09-23T21:48:53Z",
  "published" : "2020-09-01T19:04:07Z",
  "aliases" : [ ],
  "summary" : "Directory Traversal in @vivaxy/here",
  "details" : "The @vivaxy/here module is a small web server that serves files with the process' working directory acting as the web root.\n\nIt is vulnerable to a directory traversal attack. \n\nThis means that files on the local file system which exist outside of the web root may be disclosed to an attacker. This might include confidential files.\n\nMitigating Factors:\nIf the node process is run as a user with very limited filesystem permissions, there is significantly less risk of exposing confidential/private information.\n\n\nProof of Concept:\n```\ncurl \"http://${SERVER_IP}:${SERVER_PORT}/..%2f..%2fetc/passwd\"\n```\n\n\n## Recommendation\n\nRun `npm i @vivaxy/here` to install the latest version that addresses this vulnerability.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@vivaxy/here"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.2.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/vivaxy/here/commit/298dbab41344dfb7f95f66b1fa7b5cfb436bd4a2"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/296254"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/vivaxy/here"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/557"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:27:40Z",
    "nvd_published_at" : null
  }
}