mirror of
https://github.com/github/codeql.git
synced 2026-04-08 08:34:02 +02:00
26 lines
840 B
Plaintext
26 lines
840 B
Plaintext
/**
|
|
* @name Full server-side request forgery
|
|
* @description Making a network request to a URL that is fully user-controlled allows for request forgery attacks.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 9.1
|
|
* @precision high
|
|
* @id py/full-ssrf
|
|
* @tags security
|
|
* external/cwe/cwe-918
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.ServerSideRequestForgeryQuery
|
|
import DataFlow::PathGraph
|
|
|
|
from
|
|
FullServerSideRequestForgeryConfiguration fullConfig, DataFlow::PathNode source,
|
|
DataFlow::PathNode sink, Http::Client::Request request
|
|
where
|
|
request = sink.getNode().(Sink).getRequest() and
|
|
fullConfig.hasFlowPath(source, sink) and
|
|
fullyControlledRequest(request)
|
|
select request, source, sink, "The full URL of this request depends on a $@.", source.getNode(),
|
|
"user-provided value"
|