@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
@@ -9,7 +9,7 @@ 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.',
@@ -31,7 +31,7 @@ export const AUTH_VULNERABILITIES = {
31
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.',
32
32
  },
33
33
  [VulnerabilityCode.JWT_WEAK_SECRET]: {
34
- id: 58,
34
+ id: 101,
35
35
  code: VulnerabilityCode.JWT_WEAK_SECRET,
36
36
  title: 'JWT Vulnerability - Weak Secret Key',
37
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.',
@@ -53,7 +53,7 @@ export const AUTH_VULNERABILITIES = {
53
53
  remediation: 'Use cryptographically strong random secrets of at least 256 bits. Consider using asymmetric algorithms (RS256, ES256) instead of HMAC. Rotate secrets periodically.',
54
54
  },
55
55
  [VulnerabilityCode.JWT_KEY_CONFUSION]: {
56
- id: 59,
56
+ id: 102,
57
57
  code: VulnerabilityCode.JWT_KEY_CONFUSION,
58
58
  title: 'JWT Vulnerability - Algorithm Confusion Attack',
59
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.',
@@ -78,7 +78,7 @@ export const AUTH_VULNERABILITIES = {
78
78
  // BROKEN ACCESS CONTROL
79
79
  // ========================================
80
80
  [VulnerabilityCode.BAC_ANONYMOUS_ACCESS]: {
81
- id: 60,
81
+ id: 103,
82
82
  code: VulnerabilityCode.BAC_ANONYMOUS_ACCESS,
83
83
  title: 'Broken Access Control - Anonymous Access',
84
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.',
@@ -100,7 +100,7 @@ export const AUTH_VULNERABILITIES = {
100
100
  remediation: 'Enforce authentication checks on all protected endpoints. Implement deny-by-default access control. Verify authentication state server-side before processing any request.',
101
101
  },
102
102
  [VulnerabilityCode.BAC_IDOR]: {
103
- id: 61,
103
+ id: 104,
104
104
  code: VulnerabilityCode.BAC_IDOR,
105
105
  title: 'Broken Access Control - Insecure Direct Object Reference',
106
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.',
@@ -122,7 +122,7 @@ export const AUTH_VULNERABILITIES = {
122
122
  remediation: 'Implement proper authorization checks verifying resource ownership. Use unpredictable identifiers (UUIDs). Apply consistent access control policies across all endpoints.',
123
123
  },
124
124
  [VulnerabilityCode.BAC_VERTICAL_PRIVILEGE]: {
125
- id: 62,
125
+ id: 105,
126
126
  code: VulnerabilityCode.BAC_VERTICAL_PRIVILEGE,
127
127
  title: 'Broken Access Control - Vertical Privilege Escalation',
128
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.',
@@ -147,7 +147,7 @@ export const AUTH_VULNERABILITIES = {
147
147
  // MASS ASSIGNMENT
148
148
  // ========================================
149
149
  [VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION]: {
150
- id: 63,
150
+ id: 106,
151
151
  code: VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION,
152
152
  title: 'Mass Assignment - Role Escalation',
153
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.',
@@ -169,7 +169,7 @@ export const AUTH_VULNERABILITIES = {
169
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.',
170
170
  },
171
171
  [VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION]: {
172
- id: 64,
172
+ id: 107,
173
173
  code: VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION,
174
174
  title: 'Mass Assignment - Prototype Pollution',
175
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.',
@@ -191,7 +191,7 @@ export const AUTH_VULNERABILITIES = {
191
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.',
192
192
  },
193
193
  [VulnerabilityCode.JWT_EXPIRED_TOKEN]: {
194
- id: 65,
194
+ id: 108,
195
195
  code: VulnerabilityCode.JWT_EXPIRED_TOKEN,
196
196
  title: 'JWT Vulnerability - Expired Token Accepted',
197
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.',
@@ -213,7 +213,7 @@ export const AUTH_VULNERABILITIES = {
213
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.',
214
214
  },
215
215
  [VulnerabilityCode.JWT_MISSING_CLAIMS]: {
216
- id: 66,
216
+ id: 109,
217
217
  code: VulnerabilityCode.JWT_MISSING_CLAIMS,
218
218
  title: 'JWT Vulnerability - Missing Required Claims',
219
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.',
@@ -235,7 +235,7 @@ export const AUTH_VULNERABILITIES = {
235
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.',
236
236
  },
237
237
  [VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE]: {
238
- id: 67,
238
+ id: 110,
239
239
  code: VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE,
240
240
  title: 'Broken Access Control - Horizontal Privilege Escalation',
241
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.',
@@ -257,7 +257,7 @@ export const AUTH_VULNERABILITIES = {
257
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.',
258
258
  },
259
259
  [VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD]: {
260
- id: 68,
260
+ id: 111,
261
261
  code: VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD,
262
262
  title: 'Mass Assignment - Hidden Field Manipulation',
263
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.',
@@ -279,7 +279,7 @@ export const AUTH_VULNERABILITIES = {
279
279
  remediation: 'Never trust client-provided values for server-computed fields. Use explicit DTOs with allowlisted fields. Recompute amounts, timestamps, and IDs server-side.',
280
280
  },
281
281
  [VulnerabilityCode.JWT_CLAIM_TAMPERING]: {
282
- id: 131,
282
+ id: 112,
283
283
  code: VulnerabilityCode.JWT_CLAIM_TAMPERING,
284
284
  title: 'JWT - Claim Tampering',
285
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.',
@@ -301,7 +301,7 @@ export const AUTH_VULNERABILITIES = {
301
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.',
302
302
  },
303
303
  [VulnerabilityCode.JWT_KID_INJECTION]: {
304
- id: 132,
304
+ id: 113,
305
305
  code: VulnerabilityCode.JWT_KID_INJECTION,
306
306
  title: 'JWT - KID Header Injection',
307
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.',
@@ -323,7 +323,7 @@ export const AUTH_VULNERABILITIES = {
323
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.',
324
324
  },
325
325
  [VulnerabilityCode.JWT_JKU_INJECTION]: {
326
- id: 133,
326
+ id: 114,
327
327
  code: VulnerabilityCode.JWT_JKU_INJECTION,
328
328
  title: 'JWT - JKU Header Injection',
329
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.',
@@ -345,7 +345,7 @@ export const AUTH_VULNERABILITIES = {
345
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.',
346
346
  },
347
347
  [VulnerabilityCode.JWT_EMBEDDED_JWK]: {
348
- id: 134,
348
+ id: 115,
349
349
  code: VulnerabilityCode.JWT_EMBEDDED_JWK,
350
350
  title: 'JWT - Embedded JWK Injection',
351
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.',
@@ -367,7 +367,7 @@ export const AUTH_VULNERABILITIES = {
367
367
  remediation: 'Reject embedded JWKs from tokens unless explicitly required and validated against a trusted key set. Use pinned keys and strict header validation.',
368
368
  },
369
369
  [VulnerabilityCode.JWT_X5C_INJECTION]: {
370
- id: 135,
370
+ id: 116,
371
371
  code: VulnerabilityCode.JWT_X5C_INJECTION,
372
372
  title: 'JWT - X5C Header Injection',
373
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.',