
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Node.js Database Query String Builder (QSB) for Mysql/MariaDB
npm install node-qsb
var qsb = require('node-qsb');
var qs = new qsb().select('tableName').where('idx', '>', '10').build();
qs.printString(); //SELECT * FROM `tableName` WHERE `idx` > '10';
console.log(qs.returnString()); //SELECT * FROM `tableName` WHERE `idx` > '10';
qs.where('name', '=', 'Yowu').build();
console.log(qs.returnString());
//SELECT * FROM `tableName` WHERE `idx` > '10' AND `name` = 'Yowu';
qs.whereOr('name', '=', 'Yu Yongwoo').build();
console.log(qs.returnString());
//SELECT * FROM `tableName` WHERE `idx` > '10' AND `name` = 'Yowu' OR `name` = 'Yu Yongwoo';
var qsb = require('node-qsb');
var qs = new qsb().select('tableName').get('col1').get('col2').build();
console.log(qs.returnString());
//SELECT `col1`, `col2` FROM `tableName`;
var qsb = require('node-qsb');
var qs = new qsb().select('tableName', 'TN1')
.join('tableName2', 'TN2')
.where('TN1.idx', '<=', 1
.whereOr('TN2.idx', '=', 'TN1.idx')
.build().printString();
//SELECT * FROM `tableName` `TN1` JOIN `tableName2` `TN2` WHERE `TN1`.`idx` <= '10' OR `TN2`.`idx` = 'TN1.idx';
qs.limit(0, 10).build();
console.log(qs.returnString());
//SELECT * FROM `tableName` `TN1` JOIN `tableName2` `TN2` WHERE `TN1`.`idx` <= '10' OR `TN2`.`idx` = 'TN1.idx' LIMIT '0', '10';
qs.orderBy('TN1.idx', 'desc').build();
console.log(qs.returnString());
//SELECT * FROM `tableName` `TN1` JOIN `tableName2` `TN2` WHERE `TN1`.`idx` <= '10' OR `TN2`.`idx` = 'TN1.idx' ORDER BY `TN1`.`idx` desc LIMIT '0', '10';
var qsb = require('node-qsb');
var qs1 = new qsb().insert('tableName')
.values(['colName'], ['Value'])
.build().printString();
//INSERT INTO `tableName`(`colName`) VALUES ('value');
var params = {
cols : ['col1', 'col2', 'col3', 'col4'],
vals : ['val1', 'val2', 'val3', 4000],
}
var qs2 = new qsb().insert('tableName')
.values(params.cols, params.vals)
.build().printString();
//INSERT INTO `tableName`(`col1`, `col2`, `col3`, `col4`) VALUES ('val1', 'val2', 'val3', '4000');
qs2.addValues(params.vals).build().printString();
//INSERT INTO `tableName`(`col1`, `col2`, `col3`, `col4`) VALUES ('val1', 'val2', 'val3', '4000'),('val1', 'val2', 'val3', '4000');
var qsb = require('node-qsb');
var qs = new qsb().update('tableName')
.set('name', 'Yowu')
.where('idx', '=', '423')
.build().printString();
//UPDATE `tableName` SET `name` = 'Yowu' WHERE `idx` = '423';
qs.set('email', 'uyu423@gmail.com').build().printString();
//UPDATE `tableName` SET `name` = 'Yowu', `email` = 'uyu423@gmail.com' WHERE `idx` = '423';
var qsb = require('node-qsb');
var qs = new qsb().delete('tableName')
.where('idx', '=', 10)
.build()
.printString();
//DELETE FROM `tableName` WHERE `idx` = '10';
var qsb = require('node-qsb');
var qs = new qsb().forceQuery('select * from tableName').printString();
//select * from tableName
FAQs
Node.js Simple Database Query String Builder (QSB) for MySQL/MariaDB
The npm package node-qsb receives a total of 3 weekly downloads. As such, node-qsb popularity was classified as not popular.
We found that node-qsb demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.