mirror of
https://github.com/github/codeql.git
synced 2026-06-19 03:41:07 +02:00
21 lines
677 B
Plaintext
21 lines
677 B
Plaintext
/**
|
|
* @name Server-side request forgery
|
|
* @description Making web requests based on unvalidated user-input
|
|
* may cause the server to communicate with malicious servers.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @precision high
|
|
* @id java/ssrf
|
|
* @tags security
|
|
* external/cwe/cwe-918
|
|
*/
|
|
|
|
import java
|
|
import semmle.code.java.security.RequestForgeryConfig
|
|
import DataFlow::PathGraph
|
|
|
|
from DataFlow::PathNode source, DataFlow::PathNode sink, RequestForgeryConfiguration conf
|
|
where conf.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "Potential server-side request forgery due to $@.",
|
|
source.getNode(), "a user-provided value"
|