Skip to content

URL path traversal attacks can cause downcase ArgumentError #64

Description

@volleio

On v2.0.0, navigating to a URl that contains a directory traversal attack in its path (e.g. localhost:5000/%c0%ae%c0%ae) will cause the following error to be raised:

ArgumentError: input string invalid
/usr/local/bundle/gems/route_downcaser-2.0.0/lib/route_downcaser/downcase_route_middleware.rb:64:in `downcase': input string invalid (ArgumentError)

Calling URI.decode_www_form_component("%c0") returns "\xC0", which is considered an invalid string for downcasing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions