@zerothreatai/vulnerability-registry 4.0.0 → 5.0.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.
Files changed (58) hide show
  1. package/dist/categories/authentication.js +17 -17
  2. package/dist/categories/configuration.js +80 -80
  3. package/dist/categories/injection.js +34 -34
  4. package/dist/categories/sensitive-paths.js +84 -84
  5. package/dist/categories/ssrf.js +11 -11
  6. package/dist/categories/xss.js +15 -15
  7. package/dist-cjs/categories/authentication.js +17 -17
  8. package/dist-cjs/categories/configuration.js +80 -80
  9. package/dist-cjs/categories/injection.js +34 -34
  10. package/dist-cjs/categories/sensitive-paths.js +84 -84
  11. package/dist-cjs/categories/ssrf.js +11 -11
  12. package/dist-cjs/categories/xss.js +15 -15
  13. package/package.json +35 -32
  14. package/scripts/assign-ids.ts +105 -0
  15. package/scripts/check-duplicate-ids.ts +45 -0
  16. package/src/categories/authentication.ts +17 -17
  17. package/src/categories/configuration.ts +80 -80
  18. package/src/categories/injection.ts +34 -34
  19. package/src/categories/sensitive-paths.ts +84 -84
  20. package/src/categories/ssrf.ts +11 -11
  21. package/src/categories/xss.ts +15 -15
  22. package/src/id-registry.json +1235 -0
  23. package/src/categories/authentication.d.ts +0 -8
  24. package/src/categories/authentication.d.ts.map +0 -1
  25. package/src/categories/authentication.js +0 -392
  26. package/src/categories/authentication.js.map +0 -1
  27. package/src/categories/configuration.d.ts +0 -8
  28. package/src/categories/configuration.d.ts.map +0 -1
  29. package/src/categories/configuration.js +0 -1782
  30. package/src/categories/configuration.js.map +0 -1
  31. package/src/categories/injection.d.ts +0 -8
  32. package/src/categories/injection.d.ts.map +0 -1
  33. package/src/categories/injection.js +0 -781
  34. package/src/categories/injection.js.map +0 -1
  35. package/src/categories/sensitive-paths.d.ts +0 -9
  36. package/src/categories/sensitive-paths.d.ts.map +0 -1
  37. package/src/categories/sensitive-paths.js +0 -1872
  38. package/src/categories/sensitive-paths.js.map +0 -1
  39. package/src/categories/ssrf.d.ts +0 -8
  40. package/src/categories/ssrf.d.ts.map +0 -1
  41. package/src/categories/ssrf.js +0 -258
  42. package/src/categories/ssrf.js.map +0 -1
  43. package/src/categories/xss.d.ts +0 -7
  44. package/src/categories/xss.d.ts.map +0 -1
  45. package/src/categories/xss.js +0 -340
  46. package/src/categories/xss.js.map +0 -1
  47. package/src/error-codes.d.ts +0 -280
  48. package/src/error-codes.d.ts.map +0 -1
  49. package/src/error-codes.js +0 -350
  50. package/src/error-codes.js.map +0 -1
  51. package/src/index.d.ts +0 -60
  52. package/src/index.d.ts.map +0 -1
  53. package/src/index.js +0 -92
  54. package/src/index.js.map +0 -1
  55. package/src/types.d.ts +0 -88
  56. package/src/types.d.ts.map +0 -1
  57. package/src/types.js +0 -6
  58. package/src/types.js.map +0 -1
