Skip to content

Cannot detect sources propagated throught shorthand syntax #16

@filipeom

Description

@filipeom

Reported example:

function f(userInput) {
    let path = userInput
    const result = {path, method: 25, prop: 'userInput'}
    eval(result)
}

module.exports = {f}

But changing it to:

function f(userInput) {
    let path = userInput
    const result = {path, method: 25, prop: 'userInput'}
    eval(result.path)
}

module.exports = {f}

Also leads to a missed vulnerability. Could it be due to the definition of path through shorthand syntax?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions