Will It Vibe logoWill It Vibe?
INJECT-023Medium severity-8 points

Filesystem path built from request input (JS/TS)

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

path.join/resolve/normalize is fed req.query/params/body, so a value like ../../etc/passwd can escape the intended directory (path traversal). Constrain and validate the segment first.

Why it matters

Feeding req.query/params/body into path.join or path.resolve lets a value such as ../../etc/passwd escape the intended directory and reach files outside it (path traversal). It is a heuristic because the request value may already be constrained, but the pattern cannot see that.

How to fix it

Normalize and confine the path: resolve it against a fixed base directory and verify the result still starts with that base before using it. Strip path separators with path.basename when you only expect a filename. Reject the request if it escapes the base.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks