Skip to content
vetkitChecksChangelogDocumentation

vetkit.rust.path-traversal.request-input

A filesystem path is built from request input without confining it to a base directory (path traversal). ../ segments let a client read or overwrite files outside the intended folder.

Last updated:

Suite: Security

rust

A filesystem path is built from request input without confining it to a base directory (path traversal). ../ segments let a client read or overwrite files outside the intended folder.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Reduce the value to Path::new(&name).file_name(), or canonicalize the joined path and check that it still starts_with the canonical base directory before opening it.

References

Source: packages/engine/rules/sast/rust.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.