question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Security Issue - CVE-2022-25645 - Node module `dset`

See original GitHub issue

There is currently CVE open for the module dset for the following problem:

Affected versions of this package are vulnerable to Prototype Pollution via ‘dset/merge’ mode, as the dset function checks for prototype pollution by validating if the top-level path contains proto, constructor or protorype. By crafting a malicious object, it is possible to bypass this check and achieve prototype pollution.

This affect graphiql on the following line - which is affected as it uses dset/merge as the imported module:

dset(payload.data, path, data);

Would it be possible to migrate away from dset soon?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
lukeedcommented, May 3, 2022

This has been fixed in dset@3.1.2

1reaction
yaacovCRcommented, Apr 14, 2022

I think you may need to provide a custom merge function as setting merge = true according to docs for set-value seems to only perform a shallow merge which is probably not enough.

I actually didn’t check to see how setvalue works and how it’s being used, but just thinking about overlapping deferred fragments, it seems that you would need deep merging.

Also, out of curiosity, why is set-value not vulnerable to the same concern? Is there no CVE for it yet or did they solve something differently?

Can dset be patched rather than discarded? Is there a link to separate discussion about that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CVE-2022-25645 Detail - NVD
All versions of package dset are vulnerable to Prototype Pollution via 'dset/merge' mode, as the dset function checks for prototype ...
Read more >
Prototype Pollution in dset | CVE-2022-25645 | Snyk
Affected versions of this package are vulnerable to Prototype Pollution via 'dset/merge' mode, as the dset function checks for prototype ...
Read more >
Nov 3 2022 Security Releases | Node.js
js release lines for the following issues. X.509 Email Address 4-byte Buffer Overflow (High) (CVE-2022-3602). A buffer overrun can be triggered ...
Read more >
Node.js Vulnerability Cheatsheet | ShiftLeft Blog
Insecure puppeteer settings; Security misconfiguration; Remote code execution (RCE); SQL injection; Log injection; Mail injection; Template ...
Read more >
NPM Security best practices - OWASP Cheat Sheet Series
js developers. 1) Avoid publishing secrets to the npm registry¶. Whether you're making use of API keys, passwords or other secrets, they can ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found