Vega's lassoAppend function: lassoAppend accepts 3 arguments and internally invokes push function on the 1st argument specifying array consisting of 2nd and 3rd arguments as push call argument. The type of the 1st argument is supposed to be an array, but it's not enforced.
This makes it possible to specify any object with a push function as the 1st argument, push function can be set to any function that can be access via event.view (no all such functions can be exploited due to invalid context or signature, but some can, e.g. console.log).
Details
The issue is that lassoAppend doesn't enforce proper types of its arguments:
.....
export function lassoAppend(lasso, x, y, minDist = 5) {
const last = lasso[lasso.length - 1];
// Add point to lasso if distance to last point exceed minDist or its the first point
if (last === undefined || Math.sqrt(((last[0] - x) ** 2) + ((last[1] - y) ** 2)) > minDist) {
lasso.push([x, y]);
.....
PoC
Use the following Vega snippet (depends on browser's non-built-in event.view.setImmediate function, feel free to replace with event.view.console.log or alike and observe the result in the browser's console)
This issue opens various XSS vectors, but exact impact and severity depends on the environment (e.g. Core JS setImmediate polyfill basically allows eval-like functionality).
The Vega scale expression function has the ability to call arbitrary functions with a single controlled argument. This can be exploited to escape the Vega expression sandbox in order to execute arbitrary JavaScript.
Details
The scale expression function passes a user supplied argument group to getScale, which is then used as if it were an internal context. The context.scales[name].value is accessed from group and called as a function back in scale.
PoC
The following Vega definition can be used to demonstrate this issue executing the JavaScript code alert(1);
This PR contains the following updates:
5.22.0
->5.23.0
GitHub Vulnerability Alerts
CVE-2023-26487
Summary
Vega's
lassoAppend
function:lassoAppend
accepts 3 arguments and internally invokespush
function on the 1st argument specifying array consisting of 2nd and 3rd arguments aspush
call argument. The type of the 1st argument is supposed to be an array, but it's not enforced.This makes it possible to specify any object with a
push
function as the 1st argument,push
function can be set to any function that can be access viaevent.view
(no all such functions can be exploited due to invalid context or signature, but some can, e.g.console.log
).Details
The issue is that
lassoAppend
doesn't enforce proper types of its arguments:PoC
Use the following Vega snippet (depends on browser's non-built-in
event.view.setImmediate
function, feel free to replace withevent.view.console.log
or alike and observe the result in the browser's console)Impact
This issue opens various XSS vectors, but exact impact and severity depends on the environment (e.g. Core JS
setImmediate
polyfill basically allowseval
-like functionality).CVE-2023-26486
Summary
The Vega
scale
expression function has the ability to call arbitrary functions with a single controlled argument. This can be exploited to escape the Vega expression sandbox in order to execute arbitrary JavaScript.Details
The scale expression function passes a user supplied argument
group
to getScale, which is then used as if it were an internal context. Thecontext.scales[name].value
is accessed fromgroup
and called as a function back inscale
.PoC
The following Vega definition can be used to demonstrate this issue executing the JavaScript code
alert(1);
This can be viewed in the Vega online IDE at https://vega.github.io/editor/#/url/vega/N4IgJAzgxgFgpgWwIYgFwhgF0wBwqgegIDc4BzJAOjIEtMYBXAI0poHsDp5kTykSArJQBWENgDsQAGhAATJJhSoA2qHFIEcNCAAaAZT0ACAApsAwtJDEkAGwZwIaZQEYAujMwAnJOIgAzNk8EJ1BMAE8cLXQAoIYbFBkkR3QNNgZxTEs4AA8cT21oWzgACgByP3SoUqlDcTibGsNgKAlMHMxUJsKbB07gCvEoPus7OE7ukvLK6sNSuBHihTYmYoAdEABNAHVsmyhxAEU2AFk9AGsAdnWASmuZ5tb2von8JoGhppH7TuVXShbfF4GFBMIF-hIIECQYEAL5wmHXeEIkAw1yomFAA
Release Notes
vega/vega (vega)
### [`v5.23.0`](https://togithub.com/vega/vega/releases/tag/v5.23.0) [Compare Source](https://togithub.com/vega/vega/compare/v5.22.1...v5.23.0) Changes from [v5.22.1](https://togithub.com/vega/vega/releases/tag/v5.22.1): This version contains dependency updates, bug fixes, and security patches, plus a few extra utilities to aid Vega-Lite. **monorepo** - Update dependencies, including D3 packages. - Update rollup config to use `.mjs` extensions. **vega-canvas** - Update rollup config. **vega-crossfilter** - Update rollup config. **vega-dataflow** - Update rollup config. **vega-encode** - Update rollup config. **vega-event-selector** - Update rollup config. **vega-expression** - Update rollup config. **vega-force** - Update rollup config. **vega-format** - Update rollup config. **vega-functions** - Fix `lassoAppend` expression function XSS. (**Thanks [@arvind](https://togithub.com/arvind)!**) - Fix `scale` expression function XSS (**Thanks [@ajxchapman](https://togithub.com/ajxchapman) and [@hydrosquall](https://togithub.com/hydrosquall)!**) - Update rollup config. **vega-geo** - Update rollup config. **vega-hierarchy** - Update rollup config. **vega-interpreter** - Update rollup config. **vega-label** - Prevent evaluation of unsafe methods, [#3570](https://togithub.com/vega/vega/issues/3570) (**Thanks [@AMoo-Miki](https://togithub.com/AMoo-Miki)!**) - Update rollup config. **vega-loader** - Update rollup config. **vega-parser** - Add `view` style for Vega-Lite, [#3480](https://togithub.com/vega/vega/issues/3480) (**Thanks [@arvind](https://togithub.com/arvind)!**) - Update rollup config. **vega-projection** - Register projections as recognized Vega scales. - Update rollup config. **vega-projection-extended** - Update rollup config. **vega-regression** - Update rollup config. **vega-runtime** - Update rollup config. **vega-scale** - Add `registerScale()` and `isRegisteredScale()` methods. (**Thanks [@hydrosquall](https://togithub.com/hydrosquall)!**) - Register scales as recognized Vega scales. - Update rollup config. **vega-scenegraph** - Update test cases to match dependency updates. - Update rollup config. **vega-schema** - Make `__count__` private from schema, [#3659](https://togithub.com/vega/vega/issues/3659) (**Thanks [@lsh](https://togithub.com/lsh)!**) - Update rollup config. **vega-selections** - Update rollup config. **vega-statistics** - Update rollup config. **vega-time** - Update rollup config. **vega-transforms** - Update rollup config. **vega-typings** - Make `__count__` private from schema, [#3659](https://togithub.com/vega/vega/issues/3659) (**Thanks [@lsh](https://togithub.com/lsh)!**) - Update scenegraph item typings (**Thanks [@jonathanzong](https://togithub.com/jonathanzong)!**) - Update rollup config. **vega-util** - Update typescript config. - Update rollup config. **vega-view** - Wrap querySelectorAll in Array.from, [#3639](https://togithub.com/vega/vega/issues/3639) (**Thanks [@ravron](https://togithub.com/ravron)!**) - Update rollup config. **vega-view-transforms** - Update rollup config. - Fix autosize="fit-x/y" when legend is larger than plot, [#3474](https://togithub.com/vega/vega/issues/3474) (**Thanks [@stas-sl](https://togithub.com/stas-sl)!**) **vega-voronoi** - Update rollup config. **vega-wordcloud** - Update rollup config. **vega-cli** - Update rimraf version, adjust code in response. - Update rollup config. **vega** - Update test scenes to match dependency updates. - Update rollup config. ### [`v5.22.1`](https://togithub.com/vega/vega/releases/tag/v5.22.1) [Compare Source](https://togithub.com/vega/vega/compare/v5.22.0...v5.22.1) Changes from [v5.22.0](https://togithub.com/vega/vega/releases/tag/v5.22.0): **monorepo** - Update dependencies. **vega-scenegraph** - Fix SVG path parser null check. ([#3451](https://togithub.com/vega/vega/issues/3451)).Configuration
📅 Schedule: Branch creation - "" in timezone UTC, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.