code stringlengths 12 2.05k | label int64 0 1 | programming_language stringclasses 9
values | cwe_id stringlengths 6 14 | cwe_name stringlengths 5 103 ⌀ | description stringlengths 36 1.23k ⌀ | url stringlengths 36 48 ⌀ | label_name stringclasses 2
values |
|---|---|---|---|---|---|---|---|
function makeError(msg, level, fatal) {
const err = new Error(msg);
if (typeof level === 'boolean') {
fatal = level;
err.level = 'protocol';
} else {
err.level = level || 'protocol';
}
err.fatal = !!fatal;
return err;
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function foo() {
var_dump(substr_compare("\x00", "\x00\x00\x00\x00\x00\x00\x00\x00", 0, 65535, false));
} | 1 | TypeScript | CWE-787 | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/787.html | safe |
export function cleanObject(obj: any): any {
return Object.entries(obj).reduce((obj, [key, value]) => {
if (isProtectedKey(key)) {
return obj;
}
return value === undefined
? obj
: {
...obj,
[key]: value
};
}, {});
} | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
function has(target, path) {
"use strict";
try {
var test = reduce(target, path);
if (typeof test !== "undefined") {
return true;
}
return false;
} catch (ex) {
console.error(ex);
return;
}
} | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
constructor(url, options, db, saveTemplate) {
super(db, saveTemplate);
if (!saveTemplate) {
// enable backwards-compatibilty tweaks.
this.fromHackSession = true;
}
const parsedUrl = Url.parse(url);
this.host = parsedUrl.hostname;
if (this.fromHackSession) {
// HackSessionCo... | 0 | TypeScript | 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 |
getBinaryList: (list) => {
if (Buffer.isBuffer(list))
return list;
if (typeof list === 'string')
return (list.length === 0 ? EMPTY_BUFFER : Buffer.from(list));
if (Array.isArray(list))
return (list.length === 0 ? EMPTY_BUFFER : Buffer.from(list.join(',')));
throw new Error(`Invalid l... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
return (ret === false ? p : ret);
}
}
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
([ key, value ]) => ({ [key]: async () => (await spawn(value)).split('\n') }), | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
"input textarea.ip-blacklist"(evt) {
evt.preventDefault();
evt.stopPropagation();
const instance = Template.instance();
instance.ipBlacklist.set(evt.currentTarget.value);
}, | 1 | TypeScript | 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 | safe |
parseOpReturnToChunks(script: Buffer, allow_op_0=false, allow_op_number=false) {
// """Extract pushed bytes after opreturn. Returns list of bytes() objects,
// one per push.
let ops: PushDataOperation[];
// Strict refusal of non-push opcodes; bad scripts throw OpreturnError."""
... | 0 | TypeScript | 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 |
constructor(str, range, input, replaceDefaultBoolean) {
super();
Error.captureStackTrace(this, ERR_OUT_OF_RANGE);
assert(range, 'Missing "range" argument');
let msg = (replaceDefaultBoolean
? str
: `The value of "${str}" is out of range.`);
let received;
if (Numb... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
skipString: () => {
const len = self.readUInt32BE();
if (len === undefined)
return;
pos += len;
return (pos <= buffer.length ? len : undefined);
}, | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
response.responseHeader.serviceResult.should.eql(StatusCodes.BadDiscoveryUrlMissing);
}
await send_registered_server_request(discoveryServerEndpointUrl, request, check_response);
}); | 0 | TypeScript | CWE-770 | Allocation of Resources Without Limits or Throttling | The software 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 |
TEST_F(AsStringGraphTest, FillWithChar3) {
Status s = Init(DT_INT32, /*fill=*/"s");
ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
ASSERT_TRUE(
absl::StrContains(s.error_message(), "Fill argument not supported"));
} | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
constructor(mode) {
const windowBits = Z_DEFAULT_WINDOWBITS;
const level = Z_DEFAULT_COMPRESSION;
const memLevel = Z_DEFAULT_MEMLEVEL;
const strategy = Z_DEFAULT_STRATEGY;
const dictionary = undefined;
this._err = undefined;
this._writeState = new Uint32Array(2);
this._chunkSize = Z_D... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
redirect: `${url}/error?${new URLSearchParams({
error: error as string,
})}`,
}
}
try {
const redirect = await emailSignin(email, options)
return { redirect }
} catch (error) {
logger.error("SIGNIN_EMAIL_ERROR", {
error: error as Error,
prov... | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
node.addEventListener("mouseenter", () => {
const t = tooltip();
t.innerHTML = getter();
}); | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
TEST_F(NgramKernelTest, TestNoTokensNoPad) {
MakeOp("|", {3}, "", "", 0, false);
// Batch items are:
// 0:
// 1: "a"
AddInputFromArray<tstring>(TensorShape({1}), {"a"});
AddInputFromArray<int64>(TensorShape({3}), {0, 0, 1});
TF_ASSERT_OK(RunOpKernel());
std::vector<tstring> expected_values({});
std::... | 1 | TypeScript | CWE-787 | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/787.html | safe |
: new GenericCipherNative(config));
}
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
TEST_F(NgramKernelTest, TestNoTokensNoPad) {
MakeOp("|", {3}, "", "", 0, false);
// Batch items are:
// 0:
// 1: "a"
AddInputFromArray<tstring>(TensorShape({1}), {"a"});
AddInputFromArray<int64>(TensorShape({3}), {0, 0, 1});
TF_ASSERT_OK(RunOpKernel());
std::vector<tstring> expected_values({});
std::... | 1 | TypeScript | CWE-476 | NULL Pointer Dereference | A NULL pointer dereference occurs when the application dereferences a pointer that it expects to be valid, but is NULL, typically causing a crash or exit. | https://cwe.mitre.org/data/definitions/476.html | safe |
WebContents.prototype._sendToFrameInternal = function (frameId, channel, ...args) {
if (typeof channel !== 'string') {
throw new Error('Missing required channel argument');
} else if (typeof frameId !== 'number') {
throw new Error('Missing required frameId argument');
}
return this._sendToFrame(true /*... | 0 | TypeScript | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | vulnerable |
sign: (() => {
if (typeof sign_ === 'function') {
return function sign(data, algo) {
const pem = this[SYM_PRIV_PEM];
if (pem === null)
return new Error('No private key available');
if (!algo || typeof algo !== 'string')
algo = this[SYM_HASH_ALGO];
try {
... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
resolve({root: require('os').homedir()});
} else reject('Bad username or password');
}); | 0 | TypeScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of t... | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
export default function publishVote(pollId, pollAnswerId) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'RespondToPollReqMsg';
const { meetingId, requesterUserId } = extractCredentials(this.userId);
check(pollAnswerId, Number);
c... | 0 | TypeScript | NVD-CWE-noinfo | null | null | null | vulnerable |
callParserIfExistsQuery(parseNumberTypeQueryParams([['requiredNum', false, false], ['optionalNum', true, false], ['optionalNumArr', true, true], ['emptyNum', true, false], ['requiredNumArr', false, true]])),
callParserIfExistsQuery(parseBooleanTypeQueryParams([['bool', false, false], ['optionalBool', tr... | 0 | TypeScript | 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 |
hasSuccess() {
const instance = Template.instance();
return instance.formState.get().state === "success";
}, | 1 | TypeScript | 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 | safe |
stitchSchemas({ subschemas: [autoSchema] }),
});
parseGraphQLServer.applyGraphQL(expressApp);
await new Promise((resolve) =>
httpServer.listen({ port: 13377 }, resolve)
);
const httpLink = createUploadLink({
uri: 'http://localhost:13377/graphql',
... | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
function reset() {
ciphered = Buffer.alloc(0);
deciphered = [];
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
export declare function setDeepProperty(obj: any, propertyPath: string, value: any): void;
export declare function getDeepProperty(obj: any, propertyPath: string): any; | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
handler: (req, reply) => {
reply.send(req.url)
},
wsHandler: (conn, req) => {
conn.write(req.url)
conn.end()
}
})
t.teardown(() => backend.close())
const backendURL = await backend.listen(0)
const [frontend, frontendURL] = await proxyServer(t, backendUR... | 1 | TypeScript | 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 | safe |
constructor(url, options, db, saveTemplate) {
super(db, saveTemplate);
// TODO(soon): Support HTTP proxy.
const safe = ssrfSafeLookup(db, url);
if (!options) options = {};
if (!options.headers) options.headers = {};
options.headers.host = safe.host;
options.servername = safe.host.split("... | 1 | TypeScript | 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 | safe |
function PPK_Private(type, comment, privPEM, pubPEM, pubSSH, algo, decrypted) {
this.type = type;
this.comment = comment;
this[SYM_PRIV_PEM] = privPEM;
this[SYM_PUB_PEM] = pubPEM;
this[SYM_PUB_SSH] = pubSSH;
this[SYM_HASH_ALGO] = algo;
this[SYM_DECRYPTED] = decrypted;
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
export function ffprobe(file: string): Promise<IFfprobe> {
return new Promise<IFfprobe>((resolve, reject) => {
if (!file) throw new Error('no file provided')
stat(file, (err, stats) => {
if (err) return reject(new Error('wrong file provided'))
exec('ffprobe -v quiet -print_format json -show_form... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
TEST_F(NgramKernelTest, TestNoTokens) {
MakeOp("|", {3}, "L", "R", -1, false);
// Batch items are:
// 0:
// 1: "a"
AddInputFromArray<tstring>(TensorShape({1}), {"a"});
AddInputFromArray<int64>(TensorShape({3}), {0, 0, 1});
TF_ASSERT_OK(RunOpKernel());
std::vector<tstring> expected_values(
{"L|L|R... | 1 | TypeScript | CWE-787 | Out-of-bounds Write | The software writes data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/787.html | safe |
await manager.update(User, organizationUser.userId, { invitationToken: uuid.v4(), password: uuid.v4() });
}); | 0 | TypeScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | vulnerable |
invitationToken: uuid.v4(),
defaultOrganizationId: organizationId,
})
);
}
user = existingUser;
}
for (const group of groups) {
const orgGroupPermission = await manager.findOne(GroupPermission, {
where: {
organi... | 0 | TypeScript | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
): Promise<void> => {
event.preventDefault();
if (SingleSignOn.isSingleSignOnLoginWindow(frameName)) {
return new SingleSignOn(main, event, url, options).init();
}
this.logger.log('Opening an external window from a webview.');
return WindowUtil.openExternal(url);
}; | 1 | TypeScript | 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 | safe |
export async function execRequest(routes: Routers, ctx: AppContext) {
const match = findMatchingRoute(ctx.path, routes);
if (!match) throw new ErrorNotFound();
const endPoint = match.route.findEndPoint(ctx.request.method as HttpMethod, match.subPath.schema);
if (ctx.URL && !isValidOrigin(ctx.URL.origin, baseUrl(en... | 1 | TypeScript | CWE-352 | Cross-Site Request Forgery (CSRF) | The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. | https://cwe.mitre.org/data/definitions/352.html | safe |
function validateBaseUrl(url: string) {
// from this MIT-licensed gist: https://gist.github.com/dperini/729294
return /^(?:(?:(?:https?|ftp):)?\/\/)(?:(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]... | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
async function f(v) {
if (v == 3) {
return;
}
stages.push(`f>${v}`);
await "X";
f(v + 1);
stages.push(`f<${v}`);
} | 0 | TypeScript | CWE-416 | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. | https://cwe.mitre.org/data/definitions/416.html | vulnerable |
function reject(req, res, message) {
log.info(`${req.method} ${req.path} rejected with 401 ${message}`);
res.status(401).send(message);
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
WebContents.prototype.sendToFrame = function (frameId, channel, ...args) {
if (typeof channel !== 'string') {
throw new Error('Missing required channel argument');
} else if (typeof frameId !== 'number') {
throw new Error('Missing required frameId argument');
}
return this._sendToFrame(false /* interna... | 0 | TypeScript | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | vulnerable |
saveDisabled() {
const instance = Template.instance();
return instance.formState.get().state === "submitting" ||
instance.ipBlacklist.get() === instance.originalIpBlacklist;
}, | 1 | TypeScript | 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 | safe |
parse(cookieStr) {
let cookie = {};
(cookieStr || '')
.toString()
.split(';')
.forEach(cookiePart => {
let valueParts = cookiePart.split('=');
let key = valueParts
.shift()
.trim()
... | 0 | TypeScript | CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | The software constructs a string for a command to executed by a separate component
in another control sphere, but it does not properly delimit the
intended arguments, options, or switches within that command string. | https://cwe.mitre.org/data/definitions/88.html | vulnerable |
body: JSON.stringify({
...keys,
_SessionToken: this.sessionToken,
_method: 'GET',
}),
});
expect(meResponse.data.objectId).toEqual(this.objectId);
expect(meResponse.data.sessionToken).toEqual(this.sessionToken);
}); | 1 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | safe |
TEST_F(AsStringGraphTest, Int64) {
TF_ASSERT_OK(Init(DT_INT64));
AddInputFromArray<int64>(TensorShape({3}), {-42, 0, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRING, TensorShape({3}));
test::FillValues<tstring>(&expected, {"-42", "0", "42"});
test::ExpectTensorEqual<tstring>(expec... | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
next: schemaData => {
if (
schemaData &&
((schemaData.errors && schemaData.errors.length > 0) ||
!schemaData.data)
) {
throw new Error(JSON.stringify(schemaData, null, 2))
}
if (!schemaData) {
throw new NoSche... | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
const normalizeConfigFile = (data: ParsedIniData): ParsedIniData => {
const map: ParsedIniData = {};
for (const key of Object.keys(data)) {
let matches: Array<string> | null;
if (key === "default") {
map.default = data.default;
} else if ((matches = profileKeyRegex.exec(key))) {
// eslint-di... | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
cleanup() {
if (this._zlib)
_close(this._zlib);
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
constructor(connection, {root, cwd} = {}) {
this.connection = connection;
this.cwd = nodePath.normalize((cwd || '/').replace(WIN_SEP_REGEX, '/'));
this._root = nodePath.resolve(root || process.cwd());
} | 1 | TypeScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of t... | https://cwe.mitre.org/data/definitions/22.html | safe |
constructor(seqno, onWrite) {
this.outSeqno = seqno;
this._onWrite = onWrite;
this._dead = false;
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
TEST_F(AsStringGraphTest, FloatWidthOnly) {
TF_ASSERT_OK(Init(DT_FLOAT, /*fill=*/"", /*width=*/5));
AddInputFromArray<float>(TensorShape({4}), {-42, 0, 3.14159, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRING, TensorShape({4}));
test::FillValues<tstring>(
&expected, {"-42.0000... | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
function getStructure(target, prefix) {
if (! isObject(target)) {
return [{path: [], value: target}];
}
if (! prefix) {
prefix = [];
}
if (Array.isArray(target)) {
return target.reduce(function (result, value, i) {
return result.concat(
getPropStructure(value, prefix.concat(i)),
... | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
function getProp(obj, property) {
if (!obj.hasOwnProperty(property)) {
throw new Error(`Property '${property}' is not valid`);
}
return obj[property];
} | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
function readUInt32BE(buf, offset) {
return (buf[offset++] * 16777216)
+ (buf[offset++] * 65536)
+ (buf[offset++] * 256)
+ buf[offset];
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
readRaw: (len) => {
if (!buffer)
return;
if (typeof len !== 'number')
return bufferSlice(buffer, pos, pos += (buffer.length - pos));
if ((buffer.length - pos) >= len)
return bufferSlice(buffer, pos, pos += len);
}, | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
handler: function (grid, rowIndex) {
let data = grid.getStore().getAt(rowIndex);
pimcore.helpers.deleteConfirm(t('translation'), Ext.util.Format.htmlEncode(data.data.key), function () {
grid.getStore().removeAt(rowIndex);
... | 1 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 | safe |
template({ labelInfo, labelHead, iconSync, iconAdd, pfx, ppfx }: any) {
return `
<div id="${pfx}up" class="${pfx}header">
<div id="${pfx}label" class="${pfx}header-label">${labelHead}</div>
<div id="${pfx}status-c" class="${pfx}header-status">
<span id="${pfx}input-c" data-states-c>
... | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
function addSockListeners() {
if (!accept && !reject) {
sock.once('connect', onconnect);
sock.on('data', ondata);
sock.once('error', onerror);
sock.once('close', onclose);
} else {
let chan;
sock.once('connect', () => {
chan = accept();
let isDone = false;
... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function get(target, path) {
"use strict";
try {
return reduce(target, path);
} catch (ex) {
console.error(ex);
return;
}
} | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
function detailedDataTableMapper(entry) {
const project = Projects.findOne({ _id: entry.projectId })
const mapping = [project ? project.name : '',
dayjs.utc(entry.date).format(getGlobalSetting('dateformat')),
entry.task,
projectUsers.findOne() ? projectUsers.findOne().users.find((elem) => elem._id === e... | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
getPrivatePEM: function getPrivatePEM() {
return this[SYM_PRIV_PEM];
}, | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
PageantSock.prototype.end = PageantSock.prototype.destroy = function() {
this.buffer = null;
if (this.proc) {
this.proc.kill();
this.proc = undefined;
}
}; | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function genOpenSSLEdPriv(priv) {
const asnWriter = new Ber.Writer();
asnWriter.startSequence();
// version
asnWriter.writeInt(0x00, Ber.Integer);
// algorithm
asnWriter.startSequence();
asnWriter.writeOID('1.3.101.112'); // id-Ed25519
asnWriter.endSequence();
// PrivateKey
asnWr... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
macKey: (macKey && Buffer.from(macKey)),
forceNative: (pair[1] === 'native'),
},
};
cipher = createCipher(config);
decipher = createDecipher(config);
if (pair[0] === 'binding')
assert(/binding/i.test(cipher.constructor.name));
else
... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
where: this.sequelize.json("data.id')) AS DECIMAL) = 1 DELETE YOLO INJECTIONS; -- ", '1')
});
}); | 1 | TypeScript | CWE-89 | Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') | The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/89.html | safe |
error: err => {
reject(err)
this.fetching = this.fetching.remove(this.hash(session))
}, | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
resetPassword(req) {
const config = req.config;
if (!config) {
this.invalidRequest();
}
if (!config.publicServerURL) {
return this.missingPublicServerURL();
}
const { username, token, new_password } = req.body;
if ((!username || !token || !new_password) && req.xhr === false... | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
constructor(message) {
super();
Error.captureStackTrace(this, ERR_INTERNAL_ASSERTION);
const suffix = 'This is caused by either a bug in ssh2 '
+ 'or incorrect usage of ssh2 internals.\n'
+ 'Please open an issue with this stack trace at '
+ 'https:... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
async function installMonitoredItem(subscription, nodeId) {
debugLog("installMonitoredItem", nodeId.toString());
const monitoredItem = await subscription.monitor(
{ nodeId, attributeId: AttributeIds.Value },
{
samplingInterval: 0, // reports immediately
discardOldest: tru... | 0 | TypeScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
export async function getApi(constructor = Gists) {
const token = await getToken();
const apiurl = config.get("apiUrl");
if (!apiurl) {
const message = "No API URL is set.";
throw new Error(message);
}
return new constructor({ apiurl, token });
} | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
export async function createCsrfToken(ctx: AppContext) {
if (!ctx.joplin.owner) throw new Error('Cannot create CSRF token without a user');
return ctx.joplin.models.token().generate(ctx.joplin.owner.id);
} | 1 | TypeScript | CWE-352 | Cross-Site Request Forgery (CSRF) | The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. | https://cwe.mitre.org/data/definitions/352.html | safe |
handler: function (request, reply) {
return reply('hello');
} | 1 | TypeScript | CWE-287 | Improper Authentication | When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct. | https://cwe.mitre.org/data/definitions/287.html | safe |
await getManager().transaction(async (manager) => {
const organizationUser = await manager.findOne(OrganizationUser, { where: { id } });
const user = await manager.findOne(User, { where: { id: organizationUser.userId } });
await this.usersService.throwErrorIfRemovingLastActiveAdmin(user);
... | 0 | TypeScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | vulnerable |
export function applyCommandArgs(configuration: any, argv: string[]) {
if (!argv || !argv.length) {
return;
}
argv = argv.slice(2);
const parsedArgv = yargs(argv);
const argvKeys = Object.keys(parsedArgv);
if (!argvKeys.length) {
return;
}
debug("Appling command arguments:", parsedArgv);
if (parsedArgv... | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
parseGraphQLServer._getGraphQLOptions = async (req) => {
expect(req.info).toBeDefined();
expect(req.config).toBeDefined();
expect(req.auth).toBeDefined();
checked = true;
return await originalGetGraphQLOptions.bind(parseGraphQLServer)(req);
}; | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
function slurpFile(path: string): Promise<string> {
return new Promise((resolve, reject) => {
readFile(path, "utf8", (err, data) => {
if (err) {
reject(err);
} else {
resolve(data);
}
});
});
} | 0 | TypeScript | NVD-CWE-noinfo | null | null | null | vulnerable |
export function getCurSid12Maybe3(): St | N { // [ts_authn_modl]
const store: Store = debiki2.ReactStore.allData();
const cookieName =
debiki2.store_isFeatFlagOn(store, 'ffUseNewSid') ? 'TyCoSid123' : 'dwCoSid';
let sid = getSetCookie(cookieName);
if (!sid) {
// Cannot use store.me.mySidPart1 — w... | 0 | TypeScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | vulnerable |
userId: projectUsers.findOne().users.find((elem) => elem._id === entry._id.userId)?.profile?.name,
totalHours,
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
constructor({ log, port }: { log: LogEntry; port?: number }) {
this.log = log
this.debugLog = this.log.placeholder({ level: LogLevel.debug, childEntriesInheritLevel: true })
this.garden = undefined
this.port = port
this.authKey = randomString(64)
this.incomingEvents = new EventBus()
this.a... | 0 | TypeScript | CWE-306 | Missing Authentication for Critical Function | The software does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources. | https://cwe.mitre.org/data/definitions/306.html | vulnerable |
export async function getApi(newToken?: string) {
const token = newToken || (await getToken());
const apiurl = config.get("apiUrl");
return new GitHub({ apiurl, token });
} | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
constructor(lineNumber: number) {
super(`Unsupported section name "__proto__": [${lineNumber}]"`);
this.lineNumber = lineNumber;
} | 1 | TypeScript | CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. | https://cwe.mitre.org/data/definitions/1321.html | safe |
func cssGogsMinCss() (*asset, error) {
bytes, err := cssGogsMinCssBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "css/gogs.min.css", size: 64378, mode: os.FileMode(0644), modTime: time.Unix(1584214336, 0)}
a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xd9, 0x49, 0xa9, 0x99, 0... | 0 | TypeScript | CWE-281 | Improper Preservation of Permissions | The software does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended. | https://cwe.mitre.org/data/definitions/281.html | vulnerable |
constructor(bitbox: BITBOX) {
if(!bitbox)
throw Error("Must provide BITBOX instance to class constructor.")
this.BITBOX = bitbox;
} | 0 | TypeScript | 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 |
groupNames: result.groups.join(", "),
}),
"warning"
);
}
}); | 1 | TypeScript | CWE-276 | Incorrect Default Permissions | During installation, installed file permissions are set to allow anyone to modify those files. | https://cwe.mitre.org/data/definitions/276.html | safe |
function setDeepProperty(obj, propertyPath, value) {
const a = splitPath(propertyPath);
const n = a.length;
for (let i = 0; i < n - 1; i++) {
const k = a[i];
if (!(k in obj)) {
obj[k] = {};
}
obj = obj[k];
}
obj[a[n - 1]] = value;
return;
} | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
"click .restore"(evt) {
const instance = Template.instance();
instance.ipBlacklist.set(DEFAULT_IP_BLACKLIST);
}, | 1 | TypeScript | 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 | safe |
handleVote(pollId, answerId) {
makeCall('publishVote', pollId, answerId.id);
}, | 0 | TypeScript | NVD-CWE-noinfo | null | null | null | vulnerable |
function _ondata(data) {
bc += data.length;
if (state === 'secret') {
// the secret we sent is echoed back to us by cygwin, not sure of
// the reason for that, but we ignore it nonetheless ...
if (bc === 16) {
bc = 0;
... | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
constructor(protocol) {
this.allocStart = 0;
this.allocStartKEX = 0;
this._protocol = protocol;
this._zlib = new Zlib(DEFLATE);
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
WebContents.prototype._sendToFrameInternal = function (frame, channel, ...args) {
if (typeof channel !== 'string') {
throw new Error('Missing required channel argument');
} else if (!(typeof frame === 'number' || Array.isArray(frame))) {
throw new Error('Missing required frame argument (must be number or ar... | 1 | TypeScript | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | safe |
export async function formParse(req: any): Promise<FormParseResult> {
// It's not clear how to get mocked requests to be parsed successfully by
// formidable so we use this small hack. If it's mocked, we are running test
// units and the request body is already an object and can be returned.
if (req.__isMocked) {
... | 0 | TypeScript | CWE-352 | Cross-Site Request Forgery (CSRF) | The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. | https://cwe.mitre.org/data/definitions/352.html | vulnerable |
constructor (
private sanitizer: DomSanitizer,
private serverService: ServerService,
private notifier: Notifier
) { } | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
parseGraphQLServer._getGraphQLOptions = async req => {
expect(req.info).toBeDefined();
expect(req.config).toBeDefined();
expect(req.auth).toBeDefined();
checked = true;
return await originalGetGraphQLOptions.bind(parseGraphQLServer)(req);
}; | 1 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | safe |
provisionCallback: (user, renew, cb) => {
cb(null, 'zzz');
}
});
xoauth2.getToken(false, function (err, accessToken) {
expect(err).to.not.exist;
expect(accessToken).to.equal('zzz');
done();
});
}); | 1 | TypeScript | CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | The software constructs a string for a command to executed by a separate component
in another control sphere, but it does not properly delimit the
intended arguments, options, or switches within that command string. | https://cwe.mitre.org/data/definitions/88.html | safe |
text += ` / ${c.amount(a.budget, a.currency)}`;
}
text += "<br>";
}); | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software 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 |
readUInt64BE: (behavior) => {
if (!buffer || pos + 7 >= buffer.length)
return;
switch (behavior) {
case 'always':
return BigInt(`0x${buffer.hexSlice(pos, pos += 8)}`);
case 'maybe':
if (buffer[pos] > 0x1F)
return BigInt(`0x${buffer.hexSlice(pos, po... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function onconnect() {
let buf;
if (isSigning) {
/*
byte SSH2_AGENTC_SIGN_REQUEST
string key_blob
string data
uint32 flags
*/
let p = 9;
buf = Buffer.allocUnsafe(4 + 1 + 4 + keylen + 4 + datalen + 4);
writeUInt32BE(buf, buf.le... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
__(key) {
self.apos.util.warnDevOnce('old-i18n-req-helper', stripIndent`
The req.__() and res.__() functions are deprecated and do not localize in A3.
Use req.t instead.
`);
return key;
} | 0 | TypeScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | vulnerable |
message: new MockBuilder(
{
from: 'test@valid.sender',
to: 'test@valid.recipient'
},
'message\r\nline 2'
)
},
function (err, data) {
expect(... | 1 | TypeScript | CWE-88 | Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') | The software constructs a string for a command to executed by a separate component
in another control sphere, but it does not properly delimit the
intended arguments, options, or switches within that command string. | https://cwe.mitre.org/data/definitions/88.html | safe |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.