@zerothreatai/vulnerability-registry 2.0.0 → 4.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 (49) hide show
  1. package/dist/categories/authentication.js +17 -0
  2. package/dist/categories/configuration.js +501 -0
  3. package/dist/categories/injection.js +34 -0
  4. package/dist/categories/sensitive-paths.js +84 -0
  5. package/dist/categories/ssrf.js +11 -0
  6. package/dist/categories/xss.js +15 -0
  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 +17 -0
  17. package/dist-cjs/categories/configuration.js +501 -0
  18. package/dist-cjs/categories/injection.js +34 -0
  19. package/dist-cjs/categories/sensitive-paths.js +84 -0
  20. package/dist-cjs/categories/ssrf.js +11 -0
  21. package/dist-cjs/categories/xss.js +15 -0
  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 +1 -1
  27. package/src/categories/authentication.js +54 -40
  28. package/src/categories/authentication.ts +134 -117
  29. package/src/categories/configuration.js +990 -114
  30. package/src/categories/configuration.ts +1625 -1104
  31. package/src/categories/injection.js +105 -74
  32. package/src/categories/injection.ts +129 -95
  33. package/src/categories/sensitive-paths.js +255 -174
  34. package/src/categories/sensitive-paths.ts +84 -0
  35. package/src/categories/ssrf.js +36 -28
  36. package/src/categories/ssrf.ts +11 -0
  37. package/src/categories/xss.js +47 -35
  38. package/src/categories/xss.ts +15 -0
  39. package/src/category.ts +16 -0
  40. package/src/error-codes.d.ts +38 -0
  41. package/src/error-codes.js +41 -6
  42. package/src/error-codes.ts +25 -5
  43. package/src/index.js +33 -48
  44. package/src/index.ts +20 -14
  45. package/src/scanner.ts +23 -0
  46. package/src/types.d.ts +2 -0
  47. package/src/types.js +1 -2
  48. package/src/types.ts +4 -2
  49. package/zerothreatai-vulnerability-registry-4npm .0.0.tgz +0 -0