@@ -1,781 +0,0 @@
1
- /**
2
- * Vulnerability Registry - Injection Vulnerabilities
3
- *
4
- * Definitions for SQL Injection, Command Injection, SSTI, XXE, LFI
5
- */
6
- import { VulnerabilityCode } from '../error-codes.js';
7
- export const INJECTION_VULNERABILITIES = {
8
- // ========================================
9
- // SQL INJECTION
10
- // ========================================
11
- [VulnerabilityCode.SQLI_ERROR_BASED]: {
12
- id: 1,
13
- code: VulnerabilityCode.SQLI_ERROR_BASED,
14
- title: 'SQL Injection - Error Based',
15
- description: 'Error-based SQL injection vulnerability detected where database error messages are reflected in the application response, allowing attackers to extract sensitive data from the database by manipulating SQL queries and analyzing error output.',
16
- severity: 'high',
17
- levelId: 2,
18
- category: 'injection',
19
- scanner: 'sql-injection',
20
- cvss: {
21
- score: 8.6,
22
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N',
23
- severity: 'HIGH',
24
- },
25
- cwe: [
26
- { id: 'CWE-89', name: 'SQL Injection', url: 'https://cwe.mitre.org/data/definitions/89.html' },
27
- ],
28
- owasp: [
29
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
30
- ],
31
- remediation: 'Use parameterized queries or prepared statements. Implement input validation and sanitization. Use stored procedures with parameterized inputs. Apply principle of least privilege to database accounts.',
32
- },
33
- [VulnerabilityCode.SQLI_BOOLEAN_BASED]: {
34
- id: 2,
35
- code: VulnerabilityCode.SQLI_BOOLEAN_BASED,
36
- title: 'SQL Injection - Boolean Based Blind',
37
- description: 'Boolean-based blind SQL injection vulnerability where the application responds differently based on whether injected conditions evaluate to true or false, enabling attackers to infer database contents one bit at a time through systematic query manipulation.',
38
- severity: 'high',
39
- levelId: 2,
40
- category: 'injection',
41
- scanner: 'sql-injection',
42
- cvss: {
43
- score: 8.1,
44
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N',
45
- severity: 'HIGH',
46
- },
47
- cwe: [
48
- { id: 'CWE-89', name: 'SQL Injection', url: 'https://cwe.mitre.org/data/definitions/89.html' },
49
- ],
50
- owasp: [
51
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
52
- ],
53
- remediation: 'Use parameterized queries or prepared statements. Implement consistent error handling that does not reveal query success/failure. Apply input validation and output encoding.',
54
- },
55
- [VulnerabilityCode.SQLI_TIME_BASED]: {
56
- id: 3,
57
- code: VulnerabilityCode.SQLI_TIME_BASED,
58
- title: 'SQL Injection - Time Based Blind',
59
- description: 'Time-based blind SQL injection vulnerability where attackers can infer database contents by measuring response time differences caused by injected time delay functions like SLEEP() or WAITFOR, enabling complete database extraction through timing analysis.',
60
- severity: 'high',
61
- levelId: 2,
62
- category: 'injection',
63
- scanner: 'sql-injection',
64
- cvss: {
65
- score: 8.1,
66
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N',
67
- severity: 'HIGH',
68
- },
69
- cwe: [
70
- { id: 'CWE-89', name: 'SQL Injection', url: 'https://cwe.mitre.org/data/definitions/89.html' },
71
- ],
72
- owasp: [
73
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
74
- ],
75
- remediation: 'Use parameterized queries or prepared statements. Implement query timeout limits. Apply input validation and sanitization. Monitor for abnormally slow queries.',
76
- },
77
- [VulnerabilityCode.SQLI_STACK_BASED]: {
78
- id: 4,
79
- code: VulnerabilityCode.SQLI_STACK_BASED,
80
- title: 'SQL Injection - Stacked Queries',
81
- description: 'Critical stacked queries SQL injection vulnerability allowing attackers to execute multiple SQL statements in a single query, enabling destructive operations like DROP TABLE, INSERT into admin tables, or creating backdoor accounts with full database control.',
82
- severity: 'critical',
83
- levelId: 1,
84
- category: 'injection',
85
- scanner: 'sql-injection',
86
- cvss: {
87
- score: 10.0,
88
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H',
89
- severity: 'CRITICAL',
90
- },
91
- cwe: [
92
- { id: 'CWE-89', name: 'SQL Injection', url: 'https://cwe.mitre.org/data/definitions/89.html' },
93
- ],
94
- owasp: [
95
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
96
- ],
97
- remediation: 'Use parameterized queries exclusively. Disable multi-statement execution in database drivers. Implement strict input validation. Apply least privilege database permissions and prevent DDL execution.',
98
- },
99
- [VulnerabilityCode.SQLI_UNION_BASED]: {
100
- id: 5,
101
- code: VulnerabilityCode.SQLI_UNION_BASED,
102
- title: 'SQL Injection - UNION Based',
103
- description: 'UNION-based SQL injection vulnerability allowing attackers to append additional SELECT queries using UNION operator, enabling direct extraction of data from other database tables including user credentials, personal information, and sensitive business data.',
104
- severity: 'high',
105
- levelId: 2,
106
- category: 'injection',
107
- scanner: 'sql-injection',
108
- cvss: {
109
- score: 8.6,
110
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N',
111
- severity: 'HIGH',
112
- },
113
- cwe: [
114
- { id: 'CWE-89', name: 'SQL Injection', url: 'https://cwe.mitre.org/data/definitions/89.html' },
115
- ],
116
- owasp: [
117
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
118
- ],
119
- remediation: 'Use parameterized queries or prepared statements. Validate and sanitize all user inputs. Implement column-level access controls. Apply least privilege to database accounts.',
120
- },
121
- // ========================================
122
- // COMMAND INJECTION
123
- // ========================================
124
- [VulnerabilityCode.CMDI_OOB_CONFIRMED]: {
125
- id: 6,
126
- code: VulnerabilityCode.CMDI_OOB_CONFIRMED,
127
- title: 'OS Command Injection - OOB Confirmed',
128
- description: 'Critical OS command injection vulnerability confirmed through out-of-band callback detection, proving that attacker-controlled shell commands are being executed on the server operating system with full access to system resources and potential for complete server compromise.',
129
- severity: 'critical',
130
- levelId: 1,
131
- category: 'injection',
132
- scanner: 'command-injection',
133
- cvss: {
134
- score: 10.0,
135
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H',
136
- severity: 'CRITICAL',
137
- },
138
- cwe: [
139
- { id: 'CWE-78', name: 'OS Command Injection', url: 'https://cwe.mitre.org/data/definitions/78.html' },
140
- ],
141
- owasp: [
142
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
143
- ],
144
- remediation: 'Avoid system calls with user input entirely. Use language-specific APIs instead of shell commands. Implement strict input validation with allowlists. Run applications with minimal OS privileges in sandboxed environments.',
145
- },
146
- [VulnerabilityCode.CMDI_REFLECTED]: {
147
- id: 7,
148
- code: VulnerabilityCode.CMDI_REFLECTED,
149
- title: 'OS Command Injection - Reflected Output',
150
- description: 'OS command injection vulnerability confirmed by command output being reflected in the application response, indicating that shell commands execute on the server and their results are returned to the attacker for data exfiltration and system reconnaissance.',
151
- severity: 'critical',
152
- levelId: 1,
153
- category: 'injection',
154
- scanner: 'command-injection',
155
- cvss: {
156
- score: 10.0,
157
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H',
158
- severity: 'CRITICAL',
159
- },
160
- cwe: [
161
- { id: 'CWE-78', name: 'OS Command Injection', url: 'https://cwe.mitre.org/data/definitions/78.html' },
162
- ],
163
- owasp: [
164
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
165
- ],
166
- remediation: 'Replace shell command execution with native language APIs. Implement strict input validation using allowlists. Escape shell metacharacters if commands are unavoidable. Sandbox application execution environments.',
167
- },
168
- [VulnerabilityCode.CMDI_TIME_BASED]: {
169
- id: 8,
170
- code: VulnerabilityCode.CMDI_TIME_BASED,
171
- title: 'OS Command Injection - Time Based',
172
- description: 'Time-based OS command injection vulnerability detected through measurable response time delays caused by injected sleep or ping commands, strongly indicating that shell commands execute on the server even though output is not directly visible in responses.',
173
- severity: 'high',
174
- levelId: 2,
175
- category: 'injection',
176
- scanner: 'command-injection',
177
- cvss: {
178
- score: 8.6,
179
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N',
180
- severity: 'HIGH',
181
- },
182
- cwe: [
183
- { id: 'CWE-78', name: 'OS Command Injection', url: 'https://cwe.mitre.org/data/definitions/78.html' },
184
- ],
185
- owasp: [
186
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
187
- ],
188
- remediation: 'Avoid executing system commands with user input. Use native APIs for required functionality. Implement strict input validation. Set command execution timeouts and monitor for anomalous delays.',
189
- },
190
- [VulnerabilityCode.CMDI_ERROR_BASED]: {
191
- id: 9,
192
- code: VulnerabilityCode.CMDI_ERROR_BASED,
193
- title: 'OS Command Injection - Error Based',
194
- description: 'Potential OS command injection vulnerability indicated by distinctive error messages or system-level exceptions in the application response when malformed shell payloads are submitted, suggesting command execution attempts reach the operating system interpreter.',
195
- severity: 'medium',
196
- levelId: 3,
197
- category: 'injection',
198
- scanner: 'command-injection',
199
- cvss: {
200
- score: 5.3,
201
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N',
202
- severity: 'MEDIUM',
203
- },
204
- cwe: [
205
- { id: 'CWE-78', name: 'OS Command Injection', url: 'https://cwe.mitre.org/data/definitions/78.html' },
206
- ],
207
- owasp: [
208
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
209
- ],
210
- remediation: 'Investigate the input handling code path. Avoid shell command execution where possible. Implement proper error handling that does not expose system information. Apply input validation.',
211
- },
212
- // ========================================
213
- // SERVER-SIDE TEMPLATE INJECTION
214
- // ========================================
215
- [VulnerabilityCode.SSTI_JINJA2]: {
216
- id: 10,
217
- code: VulnerabilityCode.SSTI_JINJA2,
218
- title: 'Server-Side Template Injection - Jinja2',
219
- description: 'Critical server-side template injection vulnerability in Jinja2 (Python/Flask) where user input is processed as template code, enabling attackers to execute arbitrary Python code on the server through template expressions like {{config}} or {{request.application.__globals__}}.',
220
- severity: 'critical',
221
- levelId: 1,
222
- category: 'injection',
223
- scanner: 'ssti',
224
- cvss: {
225
- score: 9.8,
226
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
227
- severity: 'CRITICAL',
228
- },
229
- cwe: [
230
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
231
- ],
232
- owasp: [
233
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
234
- ],
235
- remediation: 'Never pass user input directly to template rendering. Use sandboxed template environments with restricted builtins. Prefer logic-less templates like Mustache. Implement strict input validation before template processing.',
236
- },
237
- [VulnerabilityCode.SSTI_TWIG]: {
238
- id: 11,
239
- code: VulnerabilityCode.SSTI_TWIG,
240
- title: 'Server-Side Template Injection - Twig',
241
- description: 'Critical server-side template injection vulnerability in Twig (PHP/Symfony) where user input is evaluated as template expressions, allowing attackers to execute arbitrary PHP code on the server through filter chains and object method invocations within template syntax.',
242
- severity: 'critical',
243
- levelId: 1,
244
- category: 'injection',
245
- scanner: 'ssti',
246
- cvss: {
247
- score: 9.8,
248
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
249
- severity: 'CRITICAL',
250
- },
251
- cwe: [
252
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
253
- ],
254
- owasp: [
255
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
256
- ],
257
- remediation: 'Avoid rendering user input as templates. Use Twig sandbox mode with whitelisted tags, filters, and functions. Upgrade to latest Twig version with security patches. Validate and sanitize all inputs.',
258
- },
259
- [VulnerabilityCode.SSTI_FREEMARKER]: {
260
- id: 12,
261
- code: VulnerabilityCode.SSTI_FREEMARKER,
262
- title: 'Server-Side Template Injection - FreeMarker',
263
- description: 'Critical server-side template injection vulnerability in FreeMarker (Java) where user-controlled data is interpreted as template directives, enabling remote code execution through Java class instantiation and method invocation via FreeMarker built-in expressions.',
264
- severity: 'critical',
265
- levelId: 1,
266
- category: 'injection',
267
- scanner: 'ssti',
268
- cvss: {
269
- score: 9.8,
270
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
271
- severity: 'CRITICAL',
272
- },
273
- cwe: [
274
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
275
- ],
276
- owasp: [
277
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
278
- ],
279
- remediation: 'Never interpolate user input into templates. Configure FreeMarker with restricted class resolver. Disable new() built-in and api built-ins. Use template configuration to restrict available classes.',
280
- },
281
- [VulnerabilityCode.SSTI_GENERIC]: {
282
- id: 13,
283
- code: VulnerabilityCode.SSTI_GENERIC,
284
- title: 'Server-Side Template Injection - Generic',
285
- description: 'Server-side template injection vulnerability detected where user input is being processed by a template engine, potentially allowing code execution. The specific template engine could not be determined, but mathematical expression evaluation confirms server-side processing of user input.',
286
- severity: 'high',
287
- levelId: 2,
288
- category: 'injection',
289
- scanner: 'ssti',
290
- cvss: {
291
- score: 7.5,
292
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
293
- severity: 'HIGH',
294
- },
295
- cwe: [
296
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
297
- ],
298
- owasp: [
299
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
300
- ],
301
- remediation: 'Identify the template engine in use and apply engine-specific mitigations. Never pass user input to template rendering. Use sandboxed template environments. Implement strict input validation.',
302
- },
303
- [VulnerabilityCode.SSTI_VELOCITY]: {
304
- id: 14,
305
- code: VulnerabilityCode.SSTI_VELOCITY,
306
- title: 'Server-Side Template Injection - Velocity',
307
- description: 'Critical server-side template injection vulnerability in Apache Velocity (Java) where user-controlled data is processed as template directives, enabling arbitrary Java code execution through Velocity Template Language expressions and class instantiation.',
308
- severity: 'critical',
309
- levelId: 1,
310
- category: 'injection',
311
- scanner: 'ssti',
312
- cvss: {
313
- score: 9.8,
314
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
315
- severity: 'CRITICAL',
316
- },
317
- cwe: [
318
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
319
- ],
320
- owasp: [
321
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
322
- ],
323
- remediation: 'Never render user input as Velocity templates. Configure SecureUberspector to block dangerous method calls. Use Velocity tools with restricted capabilities. Apply input validation.',
324
- },
325
- [VulnerabilityCode.SSTI_THYMELEAF]: {
326
- id: 15,
327
- code: VulnerabilityCode.SSTI_THYMELEAF,
328
- title: 'Server-Side Template Injection - Thymeleaf',
329
- description: 'Critical server-side template injection vulnerability in Thymeleaf (Spring/Java) where user input is processed as template expressions, enabling remote code execution through SpEL (Spring Expression Language) injection in template attributes.',
330
- severity: 'critical',
331
- levelId: 1,
332
- category: 'injection',
333
- scanner: 'ssti',
334
- cvss: {
335
- score: 9.8,
336
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
337
- severity: 'CRITICAL',
338
- },
339
- cwe: [
340
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
341
- ],
342
- owasp: [
343
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
344
- ],
345
- remediation: 'Never concatenate user input into template expressions. Use th:text for displaying user data. Configure SpringTemplateEngine to restrict expression capabilities.',
346
- },
347
- [VulnerabilityCode.SSTI_ERB]: {
348
- id: 16,
349
- code: VulnerabilityCode.SSTI_ERB,
350
- title: 'Server-Side Template Injection - ERB',
351
- description: 'Critical server-side template injection vulnerability in ERB (Ruby on Rails) where user input is embedded in ERB templates and executed as Ruby code, enabling arbitrary system command execution and complete server compromise through Ruby runtime access.',
352
- severity: 'critical',
353
- levelId: 1,
354
- category: 'injection',
355
- scanner: 'ssti',
356
- cvss: {
357
- score: 9.8,
358
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
359
- severity: 'CRITICAL',
360
- },
361
- cwe: [
362
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
363
- ],
364
- owasp: [
365
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
366
- ],
367
- remediation: 'Never pass user input to ERB.new(). Use Rails html_safe only after proper sanitization. Prefer logic-less templates. Implement strict input validation before any rendering.',
368
- },
369
- [VulnerabilityCode.SSTI_EJS]: {
370
- id: 17,
371
- code: VulnerabilityCode.SSTI_EJS,
372
- title: 'Server-Side Template Injection - EJS',
373
- description: 'Critical server-side template injection vulnerability in EJS (Node.js) where user-controlled data is processed as template code, allowing arbitrary JavaScript execution on the server through embedded JavaScript expressions and access to Node.js runtime.',
374
- severity: 'critical',
375
- levelId: 1,
376
- category: 'injection',
377
- scanner: 'ssti',
378
- cvss: {
379
- score: 9.8,
380
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
381
- severity: 'CRITICAL',
382
- },
383
- cwe: [
384
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
385
- ],
386
- owasp: [
387
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
388
- ],
389
- remediation: 'Never pass user input directly to ejs.render(). Use ejs.escape() for user data. Pass data through template locals only. Consider switching to logic-less templates like Handlebars.',
390
- },
391
- [VulnerabilityCode.SSTI_PUG]: {
392
- id: 18,
393
- code: VulnerabilityCode.SSTI_PUG,
394
- title: 'Server-Side Template Injection - Pug/Jade',
395
- description: 'Critical server-side template injection vulnerability in Pug (formerly Jade, Node.js) where user input is interpreted as template syntax, enabling arbitrary JavaScript code execution through Pug embedded code blocks and access to server-side Node.js environment.',
396
- severity: 'critical',
397
- levelId: 1,
398
- category: 'injection',
399
- scanner: 'ssti',
400
- cvss: {
401
- score: 9.8,
402
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
403
- severity: 'CRITICAL',
404
- },
405
- cwe: [
406
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
407
- ],
408
- owasp: [
409
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
410
- ],
411
- remediation: 'Never compile user input as Pug templates. Pass user data only through template locals. Avoid pug.compile() with user-controlled template strings. Use static templates only.',
412
- },
413
- [VulnerabilityCode.SSTI_SMARTY]: {
414
- id: 19,
415
- code: VulnerabilityCode.SSTI_SMARTY,
416
- title: 'Server-Side Template Injection - Smarty',
417
- description: 'Critical server-side template injection vulnerability in Smarty (PHP) where user input is processed as template code, enabling arbitrary PHP code execution through Smarty tags and function calls that can lead to complete server compromise.',
418
- severity: 'critical',
419
- levelId: 1,
420
- category: 'injection',
421
- scanner: 'ssti',
422
- cvss: {
423
- score: 9.8,
424
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
425
- severity: 'CRITICAL',
426
- },
427
- cwe: [
428
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
429
- ],
430
- owasp: [
431
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
432
- ],
433
- remediation: 'Enable Smarty security_policy to restrict allowed tags and modifiers. Never pass user input to template compilation. Disable {php} tags. Use Smarty 3+ with security features enabled.',
434
- },
435
- [VulnerabilityCode.SSTI_MAKO]: {
436
- id: 20,
437
- code: VulnerabilityCode.SSTI_MAKO,
438
- title: 'Server-Side Template Injection - Mako',
439
- description: 'Critical server-side template injection vulnerability in Mako (Python) where user-controlled data is executed as template code, enabling arbitrary Python code execution through Mako expressions and full access to the Python runtime environment.',
440
- severity: 'critical',
441
- levelId: 1,
442
- category: 'injection',
443
- scanner: 'ssti',
444
- cvss: {
445
- score: 9.8,
446
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
447
- severity: 'CRITICAL',
448
- },
449
- cwe: [
450
- { id: 'CWE-1336', name: 'Template Injection', url: 'https://cwe.mitre.org/data/definitions/1336.html' },
451
- ],
452
- owasp: [
453
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
454
- ],
455
- remediation: 'Never pass user input to Template() constructor. Use template.render() with sanitized context data only. Consider switching to sandboxed template engines like Jinja2 with restricted mode.',
456
- },
457
- // ========================================
458
- // XXE (XML EXTERNAL ENTITY) - Additional
459
- // ========================================
460
- [VulnerabilityCode.XXE_ERROR_BASED]: {
461
- id: 21,
462
- code: VulnerabilityCode.XXE_ERROR_BASED,
463
- title: 'XML External Entity Injection - Error Based',
464
- description: 'Error-based XXE vulnerability where file contents can be extracted through parser error messages by crafting malformed external entities that include file data in error output, enabling data exfiltration even when direct output is not reflected.',
465
- severity: 'high',
466
- levelId: 2,
467
- category: 'injection',
468
- scanner: 'xxe',
469
- cvss: {
470
- score: 7.5,
471
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
472
- severity: 'HIGH',
473
- },
474
- cwe: [
475
- { id: 'CWE-611', name: 'XXE', url: 'https://cwe.mitre.org/data/definitions/611.html' },
476
- ],
477
- owasp: [
478
- { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
479
- ],
480
- remediation: 'Disable DTD processing entirely in XML parser configuration. Suppress detailed error messages in production. Implement custom error handlers that do not expose file contents.',
481
- },
482
- [VulnerabilityCode.XXE_PARAMETER_ENTITY]: {
483
- id: 22,
484
- code: VulnerabilityCode.XXE_PARAMETER_ENTITY,
485
- title: 'XML External Entity Injection - Parameter Entity',
486
- description: 'XXE vulnerability exploiting parameter entities in DTD declarations to exfiltrate data or perform SSRF attacks when regular external entities are blocked, by using percent-encoded entity references within the document type definition.',
487
- severity: 'high',
488
- levelId: 2,
489
- category: 'injection',
490
- scanner: 'xxe',
491
- cvss: {
492
- score: 7.5,
493
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
494
- severity: 'HIGH',
495
- },
496
- cwe: [
497
- { id: 'CWE-611', name: 'XXE', url: 'https://cwe.mitre.org/data/definitions/611.html' },
498
- ],
499
- owasp: [
500
- { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
501
- ],
502
- remediation: 'Disable parameter entity expansion in addition to external entities. Block all DTD processing. Use XML parsers with secure defaults and verification of XXE mitigations.',
503
- },
504
- // ========================================
505
- // LOCAL FILE INCLUSION - Additional
506
- // ========================================
507
- [VulnerabilityCode.LFI_FILTER_BYPASS]: {
508
- id: 23,
509
- code: VulnerabilityCode.LFI_FILTER_BYPASS,
510
- title: 'Local File Inclusion - Filter Bypass',
511
- description: 'Local file inclusion vulnerability that bypasses input validation filters through encoding tricks (URL encoding, double encoding, null bytes), alternate path separators, or case manipulation to access files despite security controls.',
512
- severity: 'high',
513
- levelId: 2,
514
- category: 'file_inclusion',
515
- scanner: 'local-file-inclusion',
516
- cvss: {
517
- score: 7.5,
518
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
519
- severity: 'HIGH',
520
- },
521
- cwe: [
522
- { id: 'CWE-22', name: 'Path Traversal', url: 'https://cwe.mitre.org/data/definitions/22.html' },
523
- ],
524
- owasp: [
525
- { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
526
- ],
527
- remediation: 'Use canonicalization after decoding before validation. Implement allowlist of permitted files instead of blocklist. Validate resolved paths are within expected directories.',
528
- },
529
- [VulnerabilityCode.LFI_PROC_DISCLOSURE]: {
530
- id: 24,
531
- code: VulnerabilityCode.LFI_PROC_DISCLOSURE,
532
- title: 'Local File Inclusion - Process Information Disclosure',
533
- description: 'LFI vulnerability enabling access to /proc filesystem on Linux systems, exposing process memory maps, environment variables with credentials, command line arguments, and other runtime information that can reveal secrets and aid further attacks.',
534
- severity: 'high',
535
- levelId: 2,
536
- category: 'file_inclusion',
537
- scanner: 'local-file-inclusion',
538
- cvss: {
539
- score: 7.5,
540
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
541
- severity: 'HIGH',
542
- },
543
- cwe: [
544
- { id: 'CWE-22', name: 'Path Traversal', url: 'https://cwe.mitre.org/data/definitions/22.html' },
545
- ],
546
- owasp: [
547
- { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
548
- ],
549
- remediation: 'Block access to /proc and /sys paths. Run application with restricted filesystem access. Use chroot or containerization. Implement strict file path validation.',
550
- },
551
- // ========================================
552
- // XXE (XML EXTERNAL ENTITY)
553
- // ========================================
554
- [VulnerabilityCode.XXE_CLASSIC]: {
555
- id: 25,
556
- code: VulnerabilityCode.XXE_CLASSIC,
557
- title: 'XML External Entity Injection - Classic',
558
- description: 'Classic XXE vulnerability where external XML entities are processed by the parser, allowing attackers to read local files like /etc/passwd or application configuration files by defining external entities that reference file:// protocol URIs in the XML document type definition.',
559
- severity: 'high',
560
- levelId: 2,
561
- category: 'injection',
562
- scanner: 'xxe',
563
- cvss: {
564
- score: 7.5,
565
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
566
- severity: 'HIGH',
567
- },
568
- cwe: [
569
- { id: 'CWE-611', name: 'XXE', url: 'https://cwe.mitre.org/data/definitions/611.html' },
570
- ],
571
- owasp: [
572
- { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
573
- ],
574
- remediation: 'Disable DTD processing entirely. Disable external entity resolution in XML parser configuration. Use less complex data formats like JSON where possible. Validate and sanitize XML input.',
575
- },
576
- [VulnerabilityCode.XXE_BLIND]: {
577
- id: 26,
578
- code: VulnerabilityCode.XXE_BLIND,
579
- title: 'XML External Entity Injection - Blind',
580
- description: 'Blind XXE vulnerability where external entities are processed but file contents are not directly returned in the response. Exploitation requires out-of-band techniques like error-based extraction or HTTP callbacks to exfiltrate data from the target server.',
581
- severity: 'high',
582
- levelId: 2,
583
- category: 'injection',
584
- scanner: 'xxe',
585
- cvss: {
586
- score: 7.5,
587
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
588
- severity: 'HIGH',
589
- },
590
- cwe: [
591
- { id: 'CWE-611', name: 'XXE', url: 'https://cwe.mitre.org/data/definitions/611.html' },
592
- ],
593
- owasp: [
594
- { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
595
- ],
596
- remediation: 'Disable DTD and external entity processing in XML parser. Block outbound network connections from XML processing servers. Use JSON instead of XML where possible.',
597
- },
598
- [VulnerabilityCode.XXE_OOB]: {
599
- id: 27,
600
- code: VulnerabilityCode.XXE_OOB,
601
- title: 'XML External Entity Injection - Out-of-Band',
602
- description: 'Critical out-of-band XXE vulnerability confirmed through external HTTP/DNS callbacks, proving the XML parser fetches external resources. This enables data exfiltration through URL parameters and server-side request forgery attacks against internal network resources.',
603
- severity: 'critical',
604
- levelId: 1,
605
- category: 'injection',
606
- scanner: 'xxe',
607
- cvss: {
608
- score: 9.1,
609
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N',
610
- severity: 'CRITICAL',
611
- },
612
- cwe: [
613
- { id: 'CWE-611', name: 'XXE', url: 'https://cwe.mitre.org/data/definitions/611.html' },
614
- { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
615
- ],
616
- owasp: [
617
- { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
618
- ],
619
- remediation: 'Disable all external entity processing. Block outbound network connections. Implement network segmentation. Use allowlist for any required external resources.',
620
- },
621
- // ========================================
622
- // LOCAL FILE INCLUSION
623
- // ========================================
624
- [VulnerabilityCode.LFI_PATH_TRAVERSAL]: {
625
- id: 28,
626
- code: VulnerabilityCode.LFI_PATH_TRAVERSAL,
627
- title: 'Local File Inclusion - Path Traversal',
628
- description: 'Path traversal vulnerability allowing attackers to read arbitrary files on the server by manipulating file path parameters with directory traversal sequences like ../ to escape the intended directory and access sensitive system or application configuration files.',
629
- severity: 'high',
630
- levelId: 2,
631
- category: 'file_inclusion',
632
- scanner: 'local-file-inclusion',
633
- cvss: {
634
- score: 7.5,
635
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
636
- severity: 'HIGH',
637
- },
638
- cwe: [
639
- { id: 'CWE-22', name: 'Path Traversal', url: 'https://cwe.mitre.org/data/definitions/22.html' },
640
- { id: 'CWE-98', name: 'LFI', url: 'https://cwe.mitre.org/data/definitions/98.html' },
641
- ],
642
- owasp: [
643
- { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
644
- ],
645
- remediation: 'Validate all file path inputs against an allowlist of permitted files. Canonicalize paths and verify they remain within expected directories. Use indirect file references instead of direct paths.',
646
- },
647
- [VulnerabilityCode.LFI_SOURCE_DISCLOSURE]: {
648
- id: 29,
649
- code: VulnerabilityCode.LFI_SOURCE_DISCLOSURE,
650
- title: 'Local File Inclusion - Source Code Disclosure',
651
- description: 'Critical source code disclosure vulnerability where application source files can be read through file inclusion, exposing proprietary code, hardcoded credentials, API keys, database connection strings, and security implementation details that facilitate further attacks.',
652
- severity: 'high',
653
- levelId: 2,
654
- category: 'file_inclusion',
655
- scanner: 'local-file-inclusion',
656
- cvss: {
657
- score: 8.6,
658
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N',
659
- severity: 'HIGH',
660
- },
661
- cwe: [
662
- { id: 'CWE-22', name: 'Path Traversal', url: 'https://cwe.mitre.org/data/definitions/22.html' },
663
- { id: 'CWE-540', name: 'Source Code in Executable', url: 'https://cwe.mitre.org/data/definitions/540.html' },
664
- ],
665
- owasp: [
666
- { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
667
- ],
668
- remediation: 'Use allowlist validation for file access. Store source files outside web root. Implement proper access controls on file reading functionality. Remove any debug endpoints that read files.',
669
- },
670
- [VulnerabilityCode.LFI_WRAPPER_PROTOCOL]: {
671
- id: 30,
672
- code: VulnerabilityCode.LFI_WRAPPER_PROTOCOL,
673
- title: 'Local File Inclusion - PHP Wrapper Protocol',
674
- description: 'PHP wrapper protocol exploitation where filter or data wrappers like php://filter or php://input can be used to read source files as base64, write arbitrary files, or achieve remote code execution through deserialization when phar:// wrapper is enabled.',
675
- severity: 'critical',
676
- levelId: 1,
677
- category: 'file_inclusion',
678
- scanner: 'local-file-inclusion',
679
- cvss: {
680
- score: 9.8,
681
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H',
682
- severity: 'CRITICAL',
683
- },
684
- cwe: [
685
- { id: 'CWE-98', name: 'LFI', url: 'https://cwe.mitre.org/data/definitions/98.html' },
686
- ],
687
- owasp: [
688
- { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
689
- ],
690
- remediation: 'Disable allow_url_include and allow_url_fopen in PHP configuration. Filter and validate all file path inputs. Block protocol wrappers in user input. Use allowlist for file access.',
691
- },
692
- [VulnerabilityCode.XPATH_AUTH_BYPASS]: {
693
- id: 136,
694
- code: VulnerabilityCode.XPATH_AUTH_BYPASS,
695
- title: 'XPath Injection - Authentication Bypass',
696
- description: 'XPath injection vulnerability where crafted input manipulates XPath queries to bypass authentication or authorization checks, allowing attackers to log in as other users or access protected resources without valid credentials.',
697
- severity: 'high',
698
- levelId: 2,
699
- category: 'injection',
700
- scanner: 'xpath-injection',
701
- cvss: {
702
- score: 8.1,
703
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N',
704
- severity: 'HIGH',
705
- },
706
- cwe: [
707
- { id: 'CWE-643', name: 'Improper Neutralization of XPath Expression', url: 'https://cwe.mitre.org/data/definitions/643.html' },
708
- ],
709
- owasp: [
710
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
711
- ],
712
- remediation: 'Use parameterized XPath queries or safe APIs that separate data from query logic. Validate and constrain user input for XPath contexts. Use allowlists and avoid dynamic XPath string concatenation.',
713
- },
714
- [VulnerabilityCode.XPATH_DATA_EXTRACTION]: {
715
- id: 137,
716
- code: VulnerabilityCode.XPATH_DATA_EXTRACTION,
717
- title: 'XPath Injection - Data Extraction',
718
- description: 'XPath injection vulnerability that allows attackers to read or enumerate sensitive XML data by manipulating query predicates, leading to disclosure of user data, configuration, or credentials stored in XML-backed systems.',
719
- severity: 'high',
720
- levelId: 2,
721
- category: 'injection',
722
- scanner: 'xpath-injection',
723
- cvss: {
724
- score: 7.5,
725
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N',
726
- severity: 'HIGH',
727
- },
728
- cwe: [
729
- { id: 'CWE-643', name: 'Improper Neutralization of XPath Expression', url: 'https://cwe.mitre.org/data/definitions/643.html' },
730
- ],
731
- owasp: [
732
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
733
- ],
734
- remediation: 'Use safe XPath APIs with variables/bind parameters. Apply strict input validation and encoding for XPath contexts. Restrict accessible XML data and apply least-privilege access controls.',
735
- },
736
- [VulnerabilityCode.XPATH_BLIND]: {
737
- id: 138,
738
- code: VulnerabilityCode.XPATH_BLIND,
739
- title: 'XPath Injection - Blind',
740
- description: 'Blind XPath injection vulnerability where attackers infer query results through boolean or timing differences, enabling gradual extraction of sensitive XML data despite no direct response output.',
741
- severity: 'medium',
742
- levelId: 3,
743
- category: 'injection',
744
- scanner: 'xpath-injection',
745
- cvss: {
746
- score: 6.1,
747
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N',
748
- severity: 'MEDIUM',
749
- },
750
- cwe: [
751
- { id: 'CWE-643', name: 'Improper Neutralization of XPath Expression', url: 'https://cwe.mitre.org/data/definitions/643.html' },
752
- ],
753
- owasp: [
754
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
755
- ],
756
- remediation: 'Use parameterized XPath queries and input validation. Normalize error and response behaviors to reduce side-channel differences. Apply rate limiting to limit inference attacks.',
757
- },
758
- [VulnerabilityCode.XPATH_ERROR_BASED]: {
759
- id: 139,
760
- code: VulnerabilityCode.XPATH_ERROR_BASED,
761
- title: 'XPath Injection - Error Based',
762
- description: 'XPath injection vulnerability where malformed input triggers verbose error messages that reveal query structure or XML data, enabling attackers to craft precise XPath exploits or extract sensitive information.',
763
- severity: 'medium',
764
- levelId: 3,
765
- category: 'injection',
766
- scanner: 'xpath-injection',
767
- cvss: {
768
- score: 5.9,
769
- vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N',
770
- severity: 'MEDIUM',
771
- },
772
- cwe: [
773
- { id: 'CWE-643', name: 'Improper Neutralization of XPath Expression', url: 'https://cwe.mitre.org/data/definitions/643.html' },
774
- ],
775
- owasp: [
776
- { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
777
- ],
778
- remediation: 'Suppress detailed XPath error messages in production. Use safe XPath APIs and validation to prevent injection. Implement centralized error handling with generic responses.',
779
- },
780
- };
781
- export default INJECTION_VULNERABILITIES;