mirror of
https://github.com/github/codeql.git
synced 2026-04-03 14:18:17 +02:00
21 lines
720 B
Plaintext
21 lines
720 B
Plaintext
/**
|
|
* @name Server Side Template Injection
|
|
* @description Using user-controlled data to create a template can lead to remote code execution or cross site scripting.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @precision high
|
|
* @security-severity 9.3
|
|
* @id py/template-injection
|
|
* @tags security
|
|
* external/cwe/cwe-074
|
|
*/
|
|
|
|
import python
|
|
import semmle.python.security.dataflow.TemplateInjectionQuery
|
|
import TemplateInjectionFlow::PathGraph
|
|
|
|
from TemplateInjectionFlow::PathNode source, TemplateInjectionFlow::PathNode sink
|
|
where TemplateInjectionFlow::flowPath(source, sink)
|
|
select sink.getNode(), source, sink, "This template construction depends on a $@.",
|
|
source.getNode(), "user-provided value"
|