@@ -11,6 +11,7 @@ export const SSRF_VULNERABILITIES = {
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.',
13
13
  severity: 'critical',
14
+ levelId: 1,
14
15
  category: 'ssrf',
15
16
  scanner: 'ssrf',
16
17
  cvss: {
@@ -32,6 +33,7 @@ export const SSRF_VULNERABILITIES = {
32
33
  title: 'Server-Side Request Forgery - Internal Service Access',
33
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.',
34
35
  severity: 'high',
36
+ levelId: 2,
35
37
  category: 'ssrf',
36
38
  scanner: 'ssrf',
37
39
  cvss: {
@@ -53,6 +55,7 @@ export const SSRF_VULNERABILITIES = {
53
55
  title: 'Server-Side Request Forgery - Protocol Smuggling',
54
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.',
55
57
  severity: 'high',
58
+ levelId: 2,
56
59
  category: 'ssrf',
57
60
  scanner: 'ssrf',
58
61
  cvss: {
@@ -74,6 +77,7 @@ export const SSRF_VULNERABILITIES = {
74
77
  title: 'Server-Side Request Forgery - Blind OOB',
75
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.',
76
79
  severity: 'medium',
80
+ levelId: 3,
77
81
  category: 'ssrf',
78
82
  scanner: 'ssrf',
79
83
  cvss: {
@@ -98,6 +102,7 @@ export const SSRF_VULNERABILITIES = {
98
102
  title: 'Open Redirect - HTTP Header Injection',
99
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.',
100
104
  severity: 'medium',
105
+ levelId: 3,
101
106
  category: 'business_logic',
102
107
  scanner: 'redirect-route',
103
108
  cvss: {
@@ -119,6 +124,7 @@ export const SSRF_VULNERABILITIES = {
119
124
  title: 'Open Redirect - JavaScript Navigation',
120
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.',
121
126
  severity: 'medium',
127
+ levelId: 3,
122
128
  category: 'business_logic',
123
129
  scanner: 'redirect-route',
124
130
  cvss: {
@@ -143,6 +149,7 @@ export const SSRF_VULNERABILITIES = {
143
149
  title: 'Host Header Injection - Cache Poisoning',
144
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.',
145
151
  severity: 'high',
152
+ levelId: 2,
146
153
  category: 'configuration',
147
154
  scanner: 'host-header',
148
155
  cvss: {
@@ -164,6 +171,7 @@ export const SSRF_VULNERABILITIES = {
164
171
  title: 'Host Header Injection - Password Reset Poisoning',
165
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.',
166
173
  severity: 'high',
174
+ levelId: 2,
167
175
  category: 'configuration',
168
176
  scanner: 'host-header',
169
177
  cvss: {
@@ -185,6 +193,7 @@ export const SSRF_VULNERABILITIES = {
185
193
  title: 'Server-Side Request Forgery - Filter Bypass',
186
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.',
187
195
  severity: 'high',
196
+ levelId: 2,
188
197
  category: 'ssrf',
189
198
  scanner: 'ssrf',
190
199
  cvss: {
@@ -206,6 +215,7 @@ export const SSRF_VULNERABILITIES = {
206
215
  title: 'Open Redirect - Meta Refresh',
207
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.',
208
217
  severity: 'low',
218
+ levelId: 4,
209
219
  category: 'business_logic',
210
220
  scanner: 'redirect-route',
211
221
  cvss: {
@@ -227,6 +237,7 @@ export const SSRF_VULNERABILITIES = {
227
237
  title: 'Host Header Injection - Open Redirect',
228
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.',
229
239
  severity: 'medium',
240
+ levelId: 3,
230
241
  category: 'configuration',
231
242
  scanner: 'host-header',
232
243
  cvss: {
@@ -11,6 +11,7 @@ export const XSS_VULNERABILITIES = {
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.',
13
13
  severity: 'medium',
14
+ levelId: 3,
14
15
  category: 'xss',
15
16
  scanner: 'xss',
16
17
  cvss: {
@@ -32,6 +33,7 @@ export const XSS_VULNERABILITIES = {
32
33
  title: 'Cross-Site Scripting - Stored',
33
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.',
34
35
  severity: 'high',
36
+ levelId: 2,
35
37
  category: 'xss',
36
38
  scanner: 'xss',
37
39
  cvss: {
@@ -53,6 +55,7 @@ export const XSS_VULNERABILITIES = {
53
55
  title: 'Cross-Site Scripting - DOM Based',
54
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.',
55
57
  severity: 'medium',
58
+ levelId: 3,
56
59
  category: 'xss',
57
60
  scanner: 'xss',
58
61
  cvss: {
@@ -74,6 +77,7 @@ export const XSS_VULNERABILITIES = {
74
77
  title: 'Cross-Site Scripting - SVG Injection',
75
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.',
76
79
  severity: 'high',
80
+ levelId: 2,
77
81
  category: 'xss',
78
82
  scanner: 'xss',
79
83
  cvss: {
@@ -95,6 +99,7 @@ export const XSS_VULNERABILITIES = {
95
99
  title: 'Cross-Site Scripting - Angular Template Injection',
96
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.',
97
101
  severity: 'high',
102
+ levelId: 2,
98
103
  category: 'xss',
99
104
  scanner: 'xss',
100
105
  cvss: {
@@ -117,6 +122,7 @@ export const XSS_VULNERABILITIES = {
117
122
  title: 'Cross-Site Scripting - CSP Bypass',
118
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.',
119
124
  severity: 'high',
125
+ levelId: 2,
120
126
  category: 'xss',
121
127
  scanner: 'xss',
122
128
  cvss: {
@@ -138,6 +144,7 @@ export const XSS_VULNERABILITIES = {
138
144
  title: 'Cross-Site Scripting - JavaScript Context',
139
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.',
140
146
  severity: 'high',
147
+ levelId: 2,
141
148
  category: 'xss',
142
149
  scanner: 'xss',
143
150
  cvss: {
@@ -159,6 +166,7 @@ export const XSS_VULNERABILITIES = {
159
166
  title: 'Cross-Site Scripting - Event Handler Injection',
160
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.',
161
168
  severity: 'high',
169
+ levelId: 2,
162
170
  category: 'xss',
163
171
  scanner: 'xss',
164
172
  cvss: {
@@ -180,6 +188,7 @@ export const XSS_VULNERABILITIES = {
180
188
  title: 'Cross-Site Scripting - Script Tag Injection',
181
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.',
182
190
  severity: 'high',
191
+ levelId: 2,
183
192
  category: 'xss',
184
193
  scanner: 'xss',
185
194
  cvss: {
@@ -201,6 +210,7 @@ export const XSS_VULNERABILITIES = {
201
210
  title: 'Cross-Site Scripting - HTML Injection',
202
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.',
203
212
  severity: 'medium',
213
+ levelId: 3,
204
214
  category: 'xss',
205
215
  scanner: 'xss',
206
216
  cvss: {
@@ -222,6 +232,7 @@ export const XSS_VULNERABILITIES = {
222
232
  title: 'Cross-Site Scripting - Attribute Injection',
223
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.',
224
234
  severity: 'medium',
235
+ levelId: 3,
225
236
  category: 'xss',
226
237
  scanner: 'xss',
227
238
  cvss: {
@@ -243,6 +254,7 @@ export const XSS_VULNERABILITIES = {
243
254
  title: 'Cross-Site Scripting - CSS Injection',
244
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.',
245
256
  severity: 'medium',
257
+ levelId: 3,
246
258
  category: 'xss',
247
259
  scanner: 'xss',
248
260
  cvss: {
@@ -264,6 +276,7 @@ export const XSS_VULNERABILITIES = {
264
276
  title: 'Cross-Site Scripting - Template Literal Injection',
265
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.',
266
278
  severity: 'high',
279
+ levelId: 2,
267
280
  category: 'xss',
268
281
  scanner: 'xss',
269
282
  cvss: {
@@ -285,6 +298,7 @@ export const XSS_VULNERABILITIES = {
285
298
  title: 'Cross-Site Scripting - Mutation XSS',
286
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.',
287
300
  severity: 'high',
301
+ levelId: 2,
288
302
  category: 'xss',
289
303
  scanner: 'xss',
290
304
  cvss: {
@@ -306,6 +320,7 @@ export const XSS_VULNERABILITIES = {
306
320
  title: 'Cross-Site Scripting - Vue.js Template Injection',
307
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.',
308
322
  severity: 'high',
323
+ levelId: 2,
309
324
  category: 'xss',
310
325
  scanner: 'xss',
311
326
  cvss: {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Category registry - human-friendly titles for categories.
3
+ */
4
+ export declare const CATEGORY_REGISTRY: Record<string, {
5
+ title: string;
6
+ }>;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Category registry - human-friendly titles for categories.
3
+ */
4
+ export const CATEGORY_REGISTRY = {
5
+ "injection": { title: "Injection" },
6
+ "xss": { title: "Cross-Site Scripting" },
7
+ "authentication": { title: "Authentication" },
8
+ "access_control": { title: "Access Control" },
9
+ "configuration": { title: "Configuration" },
10
+ "information_disclosure": { title: "Information Disclosure" },
11
+ "cryptographic": { title: "Cryptographic" },
12
+ "business_logic": { title: "Business Logic" },
13
+ "ssrf": { title: "Server-Side Request Forgery" },
14
+ "file_inclusion": { title: "File Inclusion" },
15
+ };
@@ -129,6 +129,26 @@ export declare enum VulnerabilityCode {
129
129
  HOST_CACHE_POISONING = "HOST_CACHE_POISONING",
130
130
  HOST_PASSWORD_RESET = "HOST_PASSWORD_RESET",
131
131
  HOST_REDIRECT = "HOST_REDIRECT",
132
+ DIRBROWSE_GENERIC = "DIRBROWSE_GENERIC",
133
+ DIRBROWSE_GENERIC_SENSITIVE = "DIRBROWSE_GENERIC_SENSITIVE",
134
+ DIRBROWSE_APACHE = "DIRBROWSE_APACHE",
135
+ DIRBROWSE_APACHE_SENSITIVE = "DIRBROWSE_APACHE_SENSITIVE",
136
+ DIRBROWSE_NGINX = "DIRBROWSE_NGINX",
137
+ DIRBROWSE_NGINX_SENSITIVE = "DIRBROWSE_NGINX_SENSITIVE",
138
+ DIRBROWSE_IIS = "DIRBROWSE_IIS",
139
+ DIRBROWSE_IIS_SENSITIVE = "DIRBROWSE_IIS_SENSITIVE",
140
+ DIRBROWSE_TOMCAT = "DIRBROWSE_TOMCAT",
141
+ DIRBROWSE_TOMCAT_SENSITIVE = "DIRBROWSE_TOMCAT_SENSITIVE",
142
+ DIRBROWSE_CADDY = "DIRBROWSE_CADDY",
143
+ DIRBROWSE_CADDY_SENSITIVE = "DIRBROWSE_CADDY_SENSITIVE",
144
+ DIRBROWSE_WEBDAV = "DIRBROWSE_WEBDAV",
145
+ DIRBROWSE_WEBDAV_SENSITIVE = "DIRBROWSE_WEBDAV_SENSITIVE",
146
+ DIRBROWSE_S3 = "DIRBROWSE_S3",
147
+ DIRBROWSE_S3_SENSITIVE = "DIRBROWSE_S3_SENSITIVE",
148
+ DIRBROWSE_GCS = "DIRBROWSE_GCS",
149
+ DIRBROWSE_GCS_SENSITIVE = "DIRBROWSE_GCS_SENSITIVE",
150
+ DIRBROWSE_AZURE_BLOB = "DIRBROWSE_AZURE_BLOB",
151
+ DIRBROWSE_AZURE_BLOB_SENSITIVE = "DIRBROWSE_AZURE_BLOB_SENSITIVE",
132
152
  DIRBROWSE_ENABLED = "DIRBROWSE_ENABLED",
133
153
  DIRBROWSE_SENSITIVE = "DIRBROWSE_SENSITIVE",
134
154
  MASSASSIGN_PROTOTYPE_POLLUTION = "MASSASSIGN_PROTOTYPE_POLLUTION",
@@ -172,6 +172,26 @@ export var VulnerabilityCode;
172
172
  // ========================================
173
173
  // DIRECTORY BROWSING (DIRBROWSE_*)
174
174
  // ========================================
175
+ VulnerabilityCode["DIRBROWSE_GENERIC"] = "DIRBROWSE_GENERIC";
176
+ VulnerabilityCode["DIRBROWSE_GENERIC_SENSITIVE"] = "DIRBROWSE_GENERIC_SENSITIVE";
177
+ VulnerabilityCode["DIRBROWSE_APACHE"] = "DIRBROWSE_APACHE";
178
+ VulnerabilityCode["DIRBROWSE_APACHE_SENSITIVE"] = "DIRBROWSE_APACHE_SENSITIVE";
179
+ VulnerabilityCode["DIRBROWSE_NGINX"] = "DIRBROWSE_NGINX";
180
+ VulnerabilityCode["DIRBROWSE_NGINX_SENSITIVE"] = "DIRBROWSE_NGINX_SENSITIVE";
181
+ VulnerabilityCode["DIRBROWSE_IIS"] = "DIRBROWSE_IIS";
182
+ VulnerabilityCode["DIRBROWSE_IIS_SENSITIVE"] = "DIRBROWSE_IIS_SENSITIVE";
183
+ VulnerabilityCode["DIRBROWSE_TOMCAT"] = "DIRBROWSE_TOMCAT";
184
+ VulnerabilityCode["DIRBROWSE_TOMCAT_SENSITIVE"] = "DIRBROWSE_TOMCAT_SENSITIVE";
185
+ VulnerabilityCode["DIRBROWSE_CADDY"] = "DIRBROWSE_CADDY";
186
+ VulnerabilityCode["DIRBROWSE_CADDY_SENSITIVE"] = "DIRBROWSE_CADDY_SENSITIVE";
187
+ VulnerabilityCode["DIRBROWSE_WEBDAV"] = "DIRBROWSE_WEBDAV";
188
+ VulnerabilityCode["DIRBROWSE_WEBDAV_SENSITIVE"] = "DIRBROWSE_WEBDAV_SENSITIVE";
189
+ VulnerabilityCode["DIRBROWSE_S3"] = "DIRBROWSE_S3";
190
+ VulnerabilityCode["DIRBROWSE_S3_SENSITIVE"] = "DIRBROWSE_S3_SENSITIVE";
191
+ VulnerabilityCode["DIRBROWSE_GCS"] = "DIRBROWSE_GCS";
192
+ VulnerabilityCode["DIRBROWSE_GCS_SENSITIVE"] = "DIRBROWSE_GCS_SENSITIVE";
193
+ VulnerabilityCode["DIRBROWSE_AZURE_BLOB"] = "DIRBROWSE_AZURE_BLOB";
194
+ VulnerabilityCode["DIRBROWSE_AZURE_BLOB_SENSITIVE"] = "DIRBROWSE_AZURE_BLOB_SENSITIVE";
175
195
  VulnerabilityCode["DIRBROWSE_ENABLED"] = "DIRBROWSE_ENABLED";
176
196
  VulnerabilityCode["DIRBROWSE_SENSITIVE"] = "DIRBROWSE_SENSITIVE";
177
197
  // ========================================
package/dist/index.d.ts CHANGED
@@ -11,6 +11,8 @@ import { SSRF_VULNERABILITIES } from './categories/ssrf.js';
11
11
  import { AUTH_VULNERABILITIES } from './categories/authentication.js';
12
12
  import { CONFIG_VULNERABILITIES } from './categories/configuration.js';
13
13
  import { SENSITIVE_PATH_VULNERABILITIES } from './categories/sensitive-paths.js';
14
+ import { CATEGORY_REGISTRY } from './category.js';
15
+ import { SCANNER_REGISTRY } from './scanner.js';
14
16
  /**
15
17
  * Complete vulnerability registry combining all categories
16
18
  */
@@ -45,7 +47,7 @@ export declare function getVulnerabilityCount(): number;
45
47
  export declare function createFinding(code: VulnerabilityCode | string, overrides?: Partial<VulnerabilityDefinition>): VulnerabilityDefinition | null;
46
48
  export { VulnerabilityCode } from './error-codes.js';
47
49
  export type { VulnerabilityDefinition, VulnerabilityLookup, CVSSProfile, CWEReference, OWASPReference, Severity, VulnerabilityCategory, } from './types.js';
48
- export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, };
50
+ export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
49
51
  declare const _default: {
50
52
  VulnerabilityCode: typeof VulnerabilityCode;
51
53
  VULNERABILITY_REGISTRY: Record<string, VulnerabilityDefinition>;
@@ -56,5 +58,11 @@ declare const _default: {
56
58
  getAllVulnerabilityCodes: typeof getAllVulnerabilityCodes;
57
59
  getVulnerabilityCount: typeof getVulnerabilityCount;
58
60
  createFinding: typeof createFinding;
61
+ CATEGORY_REGISTRY: Record<string, {
62
+ title: string;
63
+ }>;
64
+ SCANNER_REGISTRY: Record<string, {
65
+ title: string;
66
+ }>;
59
67
  };
60
68
  export default _default;
package/dist/index.js CHANGED
@@ -11,6 +11,8 @@ import { SSRF_VULNERABILITIES } from './categories/ssrf.js';
11
11
  import { AUTH_VULNERABILITIES } from './categories/authentication.js';
12
12
  import { CONFIG_VULNERABILITIES } from './categories/configuration.js';
13
13
  import { SENSITIVE_PATH_VULNERABILITIES } from './categories/sensitive-paths.js';
14
+ import { CATEGORY_REGISTRY } from './category.js';
15
+ import { SCANNER_REGISTRY } from './scanner.js';
14
16
  /**
15
17
  * Complete vulnerability registry combining all categories
16
18
  */
@@ -78,7 +80,7 @@ export function createFinding(code, overrides) {
78
80
  // Re-export all types and enums
79
81
  export { VulnerabilityCode } from './error-codes.js';
80
82
  // Export category definitions for direct access
81
- export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, };
83
+ export { INJECTION_VULNERABILITIES, XSS_VULNERABILITIES, SSRF_VULNERABILITIES, AUTH_VULNERABILITIES, CONFIG_VULNERABILITIES, SENSITIVE_PATH_VULNERABILITIES, CATEGORY_REGISTRY, SCANNER_REGISTRY, };
82
84
  export default {
83
85
  VulnerabilityCode,
84
86
  VULNERABILITY_REGISTRY,
@@ -89,4 +91,6 @@ export default {
89
91
  getAllVulnerabilityCodes,
90
92
  getVulnerabilityCount,
91
93
  createFinding,
94
+ CATEGORY_REGISTRY,
95
+ SCANNER_REGISTRY,
92
96
  };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Scanner registry - human-friendly titles for scanners.
3
+ */
4
+ export declare const SCANNER_REGISTRY: Record<string, {
5
+ title: string;
6
+ }>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Scanner registry - human-friendly titles for scanners.
3
+ */
4
+ export const SCANNER_REGISTRY = {
5
+ "broken-access": { title: "Broken Access" },
6
+ "command-injection": { title: "Command Injection" },
7
+ "deserialization": { title: "Deserialization" },
8
+ "directory-browsing": { title: "Directory Browsing" },
9
+ "host-header": { title: "Host Header" },
10
+ "jwt": { title: "JSON WEB TOKEN" },
11
+ "local-file-inclusion": { title: "Local File Inclusion" },
12
+ "model-state": { title: "Model State" },
13
+ "redirect-route": { title: "Redirect Route" },
14
+ "security-headers": { title: "Security Headers" },
15
+ "sensitive-path-scout": { title: "Sensitive Path Scout" },
16
+ "sql-injection": { title: "SQL Injection" },
17
+ "ssrf": { title: "SSRF" },
18
+ "ssti": { title: "SSTI" },
19
+ "xpath-injection": { title: "XPath Injection" },
20
+ "xss": { title: "XSS" },
21
+ "xxe": { title: "XXE" },
22
+ };
package/dist/types.d.ts CHANGED
@@ -62,6 +62,8 @@ export interface VulnerabilityDefinition {
62
62
  description: string;
63
63
  /** Severity level */
64
64
  severity: Severity;
65
+ /** Severity level numeric mapping (1=critical, 2=high, 3=medium, 4=low, 5=info) */
66
+ levelId: 1 | 2 | 3 | 4 | 5;
65
67
  /** Vulnerability category */
66
68
  category: VulnerabilityCategory;
67
69
  /** Scanner that detects this vulnerability */
@@ -17,6 +17,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -38,6 +39,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -59,6 +61,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -83,6 +86,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -104,6 +108,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -125,6 +130,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -149,6 +155,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -170,6 +177,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -191,6 +199,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -212,6 +221,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -233,6 +243,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -254,6 +265,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -275,6 +287,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -296,6 +309,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -317,6 +331,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -338,6 +353,7 @@ exports.AUTH_VULNERABILITIES = {
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: {
@@ -359,6 +375,7 @@ exports.AUTH_VULNERABILITIES = {
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: {