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

[Security] Bump static-eval from 2.0.0 to 2.1.0 #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot-preview[bot]
Copy link

Bumps static-eval from 2.0.0 to 2.1.0. This update includes a security fix.

Vulnerabilities fixed

Sourced from The GitHub Security Advisory Database.

Sandbox Breakout / Arbitrary Code Execution in static-eval Versions of static-evalprior to 2.0.2 pass untrusted user input directly to the global function constructor, resulting in an arbitrary code execution vulnerability when user input is parsed via the package.

Proof of concept

var evaluate = require('static-eval');
var parse = require('esprima').parse;

var src = process.argv[2]; var payload = '(function({x}){return x.constructor})({x:"".sub})("console.log(process.env)")()' var ast = parse(payload).body[0].expression; console.log(evaluate(ast, {x:1}));

Recommendation

Upgrade to version 2.0.2 or later.

Affected versions: <= 2.0.1

Release notes

Sourced from static-eval's releases.

v2.1.0

  • Add allowAccessToMethodsOnFunctions option to restore 1.x behaviour so that cwise can upgrade. (@archmoj in #31)

    Do not use this option if you are not sure that you need it, as it had previously been removed for security reasons. There is a known exploit to execute arbitrary code. Only use it on trusted inputs, like the developer's JS files in a build system.

v2.0.5

  • Fix function bodies being invoked during declaration. (@RoboPhred in #30)

v2.0.4

  • Short-circuit evaluation in && and || expressions. (@RoboPhred in #28)
  • Start tracking changes.

v2.0.3

Disallows accessing .constructor and .__proto__ properties, which could be used to access the Function() constructor. (browserify/static-eval#27) Thanks to an anonymous reporter!

Changelog

Sourced from static-eval's changelog.

2.1.0

  • Add allowAccessToMethodsOnFunctions option to restore 1.x behaviour so that cwise can upgrade. (@archmoj in #31)

    Do not use this option if you are not sure that you need it, as it had previously been removed for security reasons. There is a known exploit to execute arbitrary code. Only use it on trusted inputs, like the developer's JS files in a build system.

2.0.5

  • Fix function bodies being invoked during declaration. (@RoboPhred in #30)

2.0.4

  • Short-circuit evaluation in && and || expressions. (@RoboPhred in #28)
  • Start tracking changes.
Commits
  • 1a4d734 2.1.0
  • 054adac ci: add node 14
  • 09c4b83 Merge pull request #31 from archmoj/allow-cwise-transform
  • e619afc make option to enable allowAccessToMethodsOnFunctions namely to be used by cw...
  • 36587c2 remove trailing spaces
  • 798b0d5 ci: add node 12 and 13
  • b5ab0d7 2.0.5
  • aa0eaeb Merge pull request #30 from RoboPhred/fix-func-decl-invoke
  • 23bc6ca Merge branch 'master' into fix-func-decl-invoke
  • 9d39dd5 Update repository URL in package.json.
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by goto-bus-stop, a new releaser for static-eval since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps [static-eval](https://github.com/browserify/static-eval) from 2.0.0 to 2.1.0. **This update includes a security fix.**
- [Release notes](https://github.com/browserify/static-eval/releases)
- [Changelog](https://github.com/browserify/static-eval/blob/master/CHANGELOG.md)
- [Commits](browserify/static-eval@2.0.0...v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview dependabot-preview bot added dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability labels Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file security Pull requests that address a security vulnerability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants