mirror of
https://github.com/github/codeql.git
synced 2026-04-18 05:24:01 +02:00
22 lines
700 B
Plaintext
22 lines
700 B
Plaintext
/**
|
|
* @name XPath injection
|
|
* @description Building an XPath expression from user-controlled sources is vulnerable to insertion of
|
|
* malicious code by the user.
|
|
* @kind path-problem
|
|
* @problem.severity error
|
|
* @security-severity 9.8
|
|
* @precision high
|
|
* @id java/xml/xpath-injection
|
|
* @tags security
|
|
* external/cwe/cwe-643
|
|
*/
|
|
|
|
import java
|
|
import semmle.code.java.security.XPathInjectionQuery
|
|
import XPathInjectionFlow::PathGraph
|
|
|
|
from XPathInjectionFlow::PathNode source, XPathInjectionFlow::PathNode sink
|
|
where XPathInjectionFlow::flowPath(source, sink)
|
|
select sink.getNode(), source, sink, "XPath expression depends on a $@.", source.getNode(),
|
|
"user-provided value"
|