d3-selection Prototype Pollution Vulnerability
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- d3, javascript
Research direction
Start with the local.set method in d3-selection/src/local.js and trace how it stores values when given Object.prototype. Reproduce the report using its Node.js proof of concept and confirm whether the prototype is modified. Done means the reported pollution is prevented while the existing local.set behavior remains intact.
Written by the indexing model from the issue text.
Description
hi, we are a security team. We found a Prototype Pollution vulnerability in your project.
Vulnerability Cause
The local.set() method uses numeric IDs as keys to store data. It does not check if the node is Object.prototype, so passing the prototype object causes global pollution.
Vulnerable Code Location
d3-selection/src/local.js – set method
node[id] = value;
Pollutes prototype directly when node = Object.prototype.
Proof of Concept (POC)
const d3_selection = require('d3-selection');
const local = d3_selection.local();
// Pass prototype object
local.set(Object.prototype, 'polluted', 'd3_polluted');
// Verify pollution
console.log({}.polluted); // Output: d3_polluted
Reproduction Steps
Install: npm i d3-selection
Run poc.js
If polluted value is printed, vulnerability is reproduced
Impact
Affects all applications using d3 visualization libraries; may break application logic or enable further attacks.
- Dominant language
- JavaScript
- Stars
- 571
- Forks
- 283
- Avg merge
- 7h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from d3/d3-selection
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
d3/d3-selection#324 · 2 comments ·
-
d3 v7.9.0 – d3.pointer() uses createSVGPoint() which is now deprecatedPossibly taken @Fil claimed this 677 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
d3/d3-selection#320 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
d3/d3-selection#319 · 1 comment ·
-
selection.appendAllOpenenhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
d3/d3-selection#301 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
d3/d3-selection#292 · 2 comments ·
Similar issues
-
ai bug design good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
neomjs/neo-agent-institution#927 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gramps-project/gramps-web#1671 ·
Maintainers usually reply within 1 day
-
bug good first issue priority: P2 status: ready
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RhinoLink-Tech/data-fabric#502 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
cline/mcp-marketplace#3708 ·
-
beginner-friendly category:finding-titles community enhancement first-timers-only good first issue help wanted low hanging fruit micro-contribution type: task up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Berserk-hub150/skillhawk#264 · 1 comment ·
Maintainers usually reply within 4 days