> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# path-traversal

> Request data controls a filesystem path without a recognized containment check.

## What it flags

A file path built from request data reaches `fs`, `res.sendFile` without `root`, `res.download` or `res.render`. `path.basename` and a containment check clear it. An anchored filename allowlist also clears it when the checker can prove the allowed characters and the validated value reaches the file operation unchanged.

Exact `Map.has(value)` membership can establish a filename allowlist when the map has only portable literal keys and stays local and read-only. The value checked by `has` must be the component used in the path.

The containment check compares paths lexically, including when an immutable local copy reaches the file operation. Filesystem identity also depends on directory entries such as symbolic links. Filesystem-aware evidence for shared writable directories is tracked separately in [issue #683](https://github.com/IbrahimHafez1/loadwise/issues/683).

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "path-traversal": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.