Skip to content
vetkitChecksChangelogDocumentationBlogComparisons

Java servlet unvalidated forward exposes WEB-INF resources

Rule ID: vetkit.java.open-redirect.unvalidated-forward

A servlet forward/include target is built from request data (unvalidated forward); it can reach any resource in the web application, including /WEB-INF/.

Last updated:

Suite: Security

java

A servlet forward/include target is built from request data (unvalidated forward); it can reach any resource in the web application, including /WEB-INF/.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Map the request value onto a fixed set of view paths (allow-list) and forward to the mapped constant; never concatenate request values into the dispatcher path.

References

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

Related checks

Check your own repository for this

vetkit runs this rule as part of a repository audit, alongside secret scanning, dependency vulnerabilities, code quality and AI code risk checks. It reads a temporary checkout and never executes your code.

Start with the free Security Quick Scan · See how the platform works

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.