{"id":"CVE-2021-28680","published":"2021-12-07T20:32:18Z","modified":"2024-08-03T21:47:33Z","title":"The devise_masquerade gem before 1.3 allows certain attacks when a password's salt is unknown","vendor":null,"product":null,"tier":"tail","description":{"text":"The devise_masquerade gem before 1.3 allows certain attacks when a password's salt is unknown. An application that uses this gem to let administrators masquerade/impersonate users loses one layer of security protection compared to a situation where Devise (without this extension) is used. If the server-side secret_key_base value became publicly known (for instance if it is committed to a public repository by mistake), there are still other protections in place that prevent an attacker from impersonating any user on the site. When masquerading is not used in a plain Devise application, one must know the password salt of the target user if one wants to encrypt and sign a valid session cookie. When devise_masquerade is used, however, an attacker can decide which user the \"back\" action will go back to without knowing that user's password salt and simply knowing the user ID, by manipulating the session cookie and pretending that a user is already masqueraded by an administrator.","provenance":"source","from":"CVE.org"},"cvss":null,"epss":{"score":0.0125,"percentile":0.70108,"provenance":"source"},"cwes":[],"references":[{"url":"https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/","tags":["x_refsource_MISC"]},{"url":"https://github.com/oivoodoo/devise_masquerade/issues/83","tags":["x_refsource_MISC"]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":14.02}]},"affected":[{"ecosystem":"RubyGems","package":"devise_masquerade","vulnerableRanges":["<1.3.1"],"patched":["1.3.1"],"from":["GHSA-25f5-gc4h-hc22"],"provenance":"source"}],"summary":{"text":"The devise_masquerade gem before version 1.3 is a Ruby on Rails extension to Devise that lets administrators impersonate users, and its masquerade \"back\" handling does not require knowledge of the target user's password salt. An attacker who knows the victim's user ID and can tamper with the session cookie, given that the server-side secret_key_base is known, can make the application return to that user without the password salt, impersonating them in an application that uses this gem.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:51:58Z"},"euvd":{"id":"EUVD-2021-2418","exploited":false,"provenance":"source"}}