Docs / Detectors / Path Traversal

Path Traversal

User input used in a file-system path escapes the intended directory via ../ or encoded variants. Arcis strips traversal sequences and rejects path-encoded payloads at the request boundary.

What it catches

Sample payload

// Before (file param)
"../../../etc/passwd"

// After (sanitize)
"etc/passwd"

// In block mode: 403, vector=path, rule=patterns.path.traversal

Configuration

app.use(arcis({
  block: true,
  sanitize: { path: { enabled: true } }
}));

Disable or dry-run

app.get('/admin/file-browser', arcis({ sanitize: { path: false } }), handler);

References

Defense-in-depth. Use path.resolve() + a startsWith() check against your safe root as your primary defense. Whitelist file extensions where possible. Arcis catches the obvious cases; the resolved-path check catches everything.