mirror of
https://github.com/github/codeql.git
synced 2026-05-10 17:29:26 +02:00
23 lines
722 B
Plaintext
23 lines
722 B
Plaintext
/**
|
|
* @name Reflected cross-site scripting
|
|
* @description Writing user input directly to an HTTP response allows for
|
|
* a cross-site scripting vulnerability.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 7.8
|
|
* @precision high
|
|
* @id js/reflected-xss
|
|
* @tags security
|
|
* external/cwe/cwe-079
|
|
* external/cwe/cwe-116
|
|
*/
|
|
|
|
import javascript
|
|
import semmle.javascript.security.dataflow.ReflectedXssQuery
|
|
import DataFlow::PathGraph
|
|
|
|
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where cfg.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "Cross-site scripting vulnerability due to a $@.",
|
|
source.getNode(), "user-provided value"
|