{"cve":"CVE-2021-28680","nvd":{"published":"2021-12-07T21:15:08.133","modified":"2026-06-17T03:46:46.963","status":"Modified","description":"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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1},"cwes":[],"references":["https://github.com/oivoodoo/devise_masquerade/issues/83","https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/","https://github.com/oivoodoo/devise_masquerade/issues/83","https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/"],"products":["devise_masquerade_project:devise_masquerade"],"source":"nvd","synced_at":"2026-10-19T21:25:41.256909649+00:00"},"epss":{"cve":"CVE-2021-28680","score":0.0125,"percentile":0.69393,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-25f5-gc4h-hc22","url":"https://osv.dev/vulnerability/GHSA-25f5-gc4h-hc22","summary":"Improper Privilege Management in devise_masquerade","modified":"2024-02-18T05:32:24.990602Z","packages":[{"ecosystem":"RubyGems","name":"devise_masquerade","purl":"pkg:gem/devise_masquerade","ranges":["<1.3.1"],"fixed":["1.3.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}