Authentication Bypass Affecting devise_masquerade Open this link in a new tab package, versions <1.3.1

  • Attack Complexity


  • Confidentiality


  • Integrity


Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id


  • published

    8 Dec 2021

  • disclosed

    8 Dec 2021

  • credit

    @excid3, @labanskoller

How to fix?

Upgrade devise_masquerade to version 1.3.1 or higher.


Affected versions of this package are vulnerable to Authentication Bypass when a password's salt is unknown. If the secret key base variable is somehow leaked, an attacker can become any user by misusing the masquerade back functionality of this Devise extension, something that is not possible in plain Devise since the attacker must know the victim's password salt to form a valid session cookie to encrypt and sign using secret key base.