@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
@@ -6,7 +6,7 @@
6
6
  import { VulnerabilityCode } from '../error-codes.js';
7
7
  export const SSRF_VULNERABILITIES = {
8
8
  [VulnerabilityCode.SSRF_CLOUD_METADATA]: {
9
- id: 46,
9
+ id: 450,
10
10
  code: VulnerabilityCode.SSRF_CLOUD_METADATA,
11
11
  title: 'Server-Side Request Forgery - Cloud Metadata Access',
12
12
  description: 'Critical SSRF vulnerability enabling access to cloud provider metadata services (AWS IMDSv1, GCP, Azure) which expose sensitive information including IAM credentials, API tokens, and instance configuration that can lead to full cloud account compromise and lateral movement.',
@@ -28,7 +28,7 @@ export const SSRF_VULNERABILITIES = {
28
28
  remediation: 'Block access to cloud metadata IP ranges (169.254.169.254). Implement IMDSv2 which requires tokens. Use allowlist for external URLs. Validate and sanitize all URL inputs.',
29
29
  },
30
30
  [VulnerabilityCode.SSRF_INTERNAL_SERVICE]: {
31
- id: 47,
31
+ id: 451,
32
32
  code: VulnerabilityCode.SSRF_INTERNAL_SERVICE,
33
33
  title: 'Server-Side Request Forgery - Internal Service Access',
34
34
  description: 'SSRF vulnerability allowing attackers to access internal network services that should not be reachable from the internet, including databases, admin panels, cache servers, and other infrastructure components protected only by network segmentation without authentication.',
@@ -50,7 +50,7 @@ export const SSRF_VULNERABILITIES = {
50
50
  remediation: 'Implement URL allowlist for permitted external resources. Block requests to private IP ranges and localhost. Use network segmentation with proper authentication for internal services.',
51
51
  },
52
52
  [VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING]: {
53
- id: 48,
53
+ id: 452,
54
54
  code: VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING,
55
55
  title: 'Server-Side Request Forgery - Protocol Smuggling',
56
56
  description: 'SSRF vulnerability exploiting non-HTTP protocol handlers like file://, gopher://, dict://, or ftp:// to read local files, interact with internal services using raw TCP, or perform attacks that would not be possible through HTTP requests alone, significantly expanding impact scope.',
@@ -72,7 +72,7 @@ export const SSRF_VULNERABILITIES = {
72
72
  remediation: 'Enforce HTTP/HTTPS only for outbound requests. Disable or block dangerous protocol handlers at the application and network level. Validate URL schemes against strict allowlist.',
73
73
  },
74
74
  [VulnerabilityCode.SSRF_BLIND_OOB]: {
75
- id: 49,
75
+ id: 453,
76
76
  code: VulnerabilityCode.SSRF_BLIND_OOB,
77
77
  title: 'Server-Side Request Forgery - Blind OOB',
78
78
  description: 'Blind SSRF vulnerability confirmed through out-of-band DNS or HTTP callbacks indicating the server makes requests to attacker-controlled destinations even though responses are not reflected, enabling internal network scanning and data exfiltration through DNS or timing side channels.',
@@ -97,7 +97,7 @@ export const SSRF_VULNERABILITIES = {
97
97
  // OPEN REDIRECT
98
98
  // ========================================
99
99
  [VulnerabilityCode.REDIRECT_HEADER_INJECTION]: {
100
- id: 50,
100
+ id: 454,
101
101
  code: VulnerabilityCode.REDIRECT_HEADER_INJECTION,
102
102
  title: 'Open Redirect - HTTP Header Injection',
103
103
  description: 'Open redirect vulnerability through Location header manipulation allowing attackers to redirect victims to malicious websites after authenticating or interacting with the legitimate application, facilitating phishing attacks that abuse user trust in the original domain.',
@@ -119,7 +119,7 @@ export const SSRF_VULNERABILITIES = {
119
119
  remediation: 'Use allowlist of permitted redirect destinations. Avoid using user input for redirect URLs. If redirects are required, use indirect references or validate against known safe patterns.',
120
120
  },
121
121
  [VulnerabilityCode.REDIRECT_JS_NAVIGATION]: {
122
- id: 51,
122
+ id: 455,
123
123
  code: VulnerabilityCode.REDIRECT_JS_NAVIGATION,
124
124
  title: 'Open Redirect - JavaScript Navigation',
125
125
  description: 'Client-side open redirect vulnerability through JavaScript navigation methods like window.location or location.href being set to user-controlled values, allowing attackers to redirect users to malicious sites through specially crafted URLs that bypass server-side validation.',
@@ -144,7 +144,7 @@ export const SSRF_VULNERABILITIES = {
144
144
  // HOST HEADER INJECTION
145
145
  // ========================================
146
146
  [VulnerabilityCode.HOST_CACHE_POISONING]: {
147
- id: 52,
147
+ id: 456,
148
148
  code: VulnerabilityCode.HOST_CACHE_POISONING,
149
149
  title: 'Host Header Injection - Cache Poisoning',
150
150
  description: 'Host header injection vulnerability where manipulated Host headers are reflected in cached responses, allowing attackers to poison web caches and CDNs with malicious content that is then served to all users, potentially enabling widespread defacement or malware distribution.',
@@ -166,7 +166,7 @@ export const SSRF_VULNERABILITIES = {
166
166
  remediation: 'Configure web servers to reject requests with unexpected Host headers. Include Host header in cache keys. Use canonical URLs for all generated links.',
167
167
  },
168
168
  [VulnerabilityCode.HOST_PASSWORD_RESET]: {
169
- id: 53,
169
+ id: 457,
170
170
  code: VulnerabilityCode.HOST_PASSWORD_RESET,
171
171
  title: 'Host Header Injection - Password Reset Poisoning',
172
172
  description: 'Critical host header injection vulnerability in password reset functionality where the injected Host header is used to generate password reset URLs, allowing attackers to receive password reset tokens when victims click the manipulated links in legitimate reset emails.',
@@ -188,7 +188,7 @@ export const SSRF_VULNERABILITIES = {
188
188
  remediation: 'Use hardcoded canonical domain for generated URLs. Never trust Host header for security-sensitive functionality. Validate Host header against configured allowed hosts.',
189
189
  },
190
190
  [VulnerabilityCode.SSRF_FILTER_BYPASS]: {
191
- id: 54,
191
+ id: 458,
192
192
  code: VulnerabilityCode.SSRF_FILTER_BYPASS,
193
193
  title: 'Server-Side Request Forgery - Filter Bypass',
194
194
  description: 'SSRF vulnerability that bypasses security filters through encoding tricks (URL encoding, IPv6 representation, decimal IP notation), DNS rebinding, or using alternative representations of blocked addresses to reach internal resources despite URL validation controls.',
@@ -210,7 +210,7 @@ export const SSRF_VULNERABILITIES = {
210
210
  remediation: 'Implement defense-in-depth with multiple validation layers. Resolve DNS before validation. Use strict URL parsing libraries. Block all private IP ranges including encoded forms.',
211
211
  },
212
212
  [VulnerabilityCode.REDIRECT_META_REFRESH]: {
213
- id: 55,
213
+ id: 459,
214
214
  code: VulnerabilityCode.REDIRECT_META_REFRESH,
215
215
  title: 'Open Redirect - Meta Refresh',
216
216
  description: 'Open redirect vulnerability through HTML meta refresh tags where user input controls the redirect target URL, enabling phishing attacks by sending victims to malicious sites after a brief delay on the legitimate domain, bypassing some security controls.',
@@ -232,7 +232,7 @@ export const SSRF_VULNERABILITIES = {
232
232
  remediation: 'Validate meta refresh URLs against allowlist. Avoid using user input in meta refresh tags. Prefer server-side redirects with proper validation over client-side meta refresh.',
233
233
  },
234
234
  [VulnerabilityCode.HOST_REDIRECT]: {
235
- id: 56,
235
+ id: 460,
236
236
  code: VulnerabilityCode.HOST_REDIRECT,
237
237
  title: 'Host Header Injection - Open Redirect',
238
238
  description: 'Host header injection leading to open redirect where the application uses the Host header to generate redirect URLs, allowing attackers to redirect users to malicious domains by manipulating the Host header in their requests.',
@@ -6,7 +6,7 @@
6
6
  import { VulnerabilityCode } from '../error-codes.js';
7
7
  export const XSS_VULNERABILITIES = {
8
8
  [VulnerabilityCode.XSS_REFLECTED]: {
9
- id: 31,
9
+ id: 400,
10
10
  code: VulnerabilityCode.XSS_REFLECTED,
11
11
  title: 'Cross-Site Scripting - Reflected',
12
12
  description: 'Reflected XSS vulnerability where user input is immediately returned by the server in the response without proper encoding, allowing attackers to inject malicious scripts that execute in the victim browser when they click a crafted link or submit a manipulated form.',
@@ -28,7 +28,7 @@ export const XSS_VULNERABILITIES = {
28
28
  remediation: 'HTML-encode all user input before rendering in HTML. Implement Content Security Policy (CSP). Use context-aware output encoding based on output location (HTML, JS, CSS, URL).',
29
29
  },
30
30
  [VulnerabilityCode.XSS_STORED]: {
31
- id: 32,
31
+ id: 401,
32
32
  code: VulnerabilityCode.XSS_STORED,
33
33
  title: 'Cross-Site Scripting - Stored',
34
34
  description: 'Critical stored XSS vulnerability where malicious scripts are permanently saved in the application database and served to all users who view the affected content, enabling widespread session hijacking, credential theft, and malware distribution without requiring victim interaction beyond normal usage.',
@@ -50,7 +50,7 @@ export const XSS_VULNERABILITIES = {
50
50
  remediation: 'Sanitize all user input before storage. HTML-encode all dynamic content in responses. Implement strict Content Security Policy. Use HTTP-only and Secure flags for session cookies.',
51
51
  },
52
52
  [VulnerabilityCode.XSS_DOM_BASED]: {
53
- id: 33,
53
+ id: 402,
54
54
  code: VulnerabilityCode.XSS_DOM_BASED,
55
55
  title: 'Cross-Site Scripting - DOM Based',
56
56
  description: 'DOM-based XSS vulnerability where the attack payload is processed entirely in the client-side JavaScript code without being sent to the server, typically through dangerous sinks like innerHTML, document.write(), or eval() that process URL fragments or user-controlled DOM elements.',
@@ -72,7 +72,7 @@ export const XSS_VULNERABILITIES = {
72
72
  remediation: 'Avoid using dangerous DOM sinks like innerHTML and document.write(). Use textContent instead of innerHTML. Sanitize any DOM manipulation with user input. Implement Trusted Types if supported.',
73
73
  },
74
74
  [VulnerabilityCode.XSS_SVG_INJECTION]: {
75
- id: 34,
75
+ id: 403,
76
76
  code: VulnerabilityCode.XSS_SVG_INJECTION,
77
77
  title: 'Cross-Site Scripting - SVG Injection',
78
78
  description: 'SVG-based XSS vulnerability where malicious JavaScript is embedded within SVG image files using script elements or event handlers like onload, which execute when the browser renders the SVG file as an image or inline element, bypassing image upload security controls.',
@@ -94,7 +94,7 @@ export const XSS_VULNERABILITIES = {
94
94
  remediation: 'Sanitize uploaded SVG files to remove script elements and event handlers. Serve user-uploaded SVGs from a separate domain. Set Content-Disposition: attachment for SVG downloads. Use Content-Security-Policy.',
95
95
  },
96
96
  [VulnerabilityCode.XSS_CSTI_ANGULAR]: {
97
- id: 35,
97
+ id: 404,
98
98
  code: VulnerabilityCode.XSS_CSTI_ANGULAR,
99
99
  title: 'Cross-Site Scripting - Angular Template Injection',
100
100
  description: 'AngularJS client-side template injection vulnerability where user input containing Angular expressions like {{constructor.constructor("alert(1)")()}} is evaluated by the Angular template engine, leading to arbitrary JavaScript execution in the user browser context.',
@@ -117,7 +117,7 @@ export const XSS_VULNERABILITIES = {
117
117
  remediation: 'Upgrade from AngularJS to modern Angular which is not vulnerable to template injection. Use ng-non-bindable directive for user content. Encode special characters {{}} in user input. Apply strict CSP.',
118
118
  },
119
119
  [VulnerabilityCode.XSS_CSP_BYPASS]: {
120
- id: 36,
120
+ id: 405,
121
121
  code: VulnerabilityCode.XSS_CSP_BYPASS,
122
122
  title: 'Cross-Site Scripting - CSP Bypass',
123
123
  description: 'XSS vulnerability that bypasses Content Security Policy protections through techniques like JSONP endpoints on whitelisted domains, base tag injection, Angular.js libraries on CDN, or other CSP bypass gadgets that allow script execution despite CSP controls being in place.',
@@ -139,7 +139,7 @@ export const XSS_VULNERABILITIES = {
139
139
  remediation: 'Review CSP for JSONP endpoints and Angular.js CDN inclusions. Use nonce-based CSP instead of allowlist domains. Add base-uri restriction. Fix the underlying XSS vulnerability.',
140
140
  },
141
141
  [VulnerabilityCode.XSS_JS_CONTEXT]: {
142
- id: 37,
142
+ id: 406,
143
143
  code: VulnerabilityCode.XSS_JS_CONTEXT,
144
144
  title: 'Cross-Site Scripting - JavaScript Context',
145
145
  description: 'XSS vulnerability where user input is injected directly into JavaScript code blocks, allowing attackers to break out of string contexts and execute arbitrary JavaScript by injecting quote characters and script code, or modify application logic by injecting new statements.',
@@ -161,7 +161,7 @@ export const XSS_VULNERABILITIES = {
161
161
  remediation: 'Avoid inserting user data into JavaScript code. Use JSON.stringify() with proper encoding for data passed to JavaScript. Pass data through data attributes and access via DOM APIs instead.',
162
162
  },
163
163
  [VulnerabilityCode.XSS_EVENT_HANDLER]: {
164
- id: 38,
164
+ id: 407,
165
165
  code: VulnerabilityCode.XSS_EVENT_HANDLER,
166
166
  title: 'Cross-Site Scripting - Event Handler Injection',
167
167
  description: 'XSS vulnerability through injection into HTML event handler attributes like onclick, onerror, onload, or onmouseover, allowing attackers to execute JavaScript when users interact with or simply view the affected page elements without requiring script tags.',
@@ -183,7 +183,7 @@ export const XSS_VULNERABILITIES = {
183
183
  remediation: 'Use proper HTML encoding for all user input in attributes. Avoid placing user input in event handler attributes. Use Content Security Policy with unsafe-inline disabled.',
184
184
  },
185
185
  [VulnerabilityCode.XSS_SCRIPT_INJECTION]: {
186
- id: 39,
186
+ id: 408,
187
187
  code: VulnerabilityCode.XSS_SCRIPT_INJECTION,
188
188
  title: 'Cross-Site Scripting - Script Tag Injection',
189
189
  description: 'XSS vulnerability where attackers can inject complete script tags into the HTML response, enabling arbitrary JavaScript execution. This is often the most straightforward XSS exploitation when input is not properly sanitized before rendering.',
@@ -205,7 +205,7 @@ export const XSS_VULNERABILITIES = {
205
205
  remediation: 'Encode < and > characters in user input. Implement Content Security Policy. Use HTML sanitization libraries that remove script tags. Apply context-aware output encoding.',
206
206
  },
207
207
  [VulnerabilityCode.XSS_HTML_INJECTION]: {
208
- id: 40,
208
+ id: 409,
209
209
  code: VulnerabilityCode.XSS_HTML_INJECTION,
210
210
  title: 'Cross-Site Scripting - HTML Injection',
211
211
  description: 'HTML injection vulnerability where attackers can inject arbitrary HTML elements that modify page structure, enabling phishing attacks through fake login forms, content spoofing, or combination with CSS to overlay malicious content over legitimate page elements.',
@@ -227,7 +227,7 @@ export const XSS_VULNERABILITIES = {
227
227
  remediation: 'HTML-encode all user input. Use allowlist-based HTML sanitization if rich text is required. Implement Content Security Policy to restrict form actions and frame sources.',
228
228
  },
229
229
  [VulnerabilityCode.XSS_ATTRIBUTE_INJECTION]: {
230
- id: 41,
230
+ id: 410,
231
231
  code: VulnerabilityCode.XSS_ATTRIBUTE_INJECTION,
232
232
  title: 'Cross-Site Scripting - Attribute Injection',
233
233
  description: 'XSS vulnerability where user input is placed in HTML attributes without proper encoding, allowing attackers to break out of the attribute context and inject new attributes or event handlers by using quote characters and spaces.',
@@ -249,7 +249,7 @@ export const XSS_VULNERABILITIES = {
249
249
  remediation: 'HTML-encode quotes (single and double) when placing user input in attributes. Always use quoted attributes. Avoid placing user input in dangerous attributes like href, src, or event handlers.',
250
250
  },
251
251
  [VulnerabilityCode.XSS_CSS_INJECTION]: {
252
- id: 42,
252
+ id: 411,
253
253
  code: VulnerabilityCode.XSS_CSS_INJECTION,
254
254
  title: 'Cross-Site Scripting - CSS Injection',
255
255
  description: 'CSS injection vulnerability where attackers can inject malicious CSS rules to exfiltrate data through CSS selectors and background URLs, modify page appearance for phishing, or in older browsers achieve JavaScript execution through CSS expressions.',
@@ -271,7 +271,7 @@ export const XSS_VULNERABILITIES = {
271
271
  remediation: 'Sanitize CSS input to remove url() functions and expression() directives. Use CSS-specific encoding. Implement Content Security Policy with style-src restrictions.',
272
272
  },
273
273
  [VulnerabilityCode.XSS_TEMPLATE_LITERAL]: {
274
- id: 43,
274
+ id: 412,
275
275
  code: VulnerabilityCode.XSS_TEMPLATE_LITERAL,
276
276
  title: 'Cross-Site Scripting - Template Literal Injection',
277
277
  description: 'XSS vulnerability through JavaScript template literals (backtick strings) where user input can break out of the template context or inject expressions using ${} syntax, executing arbitrary JavaScript in the client browser context.',
@@ -293,7 +293,7 @@ export const XSS_VULNERABILITIES = {
293
293
  remediation: 'Avoid placing user input inside template literals. Escape backticks, dollar signs, and braces. Use tagged template functions with proper escaping for user data.',
294
294
  },
295
295
  [VulnerabilityCode.XSS_MUTATION_BASED]: {
296
- id: 44,
296
+ id: 413,
297
297
  code: VulnerabilityCode.XSS_MUTATION_BASED,
298
298
  title: 'Cross-Site Scripting - Mutation XSS',
299
299
  description: 'Mutation-based XSS (mXSS) vulnerability exploiting browser HTML parser quirks and DOM mutations where seemingly safe HTML is transformed into executable script through browser parsing behaviors, bypassing traditional sanitization.',
@@ -315,7 +315,7 @@ export const XSS_VULNERABILITIES = {
315
315
  remediation: 'Use DOMPurify or similar mXSS-aware sanitizers. Avoid innerHTML with user content. Implement Trusted Types. Stay updated on browser parsing behavior changes.',
316
316
  },
317
317
  [VulnerabilityCode.XSS_CSTI_VUE]: {
318
- id: 45,
318
+ id: 414,
319
319
  code: VulnerabilityCode.XSS_CSTI_VUE,
320
320
  title: 'Cross-Site Scripting - Vue.js Template Injection',
321
321
  description: 'Vue.js client-side template injection vulnerability where user input containing Vue expression syntax like {{}} or v-bind directives is evaluated by the Vue template compiler, leading to arbitrary JavaScript execution in the browser context.',
@@ -12,7 +12,7 @@ exports.AUTH_VULNERABILITIES = {
12
12
  // JWT VULNERABILITIES
13
13
  // ========================================
14
14
  [error_codes_js_1.VulnerabilityCode.JWT_NONE_ALGORITHM]: {
15
- id: 57,
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.',
@@ -34,7 +34,7 @@ exports.AUTH_VULNERABILITIES = {
34
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.',
35
35
  },
36
36
  [error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET]: {
37
- id: 58,
37
+ id: 101,
38
38
  code: error_codes_js_1.VulnerabilityCode.JWT_WEAK_SECRET,
39
39
  title: 'JWT Vulnerability - Weak Secret Key',
40
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.',
@@ -56,7 +56,7 @@ exports.AUTH_VULNERABILITIES = {
56
56
  remediation: 'Use cryptographically strong random secrets of at least 256 bits. Consider using asymmetric algorithms (RS256, ES256) instead of HMAC. Rotate secrets periodically.',
57
57
  },
58
58
  [error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION]: {
59
- id: 59,
59
+ id: 102,
60
60
  code: error_codes_js_1.VulnerabilityCode.JWT_KEY_CONFUSION,
61
61
  title: 'JWT Vulnerability - Algorithm Confusion Attack',
62
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.',
@@ -81,7 +81,7 @@ exports.AUTH_VULNERABILITIES = {
81
81
  // BROKEN ACCESS CONTROL
82
82
  // ========================================
83
83
  [error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS]: {
84
- id: 60,
84
+ id: 103,
85
85
  code: error_codes_js_1.VulnerabilityCode.BAC_ANONYMOUS_ACCESS,
86
86
  title: 'Broken Access Control - Anonymous Access',
87
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.',
@@ -103,7 +103,7 @@ exports.AUTH_VULNERABILITIES = {
103
103
  remediation: 'Enforce authentication checks on all protected endpoints. Implement deny-by-default access control. Verify authentication state server-side before processing any request.',
104
104
  },
105
105
  [error_codes_js_1.VulnerabilityCode.BAC_IDOR]: {
106
- id: 61,
106
+ id: 104,
107
107
  code: error_codes_js_1.VulnerabilityCode.BAC_IDOR,
108
108
  title: 'Broken Access Control - Insecure Direct Object Reference',
109
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.',
@@ -125,7 +125,7 @@ exports.AUTH_VULNERABILITIES = {
125
125
  remediation: 'Implement proper authorization checks verifying resource ownership. Use unpredictable identifiers (UUIDs). Apply consistent access control policies across all endpoints.',
126
126
  },
127
127
  [error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE]: {
128
- id: 62,
128
+ id: 105,
129
129
  code: error_codes_js_1.VulnerabilityCode.BAC_VERTICAL_PRIVILEGE,
130
130
  title: 'Broken Access Control - Vertical Privilege Escalation',
131
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.',
@@ -150,7 +150,7 @@ exports.AUTH_VULNERABILITIES = {
150
150
  // MASS ASSIGNMENT
151
151
  // ========================================
152
152
  [error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION]: {
153
- id: 63,
153
+ id: 106,
154
154
  code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_ROLE_ESCALATION,
155
155
  title: 'Mass Assignment - Role Escalation',
156
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.',
@@ -172,7 +172,7 @@ exports.AUTH_VULNERABILITIES = {
172
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.',
173
173
  },
174
174
  [error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION]: {
175
- id: 64,
175
+ id: 107,
176
176
  code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_PROTOTYPE_POLLUTION,
177
177
  title: 'Mass Assignment - Prototype Pollution',
178
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.',
@@ -194,7 +194,7 @@ exports.AUTH_VULNERABILITIES = {
194
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.',
195
195
  },
196
196
  [error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN]: {
197
- id: 65,
197
+ id: 108,
198
198
  code: error_codes_js_1.VulnerabilityCode.JWT_EXPIRED_TOKEN,
199
199
  title: 'JWT Vulnerability - Expired Token Accepted',
200
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.',
@@ -216,7 +216,7 @@ exports.AUTH_VULNERABILITIES = {
216
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.',
217
217
  },
218
218
  [error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS]: {
219
- id: 66,
219
+ id: 109,
220
220
  code: error_codes_js_1.VulnerabilityCode.JWT_MISSING_CLAIMS,
221
221
  title: 'JWT Vulnerability - Missing Required Claims',
222
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.',
@@ -238,7 +238,7 @@ exports.AUTH_VULNERABILITIES = {
238
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.',
239
239
  },
240
240
  [error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE]: {
241
- id: 67,
241
+ id: 110,
242
242
  code: error_codes_js_1.VulnerabilityCode.BAC_HORIZONTAL_PRIVILEGE,
243
243
  title: 'Broken Access Control - Horizontal Privilege Escalation',
244
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.',
@@ -260,7 +260,7 @@ exports.AUTH_VULNERABILITIES = {
260
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.',
261
261
  },
262
262
  [error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD]: {
263
- id: 68,
263
+ id: 111,
264
264
  code: error_codes_js_1.VulnerabilityCode.MASSASSIGN_HIDDEN_FIELD,
265
265
  title: 'Mass Assignment - Hidden Field Manipulation',
266
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.',
@@ -282,7 +282,7 @@ exports.AUTH_VULNERABILITIES = {
282
282
  remediation: 'Never trust client-provided values for server-computed fields. Use explicit DTOs with allowlisted fields. Recompute amounts, timestamps, and IDs server-side.',
283
283
  },
284
284
  [error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING]: {
285
- id: 131,
285
+ id: 112,
286
286
  code: error_codes_js_1.VulnerabilityCode.JWT_CLAIM_TAMPERING,
287
287
  title: 'JWT - Claim Tampering',
288
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.',
@@ -304,7 +304,7 @@ exports.AUTH_VULNERABILITIES = {
304
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.',
305
305
  },
306
306
  [error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION]: {
307
- id: 132,
307
+ id: 113,
308
308
  code: error_codes_js_1.VulnerabilityCode.JWT_KID_INJECTION,
309
309
  title: 'JWT - KID Header Injection',
310
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.',
@@ -326,7 +326,7 @@ exports.AUTH_VULNERABILITIES = {
326
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.',
327
327
  },
328
328
  [error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION]: {
329
- id: 133,
329
+ id: 114,
330
330
  code: error_codes_js_1.VulnerabilityCode.JWT_JKU_INJECTION,
331
331
  title: 'JWT - JKU Header Injection',
332
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.',
@@ -348,7 +348,7 @@ exports.AUTH_VULNERABILITIES = {
348
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.',
349
349
  },
350
350
  [error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK]: {
351
- id: 134,
351
+ id: 115,
352
352
  code: error_codes_js_1.VulnerabilityCode.JWT_EMBEDDED_JWK,
353
353
  title: 'JWT - Embedded JWK Injection',
354
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.',
@@ -370,7 +370,7 @@ exports.AUTH_VULNERABILITIES = {
370
370
  remediation: 'Reject embedded JWKs from tokens unless explicitly required and validated against a trusted key set. Use pinned keys and strict header validation.',
371
371
  },
372
372
  [error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION]: {
373
- id: 135,
373
+ id: 116,
374
374
  code: error_codes_js_1.VulnerabilityCode.JWT_X5C_INJECTION,
375
375
  title: 'JWT - X5C Header Injection',
376
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.',