@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
package/dist/categories/ssrf.js
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
import { VulnerabilityCode } from '../error-codes.js';
|
|
7
7
|
export const SSRF_VULNERABILITIES = {
|
|
8
8
|
[VulnerabilityCode.SSRF_CLOUD_METADATA]: {
|
|
9
|
-
id:
|
|
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.',
|
|
13
13
|
severity: 'critical',
|
|
14
|
+
levelId: 1,
|
|
14
15
|
category: 'ssrf',
|
|
15
16
|
scanner: 'ssrf',
|
|
16
17
|
cvss: {
|
|
@@ -27,11 +28,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
27
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.',
|
|
28
29
|
},
|
|
29
30
|
[VulnerabilityCode.SSRF_INTERNAL_SERVICE]: {
|
|
30
|
-
id:
|
|
31
|
+
id: 451,
|
|
31
32
|
code: VulnerabilityCode.SSRF_INTERNAL_SERVICE,
|
|
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: {
|
|
@@ -48,11 +50,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
48
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.',
|
|
49
51
|
},
|
|
50
52
|
[VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING]: {
|
|
51
|
-
id:
|
|
53
|
+
id: 452,
|
|
52
54
|
code: VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING,
|
|
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: {
|
|
@@ -69,11 +72,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
69
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.',
|
|
70
73
|
},
|
|
71
74
|
[VulnerabilityCode.SSRF_BLIND_OOB]: {
|
|
72
|
-
id:
|
|
75
|
+
id: 453,
|
|
73
76
|
code: VulnerabilityCode.SSRF_BLIND_OOB,
|
|
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: {
|
|
@@ -93,11 +97,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
93
97
|
// OPEN REDIRECT
|
|
94
98
|
// ========================================
|
|
95
99
|
[VulnerabilityCode.REDIRECT_HEADER_INJECTION]: {
|
|
96
|
-
id:
|
|
100
|
+
id: 454,
|
|
97
101
|
code: VulnerabilityCode.REDIRECT_HEADER_INJECTION,
|
|
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: {
|
|
@@ -114,11 +119,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
114
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.',
|
|
115
120
|
},
|
|
116
121
|
[VulnerabilityCode.REDIRECT_JS_NAVIGATION]: {
|
|
117
|
-
id:
|
|
122
|
+
id: 455,
|
|
118
123
|
code: VulnerabilityCode.REDIRECT_JS_NAVIGATION,
|
|
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: {
|
|
@@ -138,11 +144,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
138
144
|
// HOST HEADER INJECTION
|
|
139
145
|
// ========================================
|
|
140
146
|
[VulnerabilityCode.HOST_CACHE_POISONING]: {
|
|
141
|
-
id:
|
|
147
|
+
id: 456,
|
|
142
148
|
code: VulnerabilityCode.HOST_CACHE_POISONING,
|
|
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: {
|
|
@@ -159,11 +166,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
159
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.',
|
|
160
167
|
},
|
|
161
168
|
[VulnerabilityCode.HOST_PASSWORD_RESET]: {
|
|
162
|
-
id:
|
|
169
|
+
id: 457,
|
|
163
170
|
code: VulnerabilityCode.HOST_PASSWORD_RESET,
|
|
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: {
|
|
@@ -180,11 +188,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
180
188
|
remediation: 'Use hardcoded canonical domain for generated URLs. Never trust Host header for security-sensitive functionality. Validate Host header against configured allowed hosts.',
|
|
181
189
|
},
|
|
182
190
|
[VulnerabilityCode.SSRF_FILTER_BYPASS]: {
|
|
183
|
-
id:
|
|
191
|
+
id: 458,
|
|
184
192
|
code: VulnerabilityCode.SSRF_FILTER_BYPASS,
|
|
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: {
|
|
@@ -201,11 +210,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
201
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.',
|
|
202
211
|
},
|
|
203
212
|
[VulnerabilityCode.REDIRECT_META_REFRESH]: {
|
|
204
|
-
id:
|
|
213
|
+
id: 459,
|
|
205
214
|
code: VulnerabilityCode.REDIRECT_META_REFRESH,
|
|
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: {
|
|
@@ -222,11 +232,12 @@ export const SSRF_VULNERABILITIES = {
|
|
|
222
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.',
|
|
223
233
|
},
|
|
224
234
|
[VulnerabilityCode.HOST_REDIRECT]: {
|
|
225
|
-
id:
|
|
235
|
+
id: 460,
|
|
226
236
|
code: VulnerabilityCode.HOST_REDIRECT,
|
|
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: {
|
package/dist/categories/xss.js
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
import { VulnerabilityCode } from '../error-codes.js';
|
|
7
7
|
export const XSS_VULNERABILITIES = {
|
|
8
8
|
[VulnerabilityCode.XSS_REFLECTED]: {
|
|
9
|
-
id:
|
|
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.',
|
|
13
13
|
severity: 'medium',
|
|
14
|
+
levelId: 3,
|
|
14
15
|
category: 'xss',
|
|
15
16
|
scanner: 'xss',
|
|
16
17
|
cvss: {
|
|
@@ -27,11 +28,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
27
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).',
|
|
28
29
|
},
|
|
29
30
|
[VulnerabilityCode.XSS_STORED]: {
|
|
30
|
-
id:
|
|
31
|
+
id: 401,
|
|
31
32
|
code: VulnerabilityCode.XSS_STORED,
|
|
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: {
|
|
@@ -48,11 +50,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
48
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.',
|
|
49
51
|
},
|
|
50
52
|
[VulnerabilityCode.XSS_DOM_BASED]: {
|
|
51
|
-
id:
|
|
53
|
+
id: 402,
|
|
52
54
|
code: VulnerabilityCode.XSS_DOM_BASED,
|
|
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: {
|
|
@@ -69,11 +72,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
69
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.',
|
|
70
73
|
},
|
|
71
74
|
[VulnerabilityCode.XSS_SVG_INJECTION]: {
|
|
72
|
-
id:
|
|
75
|
+
id: 403,
|
|
73
76
|
code: VulnerabilityCode.XSS_SVG_INJECTION,
|
|
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: {
|
|
@@ -90,11 +94,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
90
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.',
|
|
91
95
|
},
|
|
92
96
|
[VulnerabilityCode.XSS_CSTI_ANGULAR]: {
|
|
93
|
-
id:
|
|
97
|
+
id: 404,
|
|
94
98
|
code: VulnerabilityCode.XSS_CSTI_ANGULAR,
|
|
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: {
|
|
@@ -112,11 +117,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
112
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.',
|
|
113
118
|
},
|
|
114
119
|
[VulnerabilityCode.XSS_CSP_BYPASS]: {
|
|
115
|
-
id:
|
|
120
|
+
id: 405,
|
|
116
121
|
code: VulnerabilityCode.XSS_CSP_BYPASS,
|
|
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: {
|
|
@@ -133,11 +139,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
133
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.',
|
|
134
140
|
},
|
|
135
141
|
[VulnerabilityCode.XSS_JS_CONTEXT]: {
|
|
136
|
-
id:
|
|
142
|
+
id: 406,
|
|
137
143
|
code: VulnerabilityCode.XSS_JS_CONTEXT,
|
|
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: {
|
|
@@ -154,11 +161,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
154
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.',
|
|
155
162
|
},
|
|
156
163
|
[VulnerabilityCode.XSS_EVENT_HANDLER]: {
|
|
157
|
-
id:
|
|
164
|
+
id: 407,
|
|
158
165
|
code: VulnerabilityCode.XSS_EVENT_HANDLER,
|
|
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: {
|
|
@@ -175,11 +183,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
175
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.',
|
|
176
184
|
},
|
|
177
185
|
[VulnerabilityCode.XSS_SCRIPT_INJECTION]: {
|
|
178
|
-
id:
|
|
186
|
+
id: 408,
|
|
179
187
|
code: VulnerabilityCode.XSS_SCRIPT_INJECTION,
|
|
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: {
|
|
@@ -196,11 +205,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
196
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.',
|
|
197
206
|
},
|
|
198
207
|
[VulnerabilityCode.XSS_HTML_INJECTION]: {
|
|
199
|
-
id:
|
|
208
|
+
id: 409,
|
|
200
209
|
code: VulnerabilityCode.XSS_HTML_INJECTION,
|
|
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: {
|
|
@@ -217,11 +227,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
217
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.',
|
|
218
228
|
},
|
|
219
229
|
[VulnerabilityCode.XSS_ATTRIBUTE_INJECTION]: {
|
|
220
|
-
id:
|
|
230
|
+
id: 410,
|
|
221
231
|
code: VulnerabilityCode.XSS_ATTRIBUTE_INJECTION,
|
|
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: {
|
|
@@ -238,11 +249,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
238
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.',
|
|
239
250
|
},
|
|
240
251
|
[VulnerabilityCode.XSS_CSS_INJECTION]: {
|
|
241
|
-
id:
|
|
252
|
+
id: 411,
|
|
242
253
|
code: VulnerabilityCode.XSS_CSS_INJECTION,
|
|
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: {
|
|
@@ -259,11 +271,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
259
271
|
remediation: 'Sanitize CSS input to remove url() functions and expression() directives. Use CSS-specific encoding. Implement Content Security Policy with style-src restrictions.',
|
|
260
272
|
},
|
|
261
273
|
[VulnerabilityCode.XSS_TEMPLATE_LITERAL]: {
|
|
262
|
-
id:
|
|
274
|
+
id: 412,
|
|
263
275
|
code: VulnerabilityCode.XSS_TEMPLATE_LITERAL,
|
|
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: {
|
|
@@ -280,11 +293,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
280
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.',
|
|
281
294
|
},
|
|
282
295
|
[VulnerabilityCode.XSS_MUTATION_BASED]: {
|
|
283
|
-
id:
|
|
296
|
+
id: 413,
|
|
284
297
|
code: VulnerabilityCode.XSS_MUTATION_BASED,
|
|
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: {
|
|
@@ -301,11 +315,12 @@ export const XSS_VULNERABILITIES = {
|
|
|
301
315
|
remediation: 'Use DOMPurify or similar mXSS-aware sanitizers. Avoid innerHTML with user content. Implement Trusted Types. Stay updated on browser parsing behavior changes.',
|
|
302
316
|
},
|
|
303
317
|
[VulnerabilityCode.XSS_CSTI_VUE]: {
|
|
304
|
-
id:
|
|
318
|
+
id: 414,
|
|
305
319
|
code: VulnerabilityCode.XSS_CSTI_VUE,
|
|
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: {
|
package/dist/category.js
ADDED
|
@@ -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
|
+
};
|
package/dist/error-codes.d.ts
CHANGED
|
@@ -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",
|
package/dist/error-codes.js
CHANGED
|
@@ -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
|
};
|
package/dist/scanner.js
ADDED
|
@@ -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 */
|