Last 12 weeks · 0 commits
0 of 6 standards met
hi, we are a security team. We found a prototype pollution vulnerability in your project. 1. Vulnerability Type & Cause Vulnerability Type: Prototype Pollution Root Cause: The mergeJSXProps function uses for...in loops without hasOwnProperty checks to iterate user‑controlled objects, and performs unsafe dynamic property assignment. Attackers can inject the __proto__ key to modify the object prototype, leading to local prototype pollution. 2. Vulnerability Location Affected Package: babel‑helper‑vue‑jsx‑merge‑props@2.0.3 Vulnerable File: index.js Key Vulnerable Lines: Line 6: Line 25: Line 34: Line 38: 3. Proof of Concept (PoC) 4. PoC Expected Output 5. Fixed Code 6.Fix Verification Fixed Output
I am using with and encountered a problem somewhat like This directive makes v-show not work when been added after it After reading the codes I found that is using to merge props but nest merge of 'directives' is not supported, that is what causes the problem. Owing to my limited knowledge, I cannot see why. Please consider it if it's reasonable.
Fix related issue vuejs/babel-plugin-transform-vue-jsx#171 Currently, the props are directly assigned to the result in the reduce function. The problem is when using spread operator in jsx, the parameter is the original object. As a result, when assigning something to , it will mutate that object. These changes fix the issue by copying the props instead of direct assignment. This PR also passed the test cases in vuejs/babel-plugin-transform-vue-jsx.
Repository: vuejs/babel-helper-vue-jsx-merge-props. Description: babel helper for vue jsx spread. Stars: 30, Forks: 12. Primary language: JavaScript. Languages: JavaScript (100%). Open PRs: 1, open issues: 3. Last activity: 6y ago. Community health: 12%. Top contributors: yyx990803, njleonzhang.