@hoanghainh/komagu 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/assess/lsa/examples/eval-run-4/ground-truth.json +823 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/coverage.json +85 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-001.json +822 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-002.json +393 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings.json +4477 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/score.json +120 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/ai-run-stats.json +55 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/coverage.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-001.json +613 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-002.json +287 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings.json +4870 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/score.json +107 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/coverage.json +92 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-001.json +645 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings.json +4859 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/score.json +121 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/coverage.json +111 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-001.json +6 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-002.json +344 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings.json +3544 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/score.json +123 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/ai-run-stats.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/coverage.json +42 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-001.json +540 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-002.json +238 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.json +4383 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.sarif +8729 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.ja.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/score.json +101 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/ai-run-stats.json +54 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/coverage.json +66 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-001.json +440 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-002.json +229 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings.json +3424 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/score.json +120 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/ai-run-stats.json +88 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/coverage.json +36 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-001.json +530 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-002.json +248 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.json +4766 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.sarif +9326 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.ja.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/score.json +80 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/ai-run-stats.json +83 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/coverage.json +44 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-001.json +579 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-002.json +268 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings.json +3913 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/score.json +94 -0
- package/assess/lsa/examples/eval-run-5/ground-truth.json +823 -0
- package/assess/lsa/knowledge/injection-patterns.md +8 -1
- package/assess/lsa/knowledge/stacks/nextjs.md +62 -0
- package/assess/lsa/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/prompts/_shared-rules.md +1 -0
- package/assess/lsa/scripts/detect_stack.py +5 -1
- package/assess/lsa/scripts/find_injection.py +34 -5
- package/assess/lsa/scripts/lsa_common.py +9 -2
- package/assess/lsa/scripts/make_batches.py +2 -1
- package/assess/lsa/scripts/map_routes.py +10 -2
- package/assess/lsa/scripts/nextjs_routes.py +236 -0
- package/assess/lsa/templates/audit-config.json +1 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -0
- package/assess/lsa/tests/test_default_scope.py +86 -0
- package/assess/lsa/tests/test_eval_run_4.py +73 -0
- package/assess/lsa/tests/test_eval_run_5.py +73 -0
- package/assess/lsa/tests/test_js_tagged_sql.py +112 -0
- package/assess/lsa/tests/test_nextjs.py +198 -0
- package/assess/lsa/tests/test_privilege_tier2.py +30 -0
- package/operate/ai/anchoring.py +130 -0
- package/operate/ai/client.py +13 -0
- package/operate/ai/context.py +105 -0
- package/operate/ai/runner.py +197 -69
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +1 -1
- package/operate/tests/test_ai_anchoring.py +184 -0
- package/operate/tests/test_headless_ai.py +148 -1
- package/package.json +1 -1
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "privilege-002",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "MASS-M-0006-1",
|
|
6
|
+
"category": "mass_assignment",
|
|
7
|
+
"subtype": "whole_object_binding",
|
|
8
|
+
"title": "Profile update binds entire request body to User model",
|
|
9
|
+
"route_id": null,
|
|
10
|
+
"candidate_id": "M-0006",
|
|
11
|
+
"location": {
|
|
12
|
+
"file": "routes/user.js",
|
|
13
|
+
"start_line": 8
|
|
14
|
+
},
|
|
15
|
+
"evidence": [
|
|
16
|
+
{
|
|
17
|
+
"file": "routes/user.js",
|
|
18
|
+
"line": 8,
|
|
19
|
+
"why": "User.findByIdAndUpdate(req.user._id, req.body) binds the entire request body to the User model without an allowlist."
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"impact": "Privilege escalation via role field",
|
|
23
|
+
"severity": "critical",
|
|
24
|
+
"confidence": "high",
|
|
25
|
+
"cwe": [
|
|
26
|
+
"CWE-915"
|
|
27
|
+
],
|
|
28
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
29
|
+
"status": "unverified",
|
|
30
|
+
"attack_vector": {
|
|
31
|
+
"method": "PUT",
|
|
32
|
+
"path": "/profile",
|
|
33
|
+
"fields": {
|
|
34
|
+
"role": "admin"
|
|
35
|
+
},
|
|
36
|
+
"readback": "GET /profile"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"finding_id": "MASS-M-0007-1",
|
|
41
|
+
"category": "mass_assignment",
|
|
42
|
+
"subtype": "whole_object_binding",
|
|
43
|
+
"title": "Profile update binds entire request body to User model (module export variant)",
|
|
44
|
+
"route_id": null,
|
|
45
|
+
"candidate_id": "M-0007",
|
|
46
|
+
"location": {
|
|
47
|
+
"file": "routes/user.js",
|
|
48
|
+
"start_line": 8
|
|
49
|
+
},
|
|
50
|
+
"evidence": [
|
|
51
|
+
{
|
|
52
|
+
"file": "routes/user.js",
|
|
53
|
+
"line": 8,
|
|
54
|
+
"why": "User.findByIdAndUpdate(req.user._id, req.body) binds the entire request body to the User model without an allowlist."
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"impact": "Privilege escalation via role field",
|
|
58
|
+
"severity": "critical",
|
|
59
|
+
"confidence": "high",
|
|
60
|
+
"cwe": [
|
|
61
|
+
"CWE-915"
|
|
62
|
+
],
|
|
63
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
64
|
+
"status": "unverified",
|
|
65
|
+
"attack_vector": {
|
|
66
|
+
"method": "PUT",
|
|
67
|
+
"path": "/profile",
|
|
68
|
+
"fields": {
|
|
69
|
+
"role": "admin"
|
|
70
|
+
},
|
|
71
|
+
"readback": "GET /profile"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"finding_id": "MASS-M-0008-1",
|
|
76
|
+
"category": "mass_assignment",
|
|
77
|
+
"subtype": "whole_object_binding",
|
|
78
|
+
"title": "User registration binds entire request body to User model",
|
|
79
|
+
"route_id": null,
|
|
80
|
+
"candidate_id": "M-0008",
|
|
81
|
+
"location": {
|
|
82
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
83
|
+
"start_line": 13
|
|
84
|
+
},
|
|
85
|
+
"evidence": [
|
|
86
|
+
{
|
|
87
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
88
|
+
"line": 13,
|
|
89
|
+
"why": "User::create($request->all()) binds the entire request body to the User model without an allowlist."
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"impact": "Privilege escalation via role field",
|
|
93
|
+
"severity": "critical",
|
|
94
|
+
"confidence": "high",
|
|
95
|
+
"cwe": [
|
|
96
|
+
"CWE-915"
|
|
97
|
+
],
|
|
98
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
99
|
+
"status": "unverified",
|
|
100
|
+
"attack_vector": {
|
|
101
|
+
"method": "POST",
|
|
102
|
+
"path": "/register",
|
|
103
|
+
"fields": {
|
|
104
|
+
"role": "admin"
|
|
105
|
+
},
|
|
106
|
+
"readback": "GET /profile"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"finding_id": "MASS-M-0009-1",
|
|
111
|
+
"category": "mass_assignment",
|
|
112
|
+
"subtype": "privileged_field_writable",
|
|
113
|
+
"title": "Team creation allows arbitrary owner_id to be set",
|
|
114
|
+
"route_id": null,
|
|
115
|
+
"candidate_id": "M-0009",
|
|
116
|
+
"location": {
|
|
117
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
118
|
+
"start_line": 23
|
|
119
|
+
},
|
|
120
|
+
"evidence": [
|
|
121
|
+
{
|
|
122
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
123
|
+
"line": 23,
|
|
124
|
+
"why": "Team::create($request->all()) binds the entire request body to the Team model, including the privileged field owner_id."
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"impact": "Owner ID can be set to arbitrary value, enabling ownership takeover",
|
|
128
|
+
"severity": "critical",
|
|
129
|
+
"confidence": "high",
|
|
130
|
+
"cwe": [
|
|
131
|
+
"CWE-915",
|
|
132
|
+
"CWE-269"
|
|
133
|
+
],
|
|
134
|
+
"recommendation": "Limit fields to an allowlist; set owner_id server\u2011side.",
|
|
135
|
+
"status": "unverified",
|
|
136
|
+
"attack_vector": {
|
|
137
|
+
"method": "POST",
|
|
138
|
+
"path": "/team",
|
|
139
|
+
"fields": {
|
|
140
|
+
"owner_id": "999"
|
|
141
|
+
},
|
|
142
|
+
"readback": "GET /teams/999"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"finding_id": "MASS-M-0010-1",
|
|
147
|
+
"category": "mass_assignment",
|
|
148
|
+
"subtype": "whole_object_binding",
|
|
149
|
+
"title": "Team creation binds entire request body to Team model",
|
|
150
|
+
"route_id": null,
|
|
151
|
+
"candidate_id": "M-0010",
|
|
152
|
+
"location": {
|
|
153
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
154
|
+
"start_line": 23
|
|
155
|
+
},
|
|
156
|
+
"evidence": [
|
|
157
|
+
{
|
|
158
|
+
"file": "app/Http/Controllers/AccountController.php",
|
|
159
|
+
"line": 23,
|
|
160
|
+
"why": "Team::create($request->all()) binds the entire request body to the Team model without an allowlist."
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
"impact": "Privilege escalation via role field or owner_id",
|
|
164
|
+
"severity": "critical",
|
|
165
|
+
"confidence": "high",
|
|
166
|
+
"cwe": [
|
|
167
|
+
"CWE-915"
|
|
168
|
+
],
|
|
169
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
170
|
+
"status": "unverified",
|
|
171
|
+
"attack_vector": {
|
|
172
|
+
"method": "POST",
|
|
173
|
+
"path": "/team",
|
|
174
|
+
"fields": {
|
|
175
|
+
"role": "admin"
|
|
176
|
+
},
|
|
177
|
+
"readback": "GET /teams/1"
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"finding_id": "MASS-M-0015-1",
|
|
182
|
+
"category": "mass_assignment",
|
|
183
|
+
"subtype": "whole_object_binding",
|
|
184
|
+
"title": "PATCH user updates binds arbitrary fields to User model",
|
|
185
|
+
"route_id": null,
|
|
186
|
+
"candidate_id": "M-0015",
|
|
187
|
+
"location": {
|
|
188
|
+
"file": "app.py",
|
|
189
|
+
"start_line": 27
|
|
190
|
+
},
|
|
191
|
+
"evidence": [
|
|
192
|
+
{
|
|
193
|
+
"file": "app.py",
|
|
194
|
+
"line": 27,
|
|
195
|
+
"why": "Loop over request.json items and set attributes on user; no allowlist."
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"impact": "Privilege escalation via role field",
|
|
199
|
+
"severity": "critical",
|
|
200
|
+
"confidence": "high",
|
|
201
|
+
"cwe": [
|
|
202
|
+
"CWE-915"
|
|
203
|
+
],
|
|
204
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
205
|
+
"status": "unverified",
|
|
206
|
+
"attack_vector": {
|
|
207
|
+
"method": "PATCH",
|
|
208
|
+
"path": "/users/123",
|
|
209
|
+
"fields": {
|
|
210
|
+
"role": "admin"
|
|
211
|
+
},
|
|
212
|
+
"readback": "GET /users/123"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"finding_id": "MASS-M-0014-1",
|
|
217
|
+
"category": "mass_assignment",
|
|
218
|
+
"subtype": "whole_object_binding",
|
|
219
|
+
"title": "Create user binds entire request body to User model",
|
|
220
|
+
"route_id": null,
|
|
221
|
+
"candidate_id": "M-0014",
|
|
222
|
+
"location": {
|
|
223
|
+
"file": "app.py",
|
|
224
|
+
"start_line": 10
|
|
225
|
+
},
|
|
226
|
+
"evidence": [
|
|
227
|
+
{
|
|
228
|
+
"file": "app.py",
|
|
229
|
+
"line": 10,
|
|
230
|
+
"why": "User(**request.json) binds the entire request body to the User model without an allowlist."
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"impact": "Privilege escalation via role field",
|
|
234
|
+
"severity": "critical",
|
|
235
|
+
"confidence": "high",
|
|
236
|
+
"cwe": [
|
|
237
|
+
"CWE-915"
|
|
238
|
+
],
|
|
239
|
+
"recommendation": "Limit fields to an allowlist; set privileged fields server\u2011side.",
|
|
240
|
+
"status": "unverified",
|
|
241
|
+
"attack_vector": {
|
|
242
|
+
"method": "POST",
|
|
243
|
+
"path": "/users",
|
|
244
|
+
"fields": {
|
|
245
|
+
"role": "admin"
|
|
246
|
+
},
|
|
247
|
+
"readback": "GET /users/123"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"privilege_route_verdicts": [],
|
|
252
|
+
"candidate_verdicts": [
|
|
253
|
+
{
|
|
254
|
+
"candidate_id": "M-0006",
|
|
255
|
+
"verdict": "vulnerable"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"candidate_id": "M-0007",
|
|
259
|
+
"verdict": "vulnerable"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"candidate_id": "M-0008",
|
|
263
|
+
"verdict": "vulnerable"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"candidate_id": "M-0009",
|
|
267
|
+
"verdict": "vulnerable"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"candidate_id": "M-0010",
|
|
271
|
+
"verdict": "vulnerable"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"candidate_id": "M-0013",
|
|
275
|
+
"verdict": "safe",
|
|
276
|
+
"reason": "no privileged field"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"candidate_id": "M-0015",
|
|
280
|
+
"verdict": "vulnerable"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"candidate_id": "M-0014",
|
|
284
|
+
"verdict": "vulnerable"
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|