Find HTTP response splitting vectors

Proprietary

Finds calls to HttpServletResponse.addHeader(), setHeader(), and addCookie() which, when header values are derived from user input without CRLF sanitization, can allow HTTP response splitting attacks. Full taint-based detection requires rewrite-program-analysis; this recipe identifies the sink call sites for manual review.

org.openrewrite.java.security.search.FindHttpResponseSplitting
mod run . --recipe=org.openrewrite.java.security.search.FindHttpResponseSplitting

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find method usages javax.servlet.http.HttpServletResponse addHeader(String, String)
  2. Find method usages javax.servlet.http.HttpServletResponse setHeader(String, String)
  3. Find method usages jakarta.servlet.http.HttpServletResponse addHeader(String, String)
  4. Find method usages jakarta.servlet.http.HttpServletResponse setHeader(String, String)
  5. Find method usages javax.servlet.http.HttpServletResponse addCookie(javax.servlet.http.Cookie)
  6. Find method usages jakarta.servlet.http.HttpServletResponse addCookie(jakarta.servlet.http.Cookie)