File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
src/experimental/Security/CWE-340
test/experimental/Security/CWE-094 Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE qhelp PUBLIC
2
+ "-//Semmle//qhelp//EN"
3
+ "qhelp.dtd">
4
+ <qhelp >
5
+ <overview >
6
+ <p >
7
+ GUIDs (often called UUIDs) are widely used in modern web applications.
8
+ One common use for UUIDs is the generation of one-time-use tokens.
9
+ These can used for password reset, and e-mail confirmation routines, for example.
10
+ </p >
11
+ <p >
12
+ There are five versions of UUIDs defined in RFC 4122.
13
+ Out of the five, four are generated in a predictable manner.
14
+ This means it is possible for someone to predict future UUIDs based on a sample
15
+ generated by the target application.
16
+ </p >
17
+ <p >
18
+ Version four is the only UUID version expected to be randomly generated.
19
+ Therefore, for situations where predictable tokens are not desired (e.g. password reset tokens),
20
+ all other versions should be avoided.
21
+ </p >
22
+ </overview >
23
+
24
+ <recommendation >
25
+ <p >When using GUIDs/UUIDs for generating tokens that should not be predictable, use version four.</p >
26
+ </recommendation >
27
+
28
+ <example >
29
+ <p >This example shows a UUID v1 being used for a password reset routine.
30
+ </p >
31
+
32
+ <sample src =" TokenBuiltFromUUID.js" />
33
+ </example >
34
+
35
+ <references >
36
+ <li >UUID <a href =" https://datatracker.ietf.org/doc/html/rfc4122" >RFC</a >.</li >
37
+ <li >Daniel Thatcher <i >In GUID We Trust</i > <a href =" https://www.intruder.io/research/in-guid-we-trust" >article</a >.</li >
38
+ <li >UUID exploitation <a href =" https://github.com/intruder-io/guidtool" >tool</a >.</li >
39
+ </references >
40
+ </qhelp >
Original file line number Diff line number Diff line change
1
+ experimental/Security/CWE-094/UntrustedCheckout.ql
You can’t perform that action at this time.
0 commit comments