@zerothreatai/vulnerability-registry 3.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 (77) hide show
  1. package/dist/categories/authentication.js +34 -17
  2. package/dist/categories/configuration.js +561 -60
  3. package/dist/categories/injection.js +68 -34
  4. package/dist/categories/sensitive-paths.js +168 -84
  5. package/dist/categories/ssrf.js +22 -11
  6. package/dist/categories/xss.js +30 -15
  7. package/dist/category.d.ts +6 -0
  8. package/dist/category.js +15 -0
  9. package/dist/error-codes.d.ts +20 -0
  10. package/dist/error-codes.js +20 -0
  11. package/dist/index.d.ts +9 -1
  12. package/dist/index.js +5 -1
  13. package/dist/scanner.d.ts +6 -0
  14. package/dist/scanner.js +22 -0
  15. package/dist/types.d.ts +2 -0
  16. package/dist-cjs/categories/authentication.js +34 -17
  17. package/dist-cjs/categories/configuration.js +561 -60
  18. package/dist-cjs/categories/injection.js +68 -34
  19. package/dist-cjs/categories/sensitive-paths.js +168 -84
  20. package/dist-cjs/categories/ssrf.js +22 -11
  21. package/dist-cjs/categories/xss.js +30 -15
  22. package/dist-cjs/category.js +18 -0
  23. package/dist-cjs/error-codes.js +20 -0
  24. package/dist-cjs/index.js +7 -1
  25. package/dist-cjs/scanner.js +25 -0
  26. package/package.json +35 -32
  27. package/scripts/assign-ids.ts +105 -0
  28. package/scripts/check-duplicate-ids.ts +45 -0
  29. package/src/categories/authentication.ts +145 -128
  30. package/src/categories/configuration.ts +1632 -1111
  31. package/src/categories/injection.ts +158 -124
  32. package/src/categories/sensitive-paths.ts +168 -84
  33. package/src/categories/ssrf.ts +22 -11
  34. package/src/categories/xss.ts +30 -15
  35. package/src/category.ts +16 -0
  36. package/src/error-codes.ts +25 -5
  37. package/src/id-registry.json +1235 -0
  38. package/src/index.ts +20 -14
  39. package/src/scanner.ts +23 -0
  40. package/src/types.ts +4 -2
  41. package/zerothreatai-vulnerability-registry-4npm .0.0.tgz +0 -0
  42. package/src/categories/authentication.d.ts +0 -8
  43. package/src/categories/authentication.d.ts.map +0 -1
  44. package/src/categories/authentication.js +0 -378
  45. package/src/categories/authentication.js.map +0 -1
  46. package/src/categories/configuration.d.ts +0 -8
  47. package/src/categories/configuration.d.ts.map +0 -1
  48. package/src/categories/configuration.js +0 -906
  49. package/src/categories/configuration.js.map +0 -1
  50. package/src/categories/injection.d.ts +0 -8
  51. package/src/categories/injection.d.ts.map +0 -1
  52. package/src/categories/injection.js +0 -750
  53. package/src/categories/injection.js.map +0 -1
  54. package/src/categories/sensitive-paths.d.ts +0 -9
  55. package/src/categories/sensitive-paths.d.ts.map +0 -1
  56. package/src/categories/sensitive-paths.js +0 -1791
  57. package/src/categories/sensitive-paths.js.map +0 -1
  58. package/src/categories/ssrf.d.ts +0 -8
  59. package/src/categories/ssrf.d.ts.map +0 -1
  60. package/src/categories/ssrf.js +0 -250
  61. package/src/categories/ssrf.js.map +0 -1
  62. package/src/categories/xss.d.ts +0 -7
  63. package/src/categories/xss.d.ts.map +0 -1
  64. package/src/categories/xss.js +0 -328
  65. package/src/categories/xss.js.map +0 -1
  66. package/src/error-codes.d.ts +0 -242
  67. package/src/error-codes.d.ts.map +0 -1
  68. package/src/error-codes.js +0 -315
  69. package/src/error-codes.js.map +0 -1
  70. package/src/index.d.ts +0 -60
  71. package/src/index.d.ts.map +0 -1
  72. package/src/index.js +0 -107
  73. package/src/index.js.map +0 -1
  74. package/src/types.d.ts +0 -86
  75. package/src/types.d.ts.map +0 -1
  76. package/src/types.js +0 -7
  77. package/src/types.js.map +0 -1
