# GHSA-m4vv-p6fq-jhqp: Directory Traversal in @vivaxy/here

> An attacker can read arbitrary files outside the web root via directory traversal in the @vivaxy/here Node.js module.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 1 Sep 2020

## What is GHSA-m4vv-p6fq-jhqp?

GHSA-m4vv-p6fq-jhqp is a path traversal vulnerability in @vivaxy/here, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

## Which versions are affected by GHSA-m4vv-p6fq-jhqp?

2 open source packages ship an affected version, including @vivaxy/here.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@vivaxy/here` | npm | All versions | 3.2.2 |
| `@vivaxy/here` | npm | All versions | 3.2.2 |

## How do I fix GHSA-m4vv-p6fq-jhqp?

Upgrade @vivaxy/here to 3.2.2 or later.

## Is GHSA-m4vv-p6fq-jhqp being exploited?

There is no known exploitation of GHSA-m4vv-p6fq-jhqp in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-m4vv-p6fq-jhqp and fix it if it is affected.

What it is: GHSA-m4vv-p6fq-jhqp is a path traversal vulnerability in @vivaxy/here, published on 1 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-m4vv-p6fq-jhqp in the wild and no public exploit code.

Affected packages and fixed versions:
- @vivaxy/here (npm): affected all versions; fixed in 3.2.2
- @vivaxy/here (npm): affected all versions; fixed in 3.2.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-m4vv-p6fq-jhqp/ (Markdown: https://insights.sbomify.com/GHSA-m4vv-p6fq-jhqp/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-m4vv-p6fq-jhqp

---
From sbomify Insights: https://insights.sbomify.com/GHSA-m4vv-p6fq-jhqp/
Summaries are generated and may contain mistakes; the official description above is the record.
