fix: Security bug about prototype pollution by sumeetkakkar · Pull Request #805 · linkedin/dustjs · GitHub
Skip to content

fix: Security bug about prototype pollution - #805

Merged
sumeetkakkar merged 1 commit into
linkedin:masterfrom
sumeetkakkar:fix/proto-pollution
Oct 13, 2021
Merged

sumeetkakkar merged 1 commit into
linkedin:masterfrom
sumeetkakkar:fix/proto-pollution

Conversation

@sumeetkakkar

Copy link
Copy Markdown
Collaborator

Refer #804

@sumeetkakkar

Copy link
Copy Markdown
Collaborator Author

Comment thread test/core.spec.js
Object.prototype.MAL_CODE= [ malicious ];
const compiled = dust.compile('{username} is an important person.{~n}');
const tmpl = dust.loadSource(compiled);
dust.render(tmpl, { username: 'Jane Doe' }, (err, output) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how did we test this?
what should be the result of this test without the above fix

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will execute curl 127.0.0.1 and the test fails

Comment thread dist/dust-core.js

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were errors just logging [Object] or something like that before this change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants