Skip to content

LDAP search filter not sanitised in !verify command #51

@osslate

Description

@osslate

The !verify command accepts a username as the first parameter, which is used to lookup a user on an LDAP server. It's possible to do !verify * random@email.here.com (the username being a wildcard), and have brickbot cycle through every single user on the LDAP server to see if the email random@email.here.com matches their altmail. If it so happens that the email is associated with any username in the database, it'll grant you access to the Discord server. It may also be possible to craft other strings to send to the LDAP server, as presently, brickbot just injects user input into the search string.

I think the easiest way to fix this is to use an EqualityFilter as the filter key in https://github.com/redbrick/brickbot/blob/master/commands/verify.js#L19, but I don't have the time to test it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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