File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
javascript/ql/src/Security/CWE-377 Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
4
4
<overview >
5
5
<p >
6
- Temporary files created in the operating system tmp directory are by default accessible
7
- to other users. This can in some cases lead to information exposure, or in the worst
8
- case to remote code execution.
6
+ Temporary files created in the operating system's temporary directory are by default accessible
7
+ to other users. In some cases, this can lead to information exposure, or in the worst
8
+ case, to remote code execution.
9
9
</p >
10
10
</overview >
11
11
12
12
<recommendation >
13
13
<p >
14
- Use a well tested library like <a href =" https://www.npmjs.com/package/tmp" >tmp</a >
14
+ Use a well- tested library like <a href =" https://www.npmjs.com/package/tmp" >tmp</a >
15
15
for creating temporary files. These libraries ensure both that the file is inaccessible
16
16
to other users and that the file does not already exist.
17
17
</p >
18
18
</recommendation >
19
19
20
20
<example >
21
21
<p >
22
- The following example creates a temporary file in the operating system tmp directory.
22
+ The following example creates a temporary file in the operating system's temporary directory.
23
23
</p >
24
24
<sample src =" examples/insecure-temporary-file.js" />
25
25
You can’t perform that action at this time.
0 commit comments