Skip to content
vetkitChecksChangelogDocumentation

vetkit.java.path-traversal.request-file-path

A file system path is built from request data, allowing path traversal (../) outside the intended directory.

Last updated:

Suite: Security

java

A file system path is built from request data, allowing path traversal (../) outside the intended directory.

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Resolve the path against a fixed base directory, normalize it and reject it unless it still starts with the base (base.resolve(name).normalize().startsWith(base)), or map user input to server-side ids.

References

Source: packages/engine/rules/sast/java.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.