Giter Club home page Giter Club logo

Comments (5)

pocesar avatar pocesar commented on July 29, 2024 1

for executing user input, you need a sandbox or a dedicated VM

from static-eval.

hanvyj avatar hanvyj commented on July 29, 2024

But it's not executing any code is it? It's parsing user input into something it can evaluate - but the user can't actually run any code as such? It only evaluates static input.

from static-eval.

pocesar avatar pocesar commented on July 29, 2024

yes, "eval" means that it's executing code. if you want to analyse the code instead of executing it, you should take a look at a parser like esprima

from static-eval.

hanvyj avatar hanvyj commented on July 29, 2024

Esprima is required to parse the code for static-eval. It takes the parsed code, and evaluates it based on those expressions. It doesn't ever call eval on any of the code. Is it because of how it handles the FunctionExpression, i.e. using the function constructor?

It seems like a major use case would be for evaluating user provided expressions safely.

from static-eval.

pocesar avatar pocesar commented on July 29, 2024

the latest vulnerability, that was only discovered 2 years after the last version was released, showed how it was possible. check the #20 for the advisory with a PoC

from static-eval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.