Security mailing lists by PureSourceCode

CVE-2021-28680

HIGH 8.1CVSS 3.1

Improper Privilege Management in devise_masquerade

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.

Published
7 Dec 2021
Last modified
17 Jun 2026
Assigned by
cve@mitre.org
NVD status
Modified
Weakness
CWE-269
Also known as
GHSA-25f5-gc4h-hc22
Sources
NVDJSONOSV GHSA-25f5-gc4h-hc22JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 HIGH 8.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 2.0 MEDIUM 6.8 AV:N/AC:M/Au:N/C:P/I:P/A:P

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD devise_masquerade_project devise_masquerade
cpe:2.3:a:devise_masquerade_project:devise_masquerade:*:*:*:*:*:ruby:*:*
< 1.3.0 1.3.0
OSV RubyGems devise_masquerade < 1.3.1 1.3.1

References

History

  • 25 Nov 2026 20:33 UTC · NVD: first stored (published 7 Dec 2021)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 8 Dec 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.