mirror of
https://github.com/github/codeql.git
synced 2026-03-06 23:56:48 +01:00
In the CVSS calculator we model this by setting 'Attack Complexity' to High and 'User Interaction' to Low (as opposed to None). CVSS vector: CVSS:3.0/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N
21 lines
699 B
Plaintext
21 lines
699 B
Plaintext
/**
|
|
* @name Network data written to file
|
|
* @description Writing network data directly to the file system allows arbitrary file upload and might indicate a backdoor.
|
|
* @kind path-problem
|
|
* @problem.severity warning
|
|
* @security-severity 6.3
|
|
* @precision medium
|
|
* @id js/http-to-file-access
|
|
* @tags security
|
|
* external/cwe/cwe-912
|
|
* external/cwe/cwe-434
|
|
*/
|
|
|
|
import javascript
|
|
import semmle.javascript.security.dataflow.HttpToFileAccessQuery
|
|
import DataFlow::PathGraph
|
|
|
|
from Configuration cfg, DataFlow::PathNode source, DataFlow::PathNode sink
|
|
where cfg.hasFlowPath(source, sink)
|
|
select sink.getNode(), source, sink, "$@ flows to file system", source.getNode(), "Untrusted data"
|