mirror of
https://github.com/github/codeql.git
synced 2026-02-16 15:03:41 +01:00
24 lines
796 B
Plaintext
24 lines
796 B
Plaintext
/**
|
|
* @name Loop bound injection
|
|
* @description Iterating over an object with a user-controlled .length
|
|
* property can cause indefinite looping.
|
|
* @kind path-problem
|
|
* @problem.severity warning
|
|
* @security-severity 7.5
|
|
* @id js/loop-bound-injection
|
|
* @tags security
|
|
* external/cwe/cwe-834
|
|
* external/cwe/cwe-730
|
|
* @precision high
|
|
*/
|
|
|
|
import javascript
|
|
import semmle.javascript.security.dataflow.LoopBoundInjectionQuery
|
|
import LoopBoundInjectionFlow::PathGraph
|
|
|
|
from LoopBoundInjectionFlow::PathNode source, LoopBoundInjectionFlow::PathNode sink
|
|
where LoopBoundInjectionFlow::flowPath(source, sink)
|
|
select sink, source, sink,
|
|
"Iteration over a user-controlled object with a potentially unbounded .length property from a $@.",
|
|
source, "user-provided value"
|