-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUI5LogInjection.ql
More file actions
23 lines (21 loc) · 876 Bytes
/
UI5LogInjection.ql
File metadata and controls
23 lines (21 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/**
* @name UI5 client-side Log injection
* @description Building log entries from user-controlled sources is vulnerable to
* insertion of forged log entries by a malicious user.
* @kind path-problem
* @problem.severity recommendation
* @security-severity 3.5
* @precision medium
* @id js/ui5-log-injection
* @tags security
* external/cwe/cwe-117
*/
import javascript
import advanced_security.javascript.frameworks.ui5.UI5LogInjectionQuery
import advanced_security.javascript.frameworks.ui5.dataflow.DataFlow::UI5PathGraph
from
UI5LogInjectionConfiguration cfg, UI5PathNode source, UI5PathNode sink, UI5PathNode primarySource
where
cfg.hasFlowPath(source.getPathNode(), sink.getPathNode()) and
primarySource = source.getAPrimarySource()
select sink, primarySource, sink, "Log entry depends on a $@.", primarySource, "user-provided value"