@zerothreatai/vulnerability-registry 1.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 (76) hide show
  1. package/dist/categories/authentication.d.ts +8 -0
  2. package/dist/categories/authentication.js +375 -0
  3. package/dist/categories/configuration.d.ts +8 -0
  4. package/dist/categories/configuration.js +903 -0
  5. package/dist/categories/injection.d.ts +8 -0
  6. package/dist/categories/injection.js +747 -0
  7. package/dist/categories/sensitive-paths.d.ts +9 -0
  8. package/dist/categories/sensitive-paths.js +1788 -0
  9. package/dist/categories/ssrf.d.ts +8 -0
  10. package/dist/categories/ssrf.js +247 -0
  11. package/dist/categories/xss.d.ts +7 -0
  12. package/dist/categories/xss.js +325 -0
  13. package/dist/error-codes.d.ts +242 -0
  14. package/dist/error-codes.js +312 -0
  15. package/dist/index.d.ts +60 -0
  16. package/dist/index.js +92 -0
  17. package/dist/types.d.ts +86 -0
  18. package/dist/types.js +6 -0
  19. package/dist-cjs/categories/authentication.js +378 -0
  20. package/dist-cjs/categories/configuration.js +906 -0
  21. package/dist-cjs/categories/injection.js +750 -0
  22. package/dist-cjs/categories/sensitive-paths.js +1791 -0
  23. package/dist-cjs/categories/ssrf.js +250 -0
  24. package/dist-cjs/categories/xss.js +328 -0
  25. package/dist-cjs/error-codes.js +315 -0
  26. package/dist-cjs/index.js +107 -0
  27. package/dist-cjs/types.js +7 -0
  28. package/package.json +35 -0
  29. package/src/categories/authentication.d.ts +8 -0
  30. package/src/categories/authentication.d.ts.map +1 -0
  31. package/src/categories/authentication.js +378 -0
  32. package/src/categories/authentication.js.map +1 -0
  33. package/src/categories/authentication.ts +395 -0
  34. package/src/categories/configuration.d.ts +8 -0
  35. package/src/categories/configuration.d.ts.map +1 -0
  36. package/src/categories/configuration.js +906 -0
  37. package/src/categories/configuration.js.map +1 -0
  38. package/src/categories/configuration.ts +948 -0
  39. package/src/categories/injection.d.ts +8 -0
  40. package/src/categories/injection.d.ts.map +1 -0
  41. package/src/categories/injection.js +750 -0
  42. package/src/categories/injection.js.map +1 -0
  43. package/src/categories/injection.ts +785 -0
  44. package/src/categories/sensitive-paths.d.ts +9 -0
  45. package/src/categories/sensitive-paths.d.ts.map +1 -0
  46. package/src/categories/sensitive-paths.js +1791 -0
  47. package/src/categories/sensitive-paths.js.map +1 -0
  48. package/src/categories/sensitive-paths.ts +1875 -0
  49. package/src/categories/ssrf.d.ts +8 -0
  50. package/src/categories/ssrf.d.ts.map +1 -0
  51. package/src/categories/ssrf.js +250 -0
  52. package/src/categories/ssrf.js.map +1 -0
  53. package/src/categories/ssrf.ts +261 -0
  54. package/src/categories/xss.d.ts +7 -0
  55. package/src/categories/xss.d.ts.map +1 -0
  56. package/src/categories/xss.js +328 -0
  57. package/src/categories/xss.js.map +1 -0
  58. package/src/categories/xss.ts +342 -0
  59. package/src/error-codes.d.ts +242 -0
  60. package/src/error-codes.d.ts.map +1 -0
  61. package/src/error-codes.js +315 -0
  62. package/src/error-codes.js.map +1 -0
  63. package/src/error-codes.ts +334 -0
  64. package/src/index.d.ts +60 -0
  65. package/src/index.d.ts.map +1 -0
  66. package/src/index.js +107 -0
  67. package/src/index.js.map +1 -0
  68. package/src/index.ts +126 -0
  69. package/src/types.d.ts +86 -0
  70. package/src/types.d.ts.map +1 -0
  71. package/src/types.js +7 -0
  72. package/src/types.js.map +1 -0
  73. package/src/types.ts +109 -0
  74. package/tsconfig.cjs.json +8 -0
  75. package/tsconfig.json +21 -0
  76. package/vulnerability-registry.zip +0 -0
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Vulnerability Registry - SSRF and Misconfiguration Vulnerabilities
3
+ *
4
+ * Definitions for SSRF, Open Redirect, Host Header, and related issues
5
+ */
6
+ import type { VulnerabilityDefinition } from '../types.js';
7
+ export declare const SSRF_VULNERABILITIES: Record<string, VulnerabilityDefinition>;
8
+ export default SSRF_VULNERABILITIES;
@@ -0,0 +1,247 @@
1
+ /**
2
+ * Vulnerability Registry - SSRF and Misconfiguration Vulnerabilities
3
+ *
4
+ * Definitions for SSRF, Open Redirect, Host Header, and related issues
5
+ */
6
+ import { VulnerabilityCode } from '../error-codes.js';
7
+ export const SSRF_VULNERABILITIES = {
8
+ [VulnerabilityCode.SSRF_CLOUD_METADATA]: {
9
+ id: 46,
10
+ code: VulnerabilityCode.SSRF_CLOUD_METADATA,
11
+ title: 'Server-Side Request Forgery - Cloud Metadata Access',
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
+ severity: 'critical',
14
+ category: 'ssrf',
15
+ scanner: 'ssrf',
16
+ cvss: {
17
+ score: 9.1,
18
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N',
19
+ severity: 'CRITICAL',
20
+ },
21
+ cwe: [
22
+ { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
23
+ ],
24
+ owasp: [
25
+ { id: 'A10:2021', name: 'SSRF', url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/' },
26
+ ],
27
+ 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
+ [VulnerabilityCode.SSRF_INTERNAL_SERVICE]: {
30
+ id: 47,
31
+ code: VulnerabilityCode.SSRF_INTERNAL_SERVICE,
32
+ title: 'Server-Side Request Forgery - Internal Service Access',
33
+ 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
+ severity: 'high',
35
+ category: 'ssrf',
36
+ scanner: 'ssrf',
37
+ cvss: {
38
+ score: 7.5,
39
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N',
40
+ severity: 'HIGH',
41
+ },
42
+ cwe: [
43
+ { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
44
+ ],
45
+ owasp: [
46
+ { id: 'A10:2021', name: 'SSRF', url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/' },
47
+ ],
48
+ 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
+ },
50
+ [VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING]: {
51
+ id: 48,
52
+ code: VulnerabilityCode.SSRF_PROTOCOL_SMUGGLING,
53
+ title: 'Server-Side Request Forgery - Protocol Smuggling',
54
+ 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
+ severity: 'high',
56
+ category: 'ssrf',
57
+ scanner: 'ssrf',
58
+ cvss: {
59
+ score: 8.6,
60
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N',
61
+ severity: 'HIGH',
62
+ },
63
+ cwe: [
64
+ { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
65
+ ],
66
+ owasp: [
67
+ { id: 'A10:2021', name: 'SSRF', url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/' },
68
+ ],
69
+ 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
+ },
71
+ [VulnerabilityCode.SSRF_BLIND_OOB]: {
72
+ id: 49,
73
+ code: VulnerabilityCode.SSRF_BLIND_OOB,
74
+ title: 'Server-Side Request Forgery - Blind OOB',
75
+ 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
+ severity: 'medium',
77
+ category: 'ssrf',
78
+ scanner: 'ssrf',
79
+ cvss: {
80
+ score: 5.3,
81
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N',
82
+ severity: 'MEDIUM',
83
+ },
84
+ cwe: [
85
+ { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
86
+ ],
87
+ owasp: [
88
+ { id: 'A10:2021', name: 'SSRF', url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/' },
89
+ ],
90
+ remediation: 'Implement URL allowlist validation. Block outbound DNS to untrusted domains. Use egress firewall rules. Monitor for unusual outbound connection patterns.',
91
+ },
92
+ // ========================================
93
+ // OPEN REDIRECT
94
+ // ========================================
95
+ [VulnerabilityCode.REDIRECT_HEADER_INJECTION]: {
96
+ id: 50,
97
+ code: VulnerabilityCode.REDIRECT_HEADER_INJECTION,
98
+ title: 'Open Redirect - HTTP Header Injection',
99
+ 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
+ severity: 'medium',
101
+ category: 'business_logic',
102
+ scanner: 'redirect-route',
103
+ cvss: {
104
+ score: 5.3,
105
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N',
106
+ severity: 'MEDIUM',
107
+ },
108
+ cwe: [
109
+ { id: 'CWE-601', name: 'URL Redirection', url: 'https://cwe.mitre.org/data/definitions/601.html' },
110
+ ],
111
+ owasp: [
112
+ { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
113
+ ],
114
+ 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
+ },
116
+ [VulnerabilityCode.REDIRECT_JS_NAVIGATION]: {
117
+ id: 51,
118
+ code: VulnerabilityCode.REDIRECT_JS_NAVIGATION,
119
+ title: 'Open Redirect - JavaScript Navigation',
120
+ 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
+ severity: 'medium',
122
+ category: 'business_logic',
123
+ scanner: 'redirect-route',
124
+ cvss: {
125
+ score: 5.3,
126
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N',
127
+ severity: 'MEDIUM',
128
+ },
129
+ cwe: [
130
+ { id: 'CWE-601', name: 'URL Redirection', url: 'https://cwe.mitre.org/data/definitions/601.html' },
131
+ ],
132
+ owasp: [
133
+ { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
134
+ ],
135
+ remediation: 'Validate redirect URLs on both client and server side. Use allowlist of permitted domains. Never pass raw URL parameters to navigation functions without validation.',
136
+ },
137
+ // ========================================
138
+ // HOST HEADER INJECTION
139
+ // ========================================
140
+ [VulnerabilityCode.HOST_CACHE_POISONING]: {
141
+ id: 52,
142
+ code: VulnerabilityCode.HOST_CACHE_POISONING,
143
+ title: 'Host Header Injection - Cache Poisoning',
144
+ 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
+ severity: 'high',
146
+ category: 'configuration',
147
+ scanner: 'host-header',
148
+ cvss: {
149
+ score: 6.5,
150
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N',
151
+ severity: 'MEDIUM',
152
+ },
153
+ cwe: [
154
+ { id: 'CWE-644', name: 'Improper Neutralization of HTTP Headers', url: 'https://cwe.mitre.org/data/definitions/644.html' },
155
+ ],
156
+ owasp: [
157
+ { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
158
+ ],
159
+ 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
+ },
161
+ [VulnerabilityCode.HOST_PASSWORD_RESET]: {
162
+ id: 53,
163
+ code: VulnerabilityCode.HOST_PASSWORD_RESET,
164
+ title: 'Host Header Injection - Password Reset Poisoning',
165
+ 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
+ severity: 'high',
167
+ category: 'configuration',
168
+ scanner: 'host-header',
169
+ cvss: {
170
+ score: 7.5,
171
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N',
172
+ severity: 'HIGH',
173
+ },
174
+ cwe: [
175
+ { id: 'CWE-644', name: 'Improper Neutralization of HTTP Headers', url: 'https://cwe.mitre.org/data/definitions/644.html' },
176
+ ],
177
+ owasp: [
178
+ { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
179
+ ],
180
+ remediation: 'Use hardcoded canonical domain for generated URLs. Never trust Host header for security-sensitive functionality. Validate Host header against configured allowed hosts.',
181
+ },
182
+ [VulnerabilityCode.SSRF_FILTER_BYPASS]: {
183
+ id: 54,
184
+ code: VulnerabilityCode.SSRF_FILTER_BYPASS,
185
+ title: 'Server-Side Request Forgery - Filter Bypass',
186
+ 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
+ severity: 'high',
188
+ category: 'ssrf',
189
+ scanner: 'ssrf',
190
+ cvss: {
191
+ score: 7.5,
192
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N',
193
+ severity: 'HIGH',
194
+ },
195
+ cwe: [
196
+ { id: 'CWE-918', name: 'SSRF', url: 'https://cwe.mitre.org/data/definitions/918.html' },
197
+ ],
198
+ owasp: [
199
+ { id: 'A10:2021', name: 'SSRF', url: 'https://owasp.org/Top10/A10_2021-Server-Side_Request_Forgery_%28SSRF%29/' },
200
+ ],
201
+ 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
+ },
203
+ [VulnerabilityCode.REDIRECT_META_REFRESH]: {
204
+ id: 55,
205
+ code: VulnerabilityCode.REDIRECT_META_REFRESH,
206
+ title: 'Open Redirect - Meta Refresh',
207
+ 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
+ severity: 'low',
209
+ category: 'business_logic',
210
+ scanner: 'redirect-route',
211
+ cvss: {
212
+ score: 4.3,
213
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N',
214
+ severity: 'MEDIUM',
215
+ },
216
+ cwe: [
217
+ { id: 'CWE-601', name: 'URL Redirection', url: 'https://cwe.mitre.org/data/definitions/601.html' },
218
+ ],
219
+ owasp: [
220
+ { id: 'A01:2021', name: 'Broken Access Control', url: 'https://owasp.org/Top10/A01_2021-Broken_Access_Control/' },
221
+ ],
222
+ 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
+ },
224
+ [VulnerabilityCode.HOST_REDIRECT]: {
225
+ id: 56,
226
+ code: VulnerabilityCode.HOST_REDIRECT,
227
+ title: 'Host Header Injection - Open Redirect',
228
+ 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
+ severity: 'medium',
230
+ category: 'configuration',
231
+ scanner: 'host-header',
232
+ cvss: {
233
+ score: 5.3,
234
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N',
235
+ severity: 'MEDIUM',
236
+ },
237
+ cwe: [
238
+ { id: 'CWE-644', name: 'Improper Neutralization of HTTP Headers', url: 'https://cwe.mitre.org/data/definitions/644.html' },
239
+ { id: 'CWE-601', name: 'URL Redirection', url: 'https://cwe.mitre.org/data/definitions/601.html' },
240
+ ],
241
+ owasp: [
242
+ { id: 'A05:2021', name: 'Security Misconfiguration', url: 'https://owasp.org/Top10/A05_2021-Security_Misconfiguration/' },
243
+ ],
244
+ remediation: 'Configure web server to validate Host header. Use hardcoded domain for redirect URLs. Implement allowlist for accepted Host header values.',
245
+ },
246
+ };
247
+ export default SSRF_VULNERABILITIES;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vulnerability Registry - XSS Vulnerabilities
3
+ *
4
+ * Definitions for all Cross-Site Scripting vulnerability types
5
+ */
6
+ import type { VulnerabilityDefinition } from '../types.js';
7
+ export declare const XSS_VULNERABILITIES: Record<string, VulnerabilityDefinition>;
@@ -0,0 +1,325 @@
1
+ /**
2
+ * Vulnerability Registry - XSS Vulnerabilities
3
+ *
4
+ * Definitions for all Cross-Site Scripting vulnerability types
5
+ */
6
+ import { VulnerabilityCode } from '../error-codes.js';
7
+ export const XSS_VULNERABILITIES = {
8
+ [VulnerabilityCode.XSS_REFLECTED]: {
9
+ id: 31,
10
+ code: VulnerabilityCode.XSS_REFLECTED,
11
+ title: 'Cross-Site Scripting - Reflected',
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
+ severity: 'medium',
14
+ category: 'xss',
15
+ scanner: 'xss',
16
+ cvss: {
17
+ score: 6.1,
18
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N',
19
+ severity: 'MEDIUM',
20
+ },
21
+ cwe: [
22
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
23
+ ],
24
+ owasp: [
25
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
26
+ ],
27
+ 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
+ [VulnerabilityCode.XSS_STORED]: {
30
+ id: 32,
31
+ code: VulnerabilityCode.XSS_STORED,
32
+ title: 'Cross-Site Scripting - Stored',
33
+ 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
+ severity: 'high',
35
+ category: 'xss',
36
+ scanner: 'xss',
37
+ cvss: {
38
+ score: 8.1,
39
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
40
+ severity: 'HIGH',
41
+ },
42
+ cwe: [
43
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
44
+ ],
45
+ owasp: [
46
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
47
+ ],
48
+ 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
+ },
50
+ [VulnerabilityCode.XSS_DOM_BASED]: {
51
+ id: 33,
52
+ code: VulnerabilityCode.XSS_DOM_BASED,
53
+ title: 'Cross-Site Scripting - DOM Based',
54
+ 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
+ severity: 'medium',
56
+ category: 'xss',
57
+ scanner: 'xss',
58
+ cvss: {
59
+ score: 6.1,
60
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N',
61
+ severity: 'MEDIUM',
62
+ },
63
+ cwe: [
64
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
65
+ ],
66
+ owasp: [
67
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
68
+ ],
69
+ 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
+ },
71
+ [VulnerabilityCode.XSS_SVG_INJECTION]: {
72
+ id: 34,
73
+ code: VulnerabilityCode.XSS_SVG_INJECTION,
74
+ title: 'Cross-Site Scripting - SVG Injection',
75
+ 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
+ severity: 'high',
77
+ category: 'xss',
78
+ scanner: 'xss',
79
+ cvss: {
80
+ score: 7.1,
81
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N',
82
+ severity: 'HIGH',
83
+ },
84
+ cwe: [
85
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
86
+ ],
87
+ owasp: [
88
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
89
+ ],
90
+ 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
+ },
92
+ [VulnerabilityCode.XSS_CSTI_ANGULAR]: {
93
+ id: 35,
94
+ code: VulnerabilityCode.XSS_CSTI_ANGULAR,
95
+ title: 'Cross-Site Scripting - Angular Template Injection',
96
+ 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
+ severity: 'high',
98
+ category: 'xss',
99
+ scanner: 'xss',
100
+ cvss: {
101
+ score: 7.5,
102
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
103
+ severity: 'HIGH',
104
+ },
105
+ cwe: [
106
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
107
+ { id: 'CWE-94', name: 'Code Injection', url: 'https://cwe.mitre.org/data/definitions/94.html' },
108
+ ],
109
+ owasp: [
110
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
111
+ ],
112
+ 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
+ },
114
+ [VulnerabilityCode.XSS_CSP_BYPASS]: {
115
+ id: 36,
116
+ code: VulnerabilityCode.XSS_CSP_BYPASS,
117
+ title: 'Cross-Site Scripting - CSP Bypass',
118
+ 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
+ severity: 'high',
120
+ category: 'xss',
121
+ scanner: 'xss',
122
+ cvss: {
123
+ score: 7.5,
124
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
125
+ severity: 'HIGH',
126
+ },
127
+ cwe: [
128
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
129
+ ],
130
+ owasp: [
131
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
132
+ ],
133
+ 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
+ },
135
+ [VulnerabilityCode.XSS_JS_CONTEXT]: {
136
+ id: 37,
137
+ code: VulnerabilityCode.XSS_JS_CONTEXT,
138
+ title: 'Cross-Site Scripting - JavaScript Context',
139
+ 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
+ severity: 'high',
141
+ category: 'xss',
142
+ scanner: 'xss',
143
+ cvss: {
144
+ score: 7.5,
145
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
146
+ severity: 'HIGH',
147
+ },
148
+ cwe: [
149
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
150
+ ],
151
+ owasp: [
152
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
153
+ ],
154
+ 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
+ },
156
+ [VulnerabilityCode.XSS_EVENT_HANDLER]: {
157
+ id: 38,
158
+ code: VulnerabilityCode.XSS_EVENT_HANDLER,
159
+ title: 'Cross-Site Scripting - Event Handler Injection',
160
+ 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
+ severity: 'high',
162
+ category: 'xss',
163
+ scanner: 'xss',
164
+ cvss: {
165
+ score: 7.1,
166
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N',
167
+ severity: 'HIGH',
168
+ },
169
+ cwe: [
170
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
171
+ ],
172
+ owasp: [
173
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
174
+ ],
175
+ 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
+ },
177
+ [VulnerabilityCode.XSS_SCRIPT_INJECTION]: {
178
+ id: 39,
179
+ code: VulnerabilityCode.XSS_SCRIPT_INJECTION,
180
+ title: 'Cross-Site Scripting - Script Tag Injection',
181
+ 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
+ severity: 'high',
183
+ category: 'xss',
184
+ scanner: 'xss',
185
+ cvss: {
186
+ score: 7.5,
187
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
188
+ severity: 'HIGH',
189
+ },
190
+ cwe: [
191
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
192
+ ],
193
+ owasp: [
194
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
195
+ ],
196
+ 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
+ },
198
+ [VulnerabilityCode.XSS_HTML_INJECTION]: {
199
+ id: 40,
200
+ code: VulnerabilityCode.XSS_HTML_INJECTION,
201
+ title: 'Cross-Site Scripting - HTML Injection',
202
+ 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
+ severity: 'medium',
204
+ category: 'xss',
205
+ scanner: 'xss',
206
+ cvss: {
207
+ score: 6.1,
208
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N',
209
+ severity: 'MEDIUM',
210
+ },
211
+ cwe: [
212
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
213
+ ],
214
+ owasp: [
215
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
216
+ ],
217
+ 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
+ },
219
+ [VulnerabilityCode.XSS_ATTRIBUTE_INJECTION]: {
220
+ id: 41,
221
+ code: VulnerabilityCode.XSS_ATTRIBUTE_INJECTION,
222
+ title: 'Cross-Site Scripting - Attribute Injection',
223
+ 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
+ severity: 'medium',
225
+ category: 'xss',
226
+ scanner: 'xss',
227
+ cvss: {
228
+ score: 6.1,
229
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N',
230
+ severity: 'MEDIUM',
231
+ },
232
+ cwe: [
233
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
234
+ ],
235
+ owasp: [
236
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
237
+ ],
238
+ 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
+ },
240
+ [VulnerabilityCode.XSS_CSS_INJECTION]: {
241
+ id: 42,
242
+ code: VulnerabilityCode.XSS_CSS_INJECTION,
243
+ title: 'Cross-Site Scripting - CSS Injection',
244
+ 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
+ severity: 'medium',
246
+ category: 'xss',
247
+ scanner: 'xss',
248
+ cvss: {
249
+ score: 5.3,
250
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N',
251
+ severity: 'MEDIUM',
252
+ },
253
+ cwe: [
254
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
255
+ ],
256
+ owasp: [
257
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
258
+ ],
259
+ remediation: 'Sanitize CSS input to remove url() functions and expression() directives. Use CSS-specific encoding. Implement Content Security Policy with style-src restrictions.',
260
+ },
261
+ [VulnerabilityCode.XSS_TEMPLATE_LITERAL]: {
262
+ id: 43,
263
+ code: VulnerabilityCode.XSS_TEMPLATE_LITERAL,
264
+ title: 'Cross-Site Scripting - Template Literal Injection',
265
+ 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
+ severity: 'high',
267
+ category: 'xss',
268
+ scanner: 'xss',
269
+ cvss: {
270
+ score: 7.1,
271
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N',
272
+ severity: 'HIGH',
273
+ },
274
+ cwe: [
275
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
276
+ ],
277
+ owasp: [
278
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
279
+ ],
280
+ 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
+ },
282
+ [VulnerabilityCode.XSS_MUTATION_BASED]: {
283
+ id: 44,
284
+ code: VulnerabilityCode.XSS_MUTATION_BASED,
285
+ title: 'Cross-Site Scripting - Mutation XSS',
286
+ 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
+ severity: 'high',
288
+ category: 'xss',
289
+ scanner: 'xss',
290
+ cvss: {
291
+ score: 7.1,
292
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N',
293
+ severity: 'HIGH',
294
+ },
295
+ cwe: [
296
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
297
+ ],
298
+ owasp: [
299
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
300
+ ],
301
+ remediation: 'Use DOMPurify or similar mXSS-aware sanitizers. Avoid innerHTML with user content. Implement Trusted Types. Stay updated on browser parsing behavior changes.',
302
+ },
303
+ [VulnerabilityCode.XSS_CSTI_VUE]: {
304
+ id: 45,
305
+ code: VulnerabilityCode.XSS_CSTI_VUE,
306
+ title: 'Cross-Site Scripting - Vue.js Template Injection',
307
+ 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
+ severity: 'high',
309
+ category: 'xss',
310
+ scanner: 'xss',
311
+ cvss: {
312
+ score: 7.5,
313
+ vector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N',
314
+ severity: 'HIGH',
315
+ },
316
+ cwe: [
317
+ { id: 'CWE-79', name: 'Cross-Site Scripting', url: 'https://cwe.mitre.org/data/definitions/79.html' },
318
+ { id: 'CWE-94', name: 'Code Injection', url: 'https://cwe.mitre.org/data/definitions/94.html' },
319
+ ],
320
+ owasp: [
321
+ { id: 'A03:2021', name: 'Injection', url: 'https://owasp.org/Top10/A03_2021-Injection/' },
322
+ ],
323
+ remediation: 'Use v-text instead of v-html for user content. Never compile user input as Vue templates. Use vue-runtime-only build that does not include template compiler. Sanitize mustache syntax.',
324
+ },
325
+ };