@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.
- package/dist/categories/authentication.js +34 -17
- package/dist/categories/configuration.js +561 -60
- package/dist/categories/injection.js +68 -34
- package/dist/categories/sensitive-paths.js +168 -84
- package/dist/categories/ssrf.js +22 -11
- package/dist/categories/xss.js +30 -15
- package/dist/category.d.ts +6 -0
- package/dist/category.js +15 -0
- package/dist/error-codes.d.ts +20 -0
- package/dist/error-codes.js +20 -0
- package/dist/index.d.ts +9 -1
- package/dist/index.js +5 -1
- package/dist/scanner.d.ts +6 -0
- package/dist/scanner.js +22 -0
- package/dist/types.d.ts +2 -0
- package/dist-cjs/categories/authentication.js +34 -17
- package/dist-cjs/categories/configuration.js +561 -60
- package/dist-cjs/categories/injection.js +68 -34
- package/dist-cjs/categories/sensitive-paths.js +168 -84
- package/dist-cjs/categories/ssrf.js +22 -11
- package/dist-cjs/categories/xss.js +30 -15
- package/dist-cjs/category.js +18 -0
- package/dist-cjs/error-codes.js +20 -0
- package/dist-cjs/index.js +7 -1
- package/dist-cjs/scanner.js +25 -0
- package/package.json +35 -32
- package/scripts/assign-ids.ts +105 -0
- package/scripts/check-duplicate-ids.ts +45 -0
- package/src/categories/authentication.ts +145 -128
- package/src/categories/configuration.ts +1632 -1111
- package/src/categories/injection.ts +158 -124
- package/src/categories/sensitive-paths.ts +168 -84
- package/src/categories/ssrf.ts +22 -11
- package/src/categories/xss.ts +30 -15
- package/src/category.ts +16 -0
- package/src/error-codes.ts +25 -5
- package/src/id-registry.json +1235 -0
- package/src/index.ts +20 -14
- package/src/scanner.ts +23 -0
- package/src/types.ts +4 -2
- package/zerothreatai-vulnerability-registry-4npm .0.0.tgz +0 -0
- package/src/categories/authentication.d.ts +0 -8
- package/src/categories/authentication.d.ts.map +0 -1
- package/src/categories/authentication.js +0 -378
- package/src/categories/authentication.js.map +0 -1
- package/src/categories/configuration.d.ts +0 -8
- package/src/categories/configuration.d.ts.map +0 -1
- package/src/categories/configuration.js +0 -906
- package/src/categories/configuration.js.map +0 -1
- package/src/categories/injection.d.ts +0 -8
- package/src/categories/injection.d.ts.map +0 -1
- package/src/categories/injection.js +0 -750
- package/src/categories/injection.js.map +0 -1
- package/src/categories/sensitive-paths.d.ts +0 -9
- package/src/categories/sensitive-paths.d.ts.map +0 -1
- package/src/categories/sensitive-paths.js +0 -1791
- package/src/categories/sensitive-paths.js.map +0 -1
- package/src/categories/ssrf.d.ts +0 -8
- package/src/categories/ssrf.d.ts.map +0 -1
- package/src/categories/ssrf.js +0 -250
- package/src/categories/ssrf.js.map +0 -1
- package/src/categories/xss.d.ts +0 -7
- package/src/categories/xss.d.ts.map +0 -1
- package/src/categories/xss.js +0 -328
- package/src/categories/xss.js.map +0 -1
- package/src/error-codes.d.ts +0 -242
- package/src/error-codes.d.ts.map +0 -1
- package/src/error-codes.js +0 -315
- package/src/error-codes.js.map +0 -1
- package/src/index.d.ts +0 -60
- package/src/index.d.ts.map +0 -1
- package/src/index.js +0 -107
- package/src/index.js.map +0 -1
- package/src/types.d.ts +0 -86
- package/src/types.d.ts.map +0 -1
- package/src/types.js +0 -7
- package/src/types.js.map +0 -1
|
@@ -12,11 +12,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
12
12
|
// JWT VULNERABILITIES
|
|
13
13
|
// ========================================
|
|
14
14
|
[error_codes_js_1.VulnerabilityCode.JWT_NONE_ALGORITHM]: {
|
|
15
|
-
id:
|
|
15
|
+
id: 100,
|
|
16
16
|
code: error_codes_js_1.VulnerabilityCode.JWT_NONE_ALGORITHM,
|
|
17
17
|
title: 'JWT Vulnerability - None Algorithm Attack',
|
|
18
18
|
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.',
|
|
19
19
|
severity: 'critical',
|
|
20
|
+
levelId: 1,
|
|
20
21
|
category: 'authentication',
|
|
21
22
|
scanner: 'jwt',
|
|
22
23
|
cvss: {
|
|
@@ -33,11 +34,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
33
34
|
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.',
|
|
34
35
|
},
|
|
35
36
|
[error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET]: {
|
|
36
|
-
id:
|
|
37
|
+
id: 101,
|
|
37
38
|
code: error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET,
|
|
38
39
|
title: 'JWT Vulnerability - Weak Secret Key',
|
|
39
40
|
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.',
|
|
40
41
|
severity: 'high',
|
|
42
|
+
levelId: 2,
|
|
41
43
|
category: 'authentication',
|
|
42
44
|
scanner: 'jwt',
|
|
43
45
|
cvss: {
|
|
@@ -54,11 +56,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
54
56
|
remediation: 'Use cryptographically strong random secrets of at least 256 bits. Consider using asymmetric algorithms (RS256, ES256) instead of HMAC. Rotate secrets periodically.',
|
|
55
57
|
},
|
|
56
58
|
[error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION]: {
|
|
57
|
-
id:
|
|
59
|
+
id: 102,
|
|
58
60
|
code: error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION,
|
|
59
61
|
title: 'JWT Vulnerability - Algorithm Confusion Attack',
|
|
60
62
|
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.',
|
|
61
63
|
severity: 'critical',
|
|
64
|
+
levelId: 1,
|
|
62
65
|
category: 'authentication',
|
|
63
66
|
scanner: 'jwt',
|
|
64
67
|
cvss: {
|
|
@@ -78,11 +81,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
78
81
|
// BROKEN ACCESS CONTROL
|
|
79
82
|
// ========================================
|
|
80
83
|
[error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS]: {
|
|
81
|
-
id:
|
|
84
|
+
id: 103,
|
|
82
85
|
code: error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS,
|
|
83
86
|
title: 'Broken Access Control - Anonymous Access',
|
|
84
87
|
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.',
|
|
85
88
|
severity: 'high',
|
|
89
|
+
levelId: 2,
|
|
86
90
|
category: 'access_control',
|
|
87
91
|
scanner: 'broken-access',
|
|
88
92
|
cvss: {
|
|
@@ -99,11 +103,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
99
103
|
remediation: 'Enforce authentication checks on all protected endpoints. Implement deny-by-default access control. Verify authentication state server-side before processing any request.',
|
|
100
104
|
},
|
|
101
105
|
[error_codes_js_1.VulnerabilityCode.BAC_IDOR]: {
|
|
102
|
-
id:
|
|
106
|
+
id: 104,
|
|
103
107
|
code: error_codes_js_1.VulnerabilityCode.BAC_IDOR,
|
|
104
108
|
title: 'Broken Access Control - Insecure Direct Object Reference',
|
|
105
109
|
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.',
|
|
106
110
|
severity: 'high',
|
|
111
|
+
levelId: 2,
|
|
107
112
|
category: 'access_control',
|
|
108
113
|
scanner: 'broken-access',
|
|
109
114
|
cvss: {
|
|
@@ -120,11 +125,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
120
125
|
remediation: 'Implement proper authorization checks verifying resource ownership. Use unpredictable identifiers (UUIDs). Apply consistent access control policies across all endpoints.',
|
|
121
126
|
},
|
|
122
127
|
[error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE]: {
|
|
123
|
-
id:
|
|
128
|
+
id: 105,
|
|
124
129
|
code: error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE,
|
|
125
130
|
title: 'Broken Access Control - Vertical Privilege Escalation',
|
|
126
131
|
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.',
|
|
127
132
|
severity: 'critical',
|
|
133
|
+
levelId: 1,
|
|
128
134
|
category: 'access_control',
|
|
129
135
|
scanner: 'broken-access',
|
|
130
136
|
cvss: {
|
|
@@ -144,11 +150,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
144
150
|
// MASS ASSIGNMENT
|
|
145
151
|
// ========================================
|
|
146
152
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION]: {
|
|
147
|
-
id:
|
|
153
|
+
id: 106,
|
|
148
154
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION,
|
|
149
155
|
title: 'Mass Assignment - Role Escalation',
|
|
150
156
|
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.',
|
|
151
157
|
severity: 'high',
|
|
158
|
+
levelId: 2,
|
|
152
159
|
category: 'access_control',
|
|
153
160
|
scanner: 'model-state',
|
|
154
161
|
cvss: {
|
|
@@ -165,11 +172,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
165
172
|
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.',
|
|
166
173
|
},
|
|
167
174
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION]: {
|
|
168
|
-
id:
|
|
175
|
+
id: 107,
|
|
169
176
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION,
|
|
170
177
|
title: 'Mass Assignment - Prototype Pollution',
|
|
171
178
|
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.',
|
|
172
179
|
severity: 'high',
|
|
180
|
+
levelId: 2,
|
|
173
181
|
category: 'access_control',
|
|
174
182
|
scanner: 'model-state',
|
|
175
183
|
cvss: {
|
|
@@ -186,11 +194,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
186
194
|
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.',
|
|
187
195
|
},
|
|
188
196
|
[error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN]: {
|
|
189
|
-
id:
|
|
197
|
+
id: 108,
|
|
190
198
|
code: error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN,
|
|
191
199
|
title: 'JWT Vulnerability - Expired Token Accepted',
|
|
192
200
|
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.',
|
|
193
201
|
severity: 'medium',
|
|
202
|
+
levelId: 3,
|
|
194
203
|
category: 'authentication',
|
|
195
204
|
scanner: 'jwt',
|
|
196
205
|
cvss: {
|
|
@@ -207,11 +216,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
207
216
|
remediation: 'Always validate exp claim during token verification. Set appropriate token lifetimes. Implement token refresh mechanisms. Use server-side session invalidation for immediate revocation.',
|
|
208
217
|
},
|
|
209
218
|
[error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS]: {
|
|
210
|
-
id:
|
|
219
|
+
id: 109,
|
|
211
220
|
code: error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS,
|
|
212
221
|
title: 'JWT Vulnerability - Missing Required Claims',
|
|
213
222
|
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.',
|
|
214
223
|
severity: 'medium',
|
|
224
|
+
levelId: 3,
|
|
215
225
|
category: 'authentication',
|
|
216
226
|
scanner: 'jwt',
|
|
217
227
|
cvss: {
|
|
@@ -228,11 +238,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
228
238
|
remediation: 'Include and validate all standard claims: exp, iat, nbf, iss, aud, sub. Define required claims for your application. Reject tokens missing mandatory claims.',
|
|
229
239
|
},
|
|
230
240
|
[error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE]: {
|
|
231
|
-
id:
|
|
241
|
+
id: 110,
|
|
232
242
|
code: error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE,
|
|
233
243
|
title: 'Broken Access Control - Horizontal Privilege Escalation',
|
|
234
244
|
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.',
|
|
235
245
|
severity: 'high',
|
|
246
|
+
levelId: 2,
|
|
236
247
|
category: 'access_control',
|
|
237
248
|
scanner: 'broken-access',
|
|
238
249
|
cvss: {
|
|
@@ -249,11 +260,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
249
260
|
remediation: 'Implement record-level authorization checks. Verify resource ownership against the authenticated user session. Use indirect references that map to actual resources server-side.',
|
|
250
261
|
},
|
|
251
262
|
[error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD]: {
|
|
252
|
-
id:
|
|
263
|
+
id: 111,
|
|
253
264
|
code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD,
|
|
254
265
|
title: 'Mass Assignment - Hidden Field Manipulation',
|
|
255
266
|
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.',
|
|
256
267
|
severity: 'medium',
|
|
268
|
+
levelId: 3,
|
|
257
269
|
category: 'access_control',
|
|
258
270
|
scanner: 'model-state',
|
|
259
271
|
cvss: {
|
|
@@ -270,11 +282,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
270
282
|
remediation: 'Never trust client-provided values for server-computed fields. Use explicit DTOs with allowlisted fields. Recompute amounts, timestamps, and IDs server-side.',
|
|
271
283
|
},
|
|
272
284
|
[error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING]: {
|
|
273
|
-
id:
|
|
285
|
+
id: 112,
|
|
274
286
|
code: error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING,
|
|
275
287
|
title: 'JWT - Claim Tampering',
|
|
276
288
|
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.',
|
|
277
289
|
severity: 'high',
|
|
290
|
+
levelId: 2,
|
|
278
291
|
category: 'authentication',
|
|
279
292
|
scanner: 'jwt',
|
|
280
293
|
cvss: {
|
|
@@ -291,11 +304,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
291
304
|
remediation: 'Validate JWT signatures using strong algorithms and trusted keys. Reject unsigned or weakly signed tokens. Enforce claim validation and server-side authorization checks.',
|
|
292
305
|
},
|
|
293
306
|
[error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION]: {
|
|
294
|
-
id:
|
|
307
|
+
id: 113,
|
|
295
308
|
code: error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION,
|
|
296
309
|
title: 'JWT - KID Header Injection',
|
|
297
310
|
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.',
|
|
298
311
|
severity: 'high',
|
|
312
|
+
levelId: 2,
|
|
299
313
|
category: 'authentication',
|
|
300
314
|
scanner: 'jwt',
|
|
301
315
|
cvss: {
|
|
@@ -312,11 +326,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
312
326
|
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.',
|
|
313
327
|
},
|
|
314
328
|
[error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION]: {
|
|
315
|
-
id:
|
|
329
|
+
id: 114,
|
|
316
330
|
code: error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION,
|
|
317
331
|
title: 'JWT - JKU Header Injection',
|
|
318
332
|
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.',
|
|
319
333
|
severity: 'high',
|
|
334
|
+
levelId: 2,
|
|
320
335
|
category: 'authentication',
|
|
321
336
|
scanner: 'jwt',
|
|
322
337
|
cvss: {
|
|
@@ -333,11 +348,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
333
348
|
remediation: 'Ignore untrusted JKU values or restrict to a strict allowlist of trusted JWKS endpoints. Pin keys or use local key material where possible.',
|
|
334
349
|
},
|
|
335
350
|
[error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK]: {
|
|
336
|
-
id:
|
|
351
|
+
id: 115,
|
|
337
352
|
code: error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK,
|
|
338
353
|
title: 'JWT - Embedded JWK Injection',
|
|
339
354
|
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.',
|
|
340
355
|
severity: 'high',
|
|
356
|
+
levelId: 2,
|
|
341
357
|
category: 'authentication',
|
|
342
358
|
scanner: 'jwt',
|
|
343
359
|
cvss: {
|
|
@@ -354,11 +370,12 @@ exports.AUTH_VULNERABILITIES = {
|
|
|
354
370
|
remediation: 'Reject embedded JWKs from tokens unless explicitly required and validated against a trusted key set. Use pinned keys and strict header validation.',
|
|
355
371
|
},
|
|
356
372
|
[error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION]: {
|
|
357
|
-
id:
|
|
373
|
+
id: 116,
|
|
358
374
|
code: error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION,
|
|
359
375
|
title: 'JWT - X5C Header Injection',
|
|
360
376
|
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.',
|
|
361
377
|
severity: 'high',
|
|
378
|
+
levelId: 2,
|
|
362
379
|
category: 'authentication',
|
|
363
380
|
scanner: 'jwt',
|
|
364
381
|
cvss: {
|