mirror of
https://github.com/github/codeql.git
synced 2026-03-21 15:06:46 +01:00
22 lines
693 B
Plaintext
22 lines
693 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
|
|
* @precision high
|
|
* @id js/reflected-xss-path
|
|
* @tags security
|
|
* external/cwe/cwe-079
|
|
* external/cwe/cwe-116
|
|
*/
|
|
|
|
import javascript
|
|
import semmle.javascript.security.dataflow.ReflectedXss
|
|
import DataFlow::PathGraph
|
|
|
|
from DataFlow::PathNode source, DataFlow::PathNode sink, ReflectedXss::Configuration cfg
|
|
where cfg.hasPathFlow(source, sink)
|
|
select sink, source, sink, "Cross-site scripting vulnerability due to $@.",
|
|
source, "user-provided value"
|