Skip to content
vetkitChecksChangelogDocumentationBlogComparisons

Java JAX-RS text/html response XSS from request data

Rule ID: vetkit.java.xss.jaxrs-html-response

A JAX-RS/Micronaut endpoint that produces text/html returns request data without HTML encoding (cross-site scripting).

Last updated:

Suite: Security

java

A JAX-RS/Micronaut endpoint that produces text/html returns request data without HTML encoding (cross-site scripting).

Category: SECURITY · Engine rule severity: ERROR

How to fix it

Render HTML through a template engine with auto-escaping (Qute, Thymeleaf, Mustache) or encode values with the OWASP Java Encoder (Encode.forHtml) before building the response; return JSON for data endpoints.

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.