Zum Inhalt springen

Server-Side Request Forgery (ARCH8104)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key kotlin.security.ssrf · Severity warning · Category security · CWE CWE-918

Flags outbound requests (URL(...), HttpUrl.parse, OkHttp Request.Builder().url) whose destination comes from request or parameter data.

val target = URL(request.getParameter("url"))
target.openStream()
val target = URL(request.getParameter("url"))
require(target.host in allowedHosts)

Allowlist hosts, refuse loopback and link-local addresses, resolve before connecting.