Skip to content

tainted flag is not propagated through RegExp.source()  #12

@dmitris

Description

@dmitris

The tainted flag is not propagated through RegExp.source() method:

var s = new StringTainted("foo");  // "foo" is the attack payload
s.tainted;  // true
var re = new RegExp('/' + s + '/', 'g');
var src = re.source(); // "\/foo\/" - the attack payload inside
src.tainted; // false, should be true

Let me know if you consider this a valid case, I can add it to the tainttests/unit_tests.js

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