Skip to content

Commit 0d042fa

Browse files
committed
security faults
1 parent 748e638 commit 0d042fa

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

release_notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 0.0.5
2+
3+
- New security fault categories
4+
15
# 0.0.4
26

37
- Fixed camelCase in schemas

src/main/java/com/webfuzzing/commons/faults/DefinedFaultCategory.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,39 @@ public enum DefinedFaultCategory implements FaultCategory {
9090
" a record that should not be accessible via the API." +
9191
" See OWASP Top 10 for more information."),
9292

93+
SECURITY_EXISTENCE_LEAKAGE(204, "Leakage Information Existence of Protected Resource",
94+
"allowsUnauthorizedAccessToProtectedResource",
95+
"When accessing a protected resource, could get as a response a 403 not-authorized status code." +
96+
" If the resource does not exist, then returning a 404 would be a security leak, as now the client would" +
97+
" know if resources, they have no access to, do exist or not." +
98+
" In these cases, to avoid unauthorized information leakage, a server should consistently either always return 403" +
99+
" or 404 for protected resources, regardless of whether they exist or not."),
100+
101+
SECURITY_NOT_RECOGNIZED_AUTHENTICATED(205, "Wrongly Not Recognized as Authenticated",
102+
"authenticatedButWronglyToldNot",
103+
"If the user is providing valid credentials, and if they try to access a protected resource," +
104+
" they should get a status code 403 (not authorized), and not 401 (not authenticated)." +
105+
" With a 401, the user might wrongly think there is a problem with their credentials, and not that they" +
106+
" have no right to access to that resource." +
107+
" However, to avoid false positives related to misconfigured credentials, these credentials should be first" +
108+
" successfully validated on some other resources before flagging a returned 401 as a server fault."),
109+
110+
SECURITY_WRONG_AUTHORIZATION(206, "Allowed To Modify Resource That Likely Should Had Been Protected",
111+
"missedAuthorizationCheck",
112+
"BOLA and BFLA are major security vulnerabilities. To avoid users accessing protected resources," +
113+
" authorization mechanisms are usually put in place." +
114+
" However, it can happen that, on some endpoints, these authorization mechanisms are missing or misconfigured" +
115+
" by mistake." +
116+
" This can have disastrous consequences, e.g., a regular user deleting all data from all other users." +
117+
" However, access policies could be arbitrarily complex, where some users might validly interact with" +
118+
" some resources of other users." +
119+
" A common example is 'administrator' users." +
120+
" Without a formal specification describing in details the access policies in place, it is hard to say" +
121+
" automatically if we are in the case of a BOLA/BFLA vulnerability." +
122+
" Still, some heuristics could be used to flag highly suspicious cases." +
123+
" For example, if a user is blocked with a 403 to do a PUT and a PATCH on a resource, it would" +
124+
" be quite suspicious if a DELETE would work just fine on that resource."),
125+
93126
;
94127

95128
private final int code;

src/main/resources/wfc/faults/fault_categories.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,22 @@
5252
"fullDescription" : "This vulnerability exploits possible active record pattern misconfigurations to modify fields of a record that should not be accessible via the API. See OWASP Top 10 for more information.",
5353
"descriptiveName" : "Mass Assignment",
5454
"label" : "F203:Mass Assignment"
55+
}, {
56+
"code" : 204,
57+
"testCaseLabel" : "allowsUnauthorizedAccessToProtectedResource",
58+
"fullDescription" : "When accessing a protected resource, could get as a response a 403 not-authorized status code. If the resource does not exist, then returning a 404 would be a security leak, as now the client would know if resources, they have no access to, do exist or not. In these cases, to avoid unauthorized information leakage, a server should consistently either always return 403 or 404 for protected resources, regardless of whether they exist or not.",
59+
"descriptiveName" : "Leakage Information Existence of Protected Resource",
60+
"label" : "F204:Leakage Information Existence of Protected Resource"
61+
}, {
62+
"code" : 205,
63+
"testCaseLabel" : "authenticatedButWronglyToldNot",
64+
"fullDescription" : "If the user is providing valid credentials, and if they try to access a protected resource, they should get a status code 403 (not authorized), and not 401 (not authenticated). With a 401, the user might wrongly think there is a problem with their credentials, and not that they have no right to access to that resource. However, to avoid false positives related to misconfigured credentials, these credentials should be first successfully validated on some other resources before flagging a returned 401 as a server fault.",
65+
"descriptiveName" : "Wrongly Not Recognized as Authenticated",
66+
"label" : "F205:Wrongly Not Recognized as Authenticated"
67+
}, {
68+
"code" : 206,
69+
"testCaseLabel" : "missedAuthorizationCheck",
70+
"fullDescription" : "BOLA and BFLA are major security vulnerabilities. To avoid users accessing protected resources, authorization mechanisms are usually put in place. However, it can happen that, on some endpoints, these authorization mechanisms are missing or misconfigured by mistake. This can have disastrous consequences, e.g., a regular user deleting all data from all other users. However, access policies could be arbitrarily complex, where some users might validly interact with some resources of other users. A common example is 'administrator' users. Without a formal specification describing in details the access policies in place, it is hard to say automatically if we are in the case of a BOLA/BFLA vulnerability. Still, some heuristics could be used to flag highly suspicious cases. For example, if a user is blocked with a 403 to do a PUT and a PATCH on a resource, it would be quite suspicious if a DELETE would work just fine on that resource.",
71+
"descriptiveName" : "Allowed To Modify Resource That Likely Should Had Been Protected",
72+
"label" : "F206:Allowed To Modify Resource That Likely Should Had Been Protected"
5573
} ]

0 commit comments

Comments
 (0)