@@ -9,11 +9,12 @@ export const AUTH_VULNERABILITIES = {
9
9
  // JWT VULNERABILITIES
10
10
  // ========================================
11
11
  [VulnerabilityCode.JWT_NONE_ALGORITHM]: {
12
- id: 57,
12
+ id: 100,
13
13
  code: VulnerabilityCode.JWT_NONE_ALGORITHM,
14
14
  title: 'JWT Vulnerability - None Algorithm Attack',
15
15
  description: 'Critical JWT vulnerability where the server accepts tokens with "alg": "none" in the header, allowing attackers to forge valid tokens without knowing the secret key by simply removing the signature and modifying claims to impersonate any user including administrators.',
16
16
  severity: 'critical',
17
+ levelId: 1,
17
18
  category: 'authentication',
18
19
  scanner: 'jwt',
19
20
  cvss: {
@@ -30,11 +31,12 @@ export const AUTH_VULNERABILITIES = {
30
31
  remediation: 'Explicitly specify allowed algorithms during JWT verification and reject "none". Use libraries that do not support "none" algorithm. Always validate the algorithm header against expected values.',
31
32
  },
32
33
  [VulnerabilityCode.JWT_WEAK_SECRET]: {
33
- id: 58,
34
+ id: 101,
34
35
  code: VulnerabilityCode.JWT_WEAK_SECRET,
35
36
  title: 'JWT Vulnerability - Weak Secret Key',
36
37
  description: 'JWT implementation using a weak or common secret key for HMAC signature verification that can be brute-forced or found in common secret dictionaries, allowing attackers to forge arbitrary valid tokens and bypass authentication to access any user account.',
37
38
  severity: 'high',
39
+ levelId: 2,
38
40
  category: 'authentication',
39
41
  scanner: 'jwt',
40
42
  cvss: {
@@ -51,11 +53,12 @@ export const AUTH_VULNERABILITIES = {
51
53
  remediation: 'Use cryptographically strong random secrets of at least 256 bits. Consider using asymmetric algorithms (RS256, ES256) instead of HMAC. Rotate secrets periodically.',
52
54
  },
53
55
  [VulnerabilityCode.JWT_KEY_CONFUSION]: {
54
- id: 59,
56
+ id: 102,
55
57
  code: VulnerabilityCode.JWT_KEY_CONFUSION,
56
58
  title: 'JWT Vulnerability - Algorithm Confusion Attack',
57
59
  description: 'JWT key confusion vulnerability where the server public key can be used as an HMAC secret by switching the algorithm from RS256 to HS256, allowing attackers to forge valid tokens using the publicly available key to generate valid HMAC signatures.',
58
60
  severity: 'critical',
61
+ levelId: 1,
59
62
  category: 'authentication',
60
63
  scanner: 'jwt',
61
64
  cvss: {
@@ -75,11 +78,12 @@ export const AUTH_VULNERABILITIES = {
75
78
  // BROKEN ACCESS CONTROL
76
79
  // ========================================
77
80
  [VulnerabilityCode.BAC_ANONYMOUS_ACCESS]: {
78
- id: 60,
81
+ id: 103,
79
82
  code: VulnerabilityCode.BAC_ANONYMOUS_ACCESS,
80
83
  title: 'Broken Access Control - Anonymous Access',
81
84
  description: 'Critical broken access control vulnerability where authenticated endpoints can be accessed without any authentication by simply removing auth headers or cookies, exposing sensitive functionality and data to unauthenticated attackers without any credential requirement.',
82
85
  severity: 'high',
86
+ levelId: 2,
83
87
  category: 'access_control',
84
88
  scanner: 'broken-access',
85
89
  cvss: {
@@ -96,11 +100,12 @@ export const AUTH_VULNERABILITIES = {
96
100
  remediation: 'Enforce authentication checks on all protected endpoints. Implement deny-by-default access control. Verify authentication state server-side before processing any request.',
97
101
  },
98
102
  [VulnerabilityCode.BAC_IDOR]: {
99
- id: 61,
103
+ id: 104,
100
104
  code: VulnerabilityCode.BAC_IDOR,
101
105
  title: 'Broken Access Control - Insecure Direct Object Reference',
102
106
  description: 'IDOR vulnerability where users can access or modify resources belonging to other users by manipulating predictable identifiers like sequential IDs in URLs or request parameters, without proper authorization checks verifying resource ownership.',
103
107
  severity: 'high',
108
+ levelId: 2,
104
109
  category: 'access_control',
105
110
  scanner: 'broken-access',
106
111
  cvss: {
@@ -117,11 +122,12 @@ export const AUTH_VULNERABILITIES = {
117
122
  remediation: 'Implement proper authorization checks verifying resource ownership. Use unpredictable identifiers (UUIDs). Apply consistent access control policies across all endpoints.',
118
123
  },
119
124
  [VulnerabilityCode.BAC_VERTICAL_PRIVILEGE]: {
120
- id: 62,
125
+ id: 105,
121
126
  code: VulnerabilityCode.BAC_VERTICAL_PRIVILEGE,
122
127
  title: 'Broken Access Control - Vertical Privilege Escalation',
123
128
  description: 'Vertical privilege escalation vulnerability allowing regular users to access or perform administrative functions by directly accessing admin endpoints or manipulating role/permission parameters, bypassing role-based access controls to gain elevated privileges.',
124
129
  severity: 'critical',
130
+ levelId: 1,
125
131
  category: 'access_control',
126
132
  scanner: 'broken-access',
127
133
  cvss: {
@@ -141,11 +147,12 @@ export const AUTH_VULNERABILITIES = {
141
147
  // MASS ASSIGNMENT
142
148
  // ========================================
143
149
  [VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION]: {
144
- id: 63,
150
+ id: 106,
145
151
  code: VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION,
146
152
  title: 'Mass Assignment - Role Escalation',
147
153
  description: 'Mass assignment vulnerability allowing attackers to escalate privileges by including additional parameters like "role", "isAdmin", or "permissions" in requests that the application binds to user objects without proper allowlist filtering of settable fields.',
148
154
  severity: 'high',
155
+ levelId: 2,
149
156
  category: 'access_control',
150
157
  scanner: 'model-state',
151
158
  cvss: {
@@ -162,11 +169,12 @@ export const AUTH_VULNERABILITIES = {
162
169
  remediation: 'Use allowlist of permitted fields for each endpoint. Implement separate DTOs for input binding. Never auto-bind request data to domain objects without explicit field selection.',
163
170
  },
164
171
  [VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION]: {
165
- id: 64,
172
+ id: 107,
166
173
  code: VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION,
167
174
  title: 'Mass Assignment - Prototype Pollution',
168
175
  description: 'JavaScript prototype pollution vulnerability through mass assignment where attackers inject __proto__ or constructor.prototype properties that modify the Object prototype globally, potentially leading to denial of service, security bypass, or remote code execution.',
169
176
  severity: 'high',
177
+ levelId: 2,
170
178
  category: 'access_control',
171
179
  scanner: 'model-state',
172
180
  cvss: {
@@ -183,11 +191,12 @@ export const AUTH_VULNERABILITIES = {
183
191
  remediation: 'Freeze Object.prototype. Use Object.create(null) for objects used as maps. Filter __proto__ and constructor properties from user input. Use --frozen-intrinsics Node.js flag.',
184
192
  },
185
193
  [VulnerabilityCode.JWT_EXPIRED_TOKEN]: {
186
- id: 65,
194
+ id: 108,
187
195
  code: VulnerabilityCode.JWT_EXPIRED_TOKEN,
188
196
  title: 'JWT Vulnerability - Expired Token Accepted',
189
197
  description: 'JWT implementation does not properly validate token expiration (exp claim), accepting expired tokens that should be rejected. This allows attackers with previously captured tokens to reuse them indefinitely, maintaining unauthorized access without credential updates.',
190
198
  severity: 'medium',
199
+ levelId: 3,
191
200
  category: 'authentication',
192
201
  scanner: 'jwt',
193
202
  cvss: {
@@ -204,11 +213,12 @@ export const AUTH_VULNERABILITIES = {
204
213
  remediation: 'Always validate exp claim during token verification. Set appropriate token lifetimes. Implement token refresh mechanisms. Use server-side session invalidation for immediate revocation.',
205
214
  },
206
215
  [VulnerabilityCode.JWT_MISSING_CLAIMS]: {
207
- id: 66,
216
+ id: 109,
208
217
  code: VulnerabilityCode.JWT_MISSING_CLAIMS,
209
218
  title: 'JWT Vulnerability - Missing Required Claims',
210
219
  description: 'JWT tokens are missing critical security claims like exp (expiration), iat (issued at), nbf (not before), or iss (issuer), reducing the security guarantees of the token system and potentially allowing token reuse, replay attacks, or cross-tenant access.',
211
220
  severity: 'medium',
221
+ levelId: 3,
212
222
  category: 'authentication',
213
223
  scanner: 'jwt',
214
224
  cvss: {
@@ -225,11 +235,12 @@ export const AUTH_VULNERABILITIES = {
225
235
  remediation: 'Include and validate all standard claims: exp, iat, nbf, iss, aud, sub. Define required claims for your application. Reject tokens missing mandatory claims.',
226
236
  },
227
237
  [VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE]: {
228
- id: 67,
238
+ id: 110,
229
239
  code: VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE,
230
240
  title: 'Broken Access Control - Horizontal Privilege Escalation',
231
241
  description: 'Horizontal privilege escalation vulnerability where authenticated users can access data or perform actions belonging to other users at the same privilege level by manipulating user identifiers, object references, or session parameters without ownership verification.',
232
242
  severity: 'high',
243
+ levelId: 2,
233
244
  category: 'access_control',
234
245
  scanner: 'broken-access',
235
246
  cvss: {
@@ -246,11 +257,12 @@ export const AUTH_VULNERABILITIES = {
246
257
  remediation: 'Implement record-level authorization checks. Verify resource ownership against the authenticated user session. Use indirect references that map to actual resources server-side.',
247
258
  },
248
259
  [VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD]: {
249
- id: 68,
260
+ id: 111,
250
261
  code: VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD,
251
262
  title: 'Mass Assignment - Hidden Field Manipulation',
252
263
  description: 'Mass assignment vulnerability where attackers can modify hidden form fields or server-side computed values like price, discount, userId, or timestamp by including them in request bodies, bypassing UI restrictions to manipulate business logic or data integrity.',
253
264
  severity: 'medium',
265
+ levelId: 3,
254
266
  category: 'access_control',
255
267
  scanner: 'model-state',
256
268
  cvss: {
@@ -267,11 +279,12 @@ export const AUTH_VULNERABILITIES = {
267
279
  remediation: 'Never trust client-provided values for server-computed fields. Use explicit DTOs with allowlisted fields. Recompute amounts, timestamps, and IDs server-side.',
268
280
  },
269
281
  [VulnerabilityCode.JWT_CLAIM_TAMPERING]: {
270
- id: 131,
282
+ id: 112,
271
283
  code: VulnerabilityCode.JWT_CLAIM_TAMPERING,
272
284
  title: 'JWT - Claim Tampering',
273
285
  description: 'JWT claim tampering vulnerability where attackers can modify token claims such as roles, user IDs, or permissions and the server accepts the tampered token, enabling privilege escalation or unauthorized access.',
274
286
  severity: 'high',
287
+ levelId: 2,
275
288
  category: 'authentication',
276
289
  scanner: 'jwt',
277
290
  cvss: {
@@ -288,11 +301,12 @@ export const AUTH_VULNERABILITIES = {
288
301
  remediation: 'Validate JWT signatures using strong algorithms and trusted keys. Reject unsigned or weakly signed tokens. Enforce claim validation and server-side authorization checks.',
289
302
  },
290
303
  [VulnerabilityCode.JWT_KID_INJECTION]: {
291
- id: 132,
304
+ id: 113,
292
305
  code: VulnerabilityCode.JWT_KID_INJECTION,
293
306
  title: 'JWT - KID Header Injection',
294
307
  description: 'JWT key identifier (kid) injection vulnerability where attackers manipulate the kid header to influence key selection or file paths, potentially bypassing signature verification or loading attacker-controlled keys.',
295
308
  severity: 'high',
309
+ levelId: 2,
296
310
  category: 'authentication',
297
311
  scanner: 'jwt',
298
312
  cvss: {
@@ -309,11 +323,12 @@ export const AUTH_VULNERABILITIES = {
309
323
  remediation: 'Avoid direct use of kid as a file path or URL. Use a strict allowlist of key IDs and map to known keys in configuration. Reject unexpected or oversized kid values.',
310
324
  },
311
325
  [VulnerabilityCode.JWT_JKU_INJECTION]: {
312
- id: 133,
326
+ id: 114,
313
327
  code: VulnerabilityCode.JWT_JKU_INJECTION,
314
328
  title: 'JWT - JKU Header Injection',
315
329
  description: 'JWT JKU (JWK Set URL) header injection vulnerability where attackers can control the URL used to fetch signing keys, allowing them to supply their own keys and forge valid tokens.',
316
330
  severity: 'high',
331
+ levelId: 2,
317
332
  category: 'authentication',
318
333
  scanner: 'jwt',
319
334
  cvss: {
@@ -330,11 +345,12 @@ export const AUTH_VULNERABILITIES = {
330
345
  remediation: 'Ignore untrusted JKU values or restrict to a strict allowlist of trusted JWKS endpoints. Pin keys or use local key material where possible.',
331
346
  },
332
347
  [VulnerabilityCode.JWT_EMBEDDED_JWK]: {
333
- id: 134,
348
+ id: 115,
334
349
  code: VulnerabilityCode.JWT_EMBEDDED_JWK,
335
350
  title: 'JWT - Embedded JWK Injection',
336
351
  description: 'JWT embedded JWK vulnerability where attackers include their own JWK in the token header and the server accepts it as a trusted signing key, enabling forged tokens and authentication bypass.',
337
352
  severity: 'high',
353
+ levelId: 2,
338
354
  category: 'authentication',
339
355
  scanner: 'jwt',
340
356
  cvss: {
@@ -351,11 +367,12 @@ export const AUTH_VULNERABILITIES = {
351
367
  remediation: 'Reject embedded JWKs from tokens unless explicitly required and validated against a trusted key set. Use pinned keys and strict header validation.',
352
368
  },
353
369
  [VulnerabilityCode.JWT_X5C_INJECTION]: {
354
- id: 135,
370
+ id: 116,
355
371
  code: VulnerabilityCode.JWT_X5C_INJECTION,
356
372
  title: 'JWT - X5C Header Injection',
357
373
  description: 'JWT x5c header injection vulnerability where attackers provide an untrusted certificate chain, allowing them to influence key selection or bypass signature validation if certificate trust is not strictly enforced.',
358
374
  severity: 'high',
375
+ levelId: 2,
359
376
  category: 'authentication',
360
377
  scanner: 'jwt',
361
378
  cvss: {