Skip to content
vetkitChecksChangelogDocumentation

vetkit.nginx.alias.path-traversal

nginx alias with a trailing slash is used in a prefix location without a trailing slash. A request such as /static../secret escapes the aliased directory and reads files from its parent ("off-by-slash" path traversal).

Last updated:

Suite: Security

regex

nginx alias with a trailing slash is used in a prefix location without a trailing slash. A request such as /static../secret escapes the aliased directory and reads files from its parent ("off-by-slash" path traversal).

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Make the location and alias agree: location /static/ { alias /srv/static/; } (both with a trailing slash) or use root instead of alias.

References

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