code
stringlengths
14
2.05k
label
int64
0
1
programming_language
stringclasses
7 values
cwe_id
stringlengths
6
14
cwe_name
stringlengths
5
98
description
stringlengths
36
379
url
stringlengths
36
48
label_name
stringclasses
2 values
const levenshteinDistance = (str1, str2, caseSensitive = false) => { str1 = String(str1) str2 = String(str2) if (!caseSensitive) { str1 = str1.toLowerCase() str2 = str2.toLowerCase() } const track = Array(str2.length + 1).fill(null).map(() => Array(str1.length + 1).fill(null)); for (let i = 0; i <= str1.length; i += 1) { track[0][i] = i; } for (let j = 0; j <= str2.length; j += 1) { track[j][0] = j; } for (let j = 1; j <= str2.length; j += 1) { for (let i = 1; i <= str1.length; i += 1) { const indicator = str1[i - 1] === str2[j - 1] ? 0 : 1; track[j][i] = Math.min( track[j][i - 1] + 1, // deletion track[j - 1][i] + 1, // insertion track[j - 1][i - 1] + indicator, // substitution ); } } return track[str2.length][str1.length]; }
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
module.exports.getPodcastFeed = (feedUrl, excludeEpisodeMetadata = false) => { Logger.debug(`[podcastUtils] getPodcastFeed for "${feedUrl}"`) return axios.get(feedUrl, { timeout: 12000, responseType: 'arraybuffer', headers: { Accept: 'application/rss+xml' } }).then(async (data) => { // Adding support for ios-8859-1 encoded RSS feeds. // See: https://github.com/advplyr/audiobookshelf/issues/1489 const contentType = data.headers?.['content-type'] || '' // e.g. text/xml; charset=iso-8859-1 if (contentType.toLowerCase().includes('iso-8859-1')) { data.data = data.data.toString('latin1') } else { data.data = data.data.toString() } if (!data?.data) { Logger.error(`[podcastUtils] getPodcastFeed: Invalid podcast feed request response (${feedUrl})`) return false } Logger.debug(`[podcastUtils] getPodcastFeed for "${feedUrl}" success - parsing xml`) const payload = await this.parsePodcastRssFeedXml(data.data, excludeEpisodeMetadata) if (!payload) { return false } // RSS feed may be a private RSS feed payload.podcast.metadata.feedUrl = feedUrl return payload.podcast }).catch((error) => { Logger.error('[podcastUtils] getPodcastFeed Error', error) return false }) }
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
w = (t) => ({ get: (e) => t("GET", `${i}`, { params: e }), list: (e) => t("GET", `${i}/list`, { params: e }), create: (e) => t("POST", `${i}`, { body: e }), update: (e) => t("PUT", `${i}`, { body: e }), delete: (e) => t("DELETE", `${i}`, { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
w = (t) => ({ get: (e) => t("GET", `${i}`, { params: e }), list: (e) => t("GET", `${i}/list`, { params: e }), create: (e) => t("POST", `${i}`, { body: e }), update: (e) => t("PUT", `${i}`, { body: e }), delete: (e) => t("DELETE", `${i}`, { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
w = (t) => ({ get: (e) => t("GET", `${i}`, { params: e }), list: (e) => t("GET", `${i}/list`, { params: e }), create: (e) => t("POST", `${i}`, { body: e }), update: (e) => t("PUT", `${i}`, { body: e }), delete: (e) => t("DELETE", `${i}`, { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
EventTarget.prototype.dispatchEvent = function(event) { event.target = this; var typeListeners = this._listeners[event.type]; if (typeListeners != void 0) { var length = typeListeners.length; for (var i2 = 0; i2 < length; i2 += 1) { var listener = typeListeners[i2]; try { if (typeof listener.handleEvent === "function") { listener.handleEvent(event); } else { listener.call(this, event); } } catch (e) { throwError(e); } } } };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
EventTarget.prototype.dispatchEvent = function(event) { event.target = this; var typeListeners = this._listeners[event.type]; if (typeListeners != void 0) { var length = typeListeners.length; for (var i2 = 0; i2 < length; i2 += 1) { var listener = typeListeners[i2]; try { if (typeof listener.handleEvent === "function") { listener.handleEvent(event); } else { listener.call(this, event); } } catch (e) { throwError(e); } } } };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
EventTarget.prototype.dispatchEvent = function(event) { event.target = this; var typeListeners = this._listeners[event.type]; if (typeListeners != void 0) { var length = typeListeners.length; for (var i2 = 0; i2 < length; i2 += 1) { var listener = typeListeners[i2]; try { if (typeof listener.handleEvent === "function") { listener.handleEvent(event); } else { listener.call(this, event); } } catch (e) { throwError(e); } } } };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers)
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers)
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers)
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
L = (t) => ({ get: () => t("GET", `${g}`), update: (e) => t("PUT", `${g}`, { body: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
L = (t) => ({ get: () => t("GET", `${g}`), update: (e) => t("PUT", `${g}`, { body: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
L = (t) => ({ get: () => t("GET", `${g}`), update: (e) => t("PUT", `${g}`, { body: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
}, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) {
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
}, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) {
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
}, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) {
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
}, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) }; };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
}, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) }; };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
}, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) }; };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
R = (t) => ({ get: (e) => t("GET", `${E}`, { params: e }), create: (e) => t("POST", `${E}`, { body: e }), update: (e) => t("PUT", `${E}`, { body: e }), delete: (e) => t("DELETE", `${E}`, { params: e }), list: (e) => t("GET", `${E}/list`, { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
R = (t) => ({ get: (e) => t("GET", `${E}`, { params: e }), create: (e) => t("POST", `${E}`, { body: e }), update: (e) => t("PUT", `${E}`, { body: e }), delete: (e) => t("DELETE", `${E}`, { params: e }), list: (e) => t("GET", `${E}/list`, { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
R = (t) => ({ get: (e) => t("GET", `${E}`, { params: e }), create: (e) => t("POST", `${E}`, { body: e }), update: (e) => t("PUT", `${E}`, { body: e }), delete: (e) => t("DELETE", `${E}`, { params: e }), list: (e) => t("GET", `${E}/list`, { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
function HeadersPolyfill(all) { var map = /* @__PURE__ */ Object.create(null); var array = all.split("\r\n"); for (var i2 = 0; i2 < array.length; i2 += 1) { var line = array[i2]; var parts = line.split(": "); var name = parts.shift(); var value = parts.join(": "); map[toLowerCase(name)] = value; } this._map = map; }
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
function HeadersPolyfill(all) { var map = /* @__PURE__ */ Object.create(null); var array = all.split("\r\n"); for (var i2 = 0; i2 < array.length; i2 += 1) { var line = array[i2]; var parts = line.split(": "); var name = parts.shift(); var value = parts.join(": "); map[toLowerCase(name)] = value; } this._map = map; }
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
function HeadersPolyfill(all) { var map = /* @__PURE__ */ Object.create(null); var array = all.split("\r\n"); for (var i2 = 0; i2 < array.length; i2 += 1) { var line = array[i2]; var parts = line.split(": "); var name = parts.shift(); var value = parts.join(": "); map[toLowerCase(name)] = value; } this._map = map; }
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); }); }, reconfigure: n };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); }); }, reconfigure: n };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => { const o = decodeURIComponent(r.data); a += o, s.onChunk?.(o, a); }); }, reconfigure: n };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
EventTarget.prototype.removeEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners != void 0) { var filtered = []; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] !== listener) { filtered.push(typeListeners[i2]); } } if (filtered.length === 0) { delete listeners[type]; } else { listeners[type] = filtered; } } };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
EventTarget.prototype.removeEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners != void 0) { var filtered = []; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] !== listener) { filtered.push(typeListeners[i2]); } } if (filtered.length === 0) { delete listeners[type]; } else { listeners[type] = filtered; } } };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
EventTarget.prototype.removeEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners != void 0) { var filtered = []; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] !== listener) { filtered.push(typeListeners[i2]); } } if (filtered.length === 0) { delete listeners[type]; } else { listeners[type] = filtered; } } };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
v = (t) => ({ listMembers: (e) => t("GET", "/workspace-memberships/list-members", { params: e }), listWorkspaces: (e) => t("GET", "/workspace-memberships/list-workspaces", { params: e }), create: (e) => t("POST", "/workspace-memberships", { body: e }), update: (e) => t("PUT", "/workspace-memberships", { body: e }), delete: (e) => t("DELETE", "/workspace-memberships", { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
v = (t) => ({ listMembers: (e) => t("GET", "/workspace-memberships/list-members", { params: e }), listWorkspaces: (e) => t("GET", "/workspace-memberships/list-workspaces", { params: e }), create: (e) => t("POST", "/workspace-memberships", { body: e }), update: (e) => t("PUT", "/workspace-memberships", { body: e }), delete: (e) => t("DELETE", "/workspace-memberships", { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
v = (t) => ({ listMembers: (e) => t("GET", "/workspace-memberships/list-members", { params: e }), listWorkspaces: (e) => t("GET", "/workspace-memberships/list-workspaces", { params: e }), create: (e) => t("POST", "/workspace-memberships", { body: e }), update: (e) => t("PUT", "/workspace-memberships", { body: e }), delete: (e) => t("DELETE", "/workspace-memberships", { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
A = (t) => ({ create: (e) => t("POST", `${l}`, { body: e }), update: (e) => t("PUT", `${l}`, { body: e }), delete: (e) => t("DELETE", `${l}`, { params: e }), list: () => t("GET", `${l}/list`) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
A = (t) => ({ create: (e) => t("POST", `${l}`, { body: e }), update: (e) => t("PUT", `${l}`, { body: e }), delete: (e) => t("DELETE", `${l}`, { params: e }), list: () => t("GET", `${l}/list`) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
A = (t) => ({ create: (e) => t("POST", `${l}`, { body: e }), update: (e) => t("PUT", `${l}`, { body: e }), delete: (e) => t("DELETE", `${l}`, { params: e }), list: () => t("GET", `${l}/list`) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
j = (t) => ({ get: () => t("GET", `${h}`), update: (e) => t("PUT", `${h}`, { body: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
j = (t) => ({ get: () => t("GET", `${h}`), update: (e) => t("PUT", `${h}`, { body: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
j = (t) => ({ get: () => t("GET", `${h}`), update: (e) => t("PUT", `${h}`, { body: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
q = (t) => ({ get: () => t("GET", `${k}`), updateContentPieceData: (e) => t("POST", `${k}/content-piece-data`, { body: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
q = (t) => ({ get: () => t("GET", `${k}`), updateContentPieceData: (e) => t("POST", `${k}/content-piece-data`, { body: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
q = (t) => ({ get: () => t("GET", `${k}`), updateContentPieceData: (e) => t("POST", `${k}/content-piece-data`, { body: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
module.exports = function(e, n) { return n = n || {}, new Promise(function(t, r) { var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); }); }; }
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
module.exports = function(e, n) { return n = n || {}, new Promise(function(t, r) { var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); }); }; }
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
module.exports = function(e, n) { return n = n || {}, new Promise(function(t, r) { var s = new XMLHttpRequest(), o = [], u2 = [], i2 = {}, a = function() { return { ok: 2 == (s.status / 100 | 0), statusText: s.statusText, status: s.status, url: s.responseURL, text: function() { return Promise.resolve(s.responseText); }, json: function() { return Promise.resolve(s.responseText).then(JSON.parse); }, blob: function() { return Promise.resolve(new Blob([s.response])); }, clone: a, headers: { keys: function() { return o; }, entries: function() { return u2; }, get: function(e2) { return i2[e2.toLowerCase()]; }, has: function(e2) { return e2.toLowerCase() in i2; } } }; }; for (var l2 in s.open(n.method || "get", e, true), s.onload = function() { s.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(e2, n2, t2) { o.push(n2 = n2.toLowerCase()), u2.push([n2, t2]), i2[n2] = i2[n2] ? i2[n2] + "," + t2 : t2; }), t(a()); }, s.onerror = r, s.withCredentials = "include" == n.credentials, n.headers) s.setRequestHeader(l2, n.headers[l2]); s.send(n.body || null); }); }; }
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
}, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => {
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
}, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => {
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
}, async ask(s) { let a = ""; const p = new import_eventsource.default(`${c().baseURL}/search/ask?query=${encodeURIComponent(s.query)}`, { headers: { Authorization: `Bearer ${c().token}` } }); p.addEventListener("error", (r) => { const o = r; return o.message ? s.onError?.(o.message) : (p.close(), s.onEnd?.(a)); }), p.addEventListener("message", (r) => {
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
x = (t) => ({ get: () => t("GET", `${C}`) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
x = (t) => ({ get: () => t("GET", `${C}`) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
x = (t) => ({ get: () => t("GET", `${C}`) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
I = (t) => ({ get: (e) => t("GET", `${m}`, { params: e }), create: (e) => t("POST", `${m}`, { body: e }), update: (e) => t("PUT", `${m}`, { body: e }), delete: (e) => t("DELETE", `${m}`, { params: e }), list: (e) => t("GET", `${m}/list`, { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
I = (t) => ({ get: (e) => t("GET", `${m}`, { params: e }), create: (e) => t("POST", `${m}`, { body: e }), update: (e) => t("PUT", `${m}`, { body: e }), delete: (e) => t("DELETE", `${m}`, { params: e }), list: (e) => t("GET", `${m}/list`, { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
I = (t) => ({ get: (e) => t("GET", `${m}`, { params: e }), create: (e) => t("POST", `${m}`, { body: e }), update: (e) => t("PUT", `${m}`, { body: e }), delete: (e) => t("DELETE", `${m}`, { params: e }), list: (e) => t("GET", `${m}/list`, { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
O = (t) => ({ get: () => t("GET", `${D}`) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
O = (t) => ({ get: () => t("GET", `${D}`) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
O = (t) => ({ get: () => t("GET", `${D}`) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) {
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) {
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
return { contentGroups: w(e), contentPieces: U(e), tags: S(e), profile: O(e), userSettings: L(e), webhooks: R(e), workspace: x(e), roles: I(e), workspaceSettings: j(e), workspaceMemberships: v(e), extension: q(e), variants: A(e), transformers: z(e), search(s) { return e("GET", "/search", { params: s }); }, async ask(s) {
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
createClient: () => B });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
createClient: () => B });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
createClient: () => B });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
U = (t) => ({ get: (e) => t("GET", `${$}`, { params: e }), create: (e) => t("POST", `${$}`, { body: e }), update: (e) => t("PUT", `${$}`, { body: e }), delete: (e) => t("DELETE", `${$}`, { params: e }), list: (e) => t("GET", `${$}/list`, { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
U = (t) => ({ get: (e) => t("GET", `${$}`, { params: e }), create: (e) => t("POST", `${$}`, { body: e }), update: (e) => t("PUT", `${$}`, { body: e }), delete: (e) => t("DELETE", `${$}`, { params: e }), list: (e) => t("GET", `${$}/list`, { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
U = (t) => ({ get: (e) => t("GET", `${$}`, { params: e }), create: (e) => t("POST", `${$}`, { body: e }), update: (e) => t("PUT", `${$}`, { body: e }), delete: (e) => t("DELETE", `${$}`, { params: e }), list: (e) => t("GET", `${$}/list`, { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
EventTarget.prototype.addEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners == void 0) { typeListeners = []; listeners[type] = typeListeners; } var found = false; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] === listener) { found = true; } } if (!found) { typeListeners.push(listener); } };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
EventTarget.prototype.addEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners == void 0) { typeListeners = []; listeners[type] = typeListeners; } var found = false; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] === listener) { found = true; } } if (!found) { typeListeners.push(listener); } };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
EventTarget.prototype.addEventListener = function(type, listener) { type = String(type); var listeners = this._listeners; var typeListeners = listeners[type]; if (typeListeners == void 0) { typeListeners = []; listeners[type] = typeListeners; } var found = false; for (var i2 = 0; i2 < typeListeners.length; i2 += 1) { if (typeListeners[i2] === listener) { found = true; } } if (!found) { typeListeners.push(listener); } };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
z = (t) => ({ create: (e) => t("POST", `${u}`, { body: e }), delete: (e) => t("DELETE", `${u}`, { params: e }), list: () => t("GET", `${u}/list`) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
z = (t) => ({ create: (e) => t("POST", `${u}`, { body: e }), delete: (e) => t("DELETE", `${u}`, { params: e }), list: () => t("GET", `${u}/list`) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
z = (t) => ({ create: (e) => t("POST", `${u}`, { body: e }), delete: (e) => t("DELETE", `${u}`, { params: e }), list: () => t("GET", `${u}/list`) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
}, has: function(e2) { return e2.toLowerCase() in i2; } } };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
}, has: function(e2) { return e2.toLowerCase() in i2; } } };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
}, has: function(e2) { return e2.toLowerCase() in i2; } } };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
const { default: o } = await Promise.resolve().then(() => __toESM(require_browser2(), 1)), y = await o(`${e}${p}/?${encodeURI(Object.entries(r?.params || {}).filter(([, b]) => b).map(([b, G]) => `${b}=${G}`).join("&"))}`, { headers: { Authorization: `Bearer ${s}`, Accept: "application/json", ...r?.body ? { "Content-Type": "application/json" } : {}, ...n ? { "X-Vrite-Extension-ID": n } : {}, ...c }, body: r?.body ? JSON.stringify(r.body) : null, method: a }); let T = null; try { if (T = await y.json(), !T) return; } catch { return; } if (!y.ok) throw T; return T; } catch (o) { throw console.error(o), o; } }, reconfigure: (a) => {
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
const { default: o } = await Promise.resolve().then(() => __toESM(require_browser2(), 1)), y = await o(`${e}${p}/?${encodeURI(Object.entries(r?.params || {}).filter(([, b]) => b).map(([b, G]) => `${b}=${G}`).join("&"))}`, { headers: { Authorization: `Bearer ${s}`, Accept: "application/json", ...r?.body ? { "Content-Type": "application/json" } : {}, ...n ? { "X-Vrite-Extension-ID": n } : {}, ...c }, body: r?.body ? JSON.stringify(r.body) : null, method: a }); let T = null; try { if (T = await y.json(), !T) return; } catch { return; } if (!y.ok) throw T; return T; } catch (o) { throw console.error(o), o; } }, reconfigure: (a) => {
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
const { default: o } = await Promise.resolve().then(() => __toESM(require_browser2(), 1)), y = await o(`${e}${p}/?${encodeURI(Object.entries(r?.params || {}).filter(([, b]) => b).map(([b, G]) => `${b}=${G}`).join("&"))}`, { headers: { Authorization: `Bearer ${s}`, Accept: "application/json", ...r?.body ? { "Content-Type": "application/json" } : {}, ...n ? { "X-Vrite-Extension-ID": n } : {}, ...c }, body: r?.body ? JSON.stringify(r.body) : null, method: a }); let T = null; try { if (T = await y.json(), !T) return; } catch { return; } if (!y.ok) throw T; return T; } catch (o) { throw console.error(o), o; } }, reconfigure: (a) => {
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
S = (t) => ({ get: (e) => t("GET", `${d}`, { params: e }), update: (e) => t("PUT", `${d}`, { body: e }), create: (e) => t("PUT", `${d}`, { body: e }), delete: (e) => t("DELETE", `${d}`, { params: e }), list: (e) => t("GET", `${d}/list`, { params: e }) });
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
S = (t) => ({ get: (e) => t("GET", `${d}`, { params: e }), update: (e) => t("PUT", `${d}`, { body: e }), create: (e) => t("PUT", `${d}`, { body: e }), delete: (e) => t("DELETE", `${d}`, { params: e }), list: (e) => t("GET", `${d}/list`, { params: e }) });
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
S = (t) => ({ get: (e) => t("GET", `${d}`, { params: e }), update: (e) => t("PUT", `${d}`, { body: e }), create: (e) => t("PUT", `${d}`, { body: e }), delete: (e) => t("DELETE", `${d}`, { params: e }), list: (e) => t("GET", `${d}/list`, { params: e }) });
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
}, reconfigure: (a) => { e = a.baseURL || e, s = a.token || s, n = a.extensionId || n, c = a.headers || c; }, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) };
0
JavaScript
CWE-20
Improper Input Validation
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
https://cwe.mitre.org/data/definitions/20.html
vulnerable
}, reconfigure: (a) => { e = a.baseURL || e, s = a.token || s, n = a.extensionId || n, c = a.headers || c; }, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) };
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
}, reconfigure: (a) => { e = a.baseURL || e, s = a.token || s, n = a.extensionId || n, c = a.headers || c; }, getConfig: () => ({ baseURL: e, token: s, extensionId: n, headers: c }) };
0
JavaScript
CWE-770
Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
https://cwe.mitre.org/data/definitions/770.html
vulnerable
rename(id = null) { var _this = this; var settings = { title: 'Rename', params: [ {name: "name", title: "Name:", value: config.layer.name}, ], on_load: function () { document.querySelector('#pop_data_name').select(); }, on_finish: function (params) { app.State.do_action( new app.Actions.Bundle_action('rename_layer', 'Rename Layer', [ new app.Actions.Refresh_layers_gui_action('undo'), new app.Actions.Update_layer_action(id || config.layer.id, { name: params.name }), new app.Actions.Refresh_layers_gui_action('do') ]) ); }, }; this.POP.show(settings); }
0
JavaScript
CWE-79
Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
https://cwe.mitre.org/data/definitions/79.html
vulnerable
var openInline = function(editor){ status = !status; var $main = $(editor.editorContainer); var form = editor.formCode; if(!form){ var $to = $main.find('.tox-sidebar-wrap'); var data = { formStyle:{"className":"form-box-title-block toc-form-code-editor"}, code:{type:'codeEditor'} }; $('<div class="toc-editor-source hidden"></div>').appendTo($to); form = new kodApi.formMaker({formData:data}); form.renderTarget($main.find('.toc-editor-source')); $main.find('.form-target-save').hide(); form.bind('onSave',function(data){ setContent(editor,data.code); }); editor.formCode = form; } var $area = $main.find('.toc-editor-source'); var $btn = $main.find('.tox-tbtn.toolbar-codeView'); if(status){ $btn.addClass('tox-tbtn--enabled'); $area.removeClass('hidden'); $main.find('.tox-tbtn,.tox-mbtn,.tox-split-button').not($btn).addClass('tox-btn-disable'); }else{ $btn.removeClass('tox-tbtn--enabled'); $area.addClass('hidden'); $main.find('.tox-tbtn,.tox-mbtn,.tox-split-button').removeClass('tox-btn-disable'); } var html = editor.getContent({source_view:true}); if(status){ form.setValue('code',html); var aceEditor = $main.find(".ace_editor").data('editor'); if(aceEditor){ // aceEditor.execCommand('phpBeautify'); } }else{ var theData = form.getValue(); if(theData.code){ setContent(editor,theData.code); } } editor.formCode = form; }
0
JavaScript
CWE-77
Improper Neutralization of Special Elements used in a Command ('Command Injection')
The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
https://cwe.mitre.org/data/definitions/77.html
vulnerable
var openInline = function(editor){ status = !status; var $main = $(editor.editorContainer); var form = editor.formCode; if(!form){ var $to = $main.find('.tox-sidebar-wrap'); var data = { formStyle:{"className":"form-box-title-block toc-form-code-editor"}, code:{type:'codeEditor'} }; $('<div class="toc-editor-source hidden"></div>').appendTo($to); form = new kodApi.formMaker({formData:data}); form.renderTarget($main.find('.toc-editor-source')); $main.find('.form-target-save').hide(); form.bind('onSave',function(data){ setContent(editor,data.code); }); editor.formCode = form; } var $area = $main.find('.toc-editor-source'); var $btn = $main.find('.tox-tbtn.toolbar-codeView'); if(status){ $btn.addClass('tox-tbtn--enabled'); $area.removeClass('hidden'); $main.find('.tox-tbtn,.tox-mbtn,.tox-split-button').not($btn).addClass('tox-btn-disable'); }else{ $btn.removeClass('tox-tbtn--enabled'); $area.addClass('hidden'); $main.find('.tox-tbtn,.tox-mbtn,.tox-split-button').removeClass('tox-btn-disable'); } var html = editor.getContent({source_view:true}); if(status){ form.setValue('code',html); var aceEditor = $main.find(".ace_editor").data('editor'); if(aceEditor){ // aceEditor.execCommand('phpBeautify'); } }else{ var theData = form.getValue(); if(theData.code){ setContent(editor,theData.code); } } editor.formCode = form; }
0
JavaScript
CWE-918
Server-Side Request Forgery (SSRF)
The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
https://cwe.mitre.org/data/definitions/918.html
vulnerable
handler: function (req, reply) { const file = req.params['*'] reply.sendFile(file) }
0
JavaScript
CWE-1188
Initialization of a Resource with an Insecure Default
The product initializes or sets a resource with a default that is intended to be changed by the administrator, but the default is not secure.
https://cwe.mitre.org/data/definitions/1188.html
vulnerable
root: opts.baseDir || path.join(__dirname, '..'), serve: false }) // Handler for external documentation files passed via $ref fastify.route({ url: '/*', method: 'GET', schema: { hide: true }, ...hooks, handler: function (req, reply) { const file = req.params['*'] reply.sendFile(file) } }) done() }
0
JavaScript
CWE-1188
Initialization of a Resource with an Insecure Default
The product initializes or sets a resource with a default that is intended to be changed by the administrator, but the default is not secure.
https://cwe.mitre.org/data/definitions/1188.html
vulnerable