mirror of
https://github.com/github/codeql.git
synced 2026-02-18 16:03:45 +01:00
22 lines
748 B
Plaintext
22 lines
748 B
Plaintext
/**
|
|
* @name Template Object Injection
|
|
* @description Instantiating a template using a user-controlled object is vulnerable to local file read and potential remote code execution.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 9.3
|
|
* @precision high
|
|
* @id js/template-object-injection
|
|
* @tags security
|
|
* external/cwe/cwe-073
|
|
* external/cwe/cwe-094
|
|
*/
|
|
|
|
import javascript
|
|
import DataFlow::PathGraph
|
|
import semmle.javascript.security.dataflow.TemplateObjectInjectionQuery
|
|
|
|
from DataFlow::Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where cfg.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "Template object depends on a $@.", source.getNode(),
|
|
"user-provided value"
|