Skip to content

Eloquents attach association doesn't prevent sql injection #31607

@SengPhirum

Description

@SengPhirum

When

// inject single quote in array
$partIds = ["1'", "2'"];

$model->cars()->attach($partIds);

Query will crash, so vulnerabilities will able to attack by sql injection

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions