Skip to content

ERB Injection vulnerability #825

@DanielHeath

Description

@DanielHeath

Just noticed that there's no escaping in
https://github.com/comfy/comfortable-mexican-sofa/blob/master/lib/comfortable_mexican_sofa/content/tags/helper.rb#L36

If I write:

cms:helper whitelisted_helper foo#{Kernel.exec('poweroff')}

it'll get turned into

<%= whitelisted_helper("foo#{Kernel.exec('poweroff')}") %>

When ERB interprets this, it'll execute poweroff.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions