GSD-2021-28680
Vulnerability from gsd - Updated: 2021-12-08 00:00{
"GSD": {
"alias": "CVE-2021-28680",
"description": "The devise_masquerade gem before 1.3 allows certain attacks when a password\u0027s 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\u0027s password salt and simply knowing the user ID, by manipulating the session cookie and pretending that a user is already masqueraded by an administrator.",
"id": "GSD-2021-28680"
},
"gsd": {
"metadata": {
"exploitCode": "unknown",
"remediation": "unknown",
"reportConfidence": "confirmed",
"type": "vulnerability"
},
"osvSchema": {
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "devise_masquerade",
"purl": "pkg:gem/devise_masquerade"
}
}
],
"aliases": [
"CVE-2021-28680",
"GHSA-25f5-gc4h-hc22"
],
"details": "The devise_masquerade gem before 1.3 allows certain attacks when a password\u0027s\nsalt is unknown. An application that uses this gem to let administrators masquerade/impersonate\nusers loses one layer of security protection compared to a situation where Devise\n(without this extension) is used. If the server-side secret_key_base value became\npublicly known (for instance if it is committed to a public repository by mistake),\nthere are still other protections in place that prevent an attacker from impersonating\nany user on the site. When masquerading is not used in a plain Devise application,\none must know the password salt of the target user if one wants to encrypt and sign\na valid session cookie. When devise_masquerade is used, however, an attacker can\ndecide which user the \"back\" action will go back to without knowing that user\u0027s\npassword salt and simply knowing the user ID, by manipulating the session cookie\nand pretending that a user is already masqueraded by an administrator.\n",
"id": "GSD-2021-28680",
"modified": "2021-12-08T00:00:00.000Z",
"published": "2021-12-08T00:00:00.000Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/oivoodoo/devise_masquerade/issues/83"
},
{
"type": "WEB",
"url": "https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/"
},
{
"type": "WEB",
"url": "https://github.com/oivoodoo/devise_masquerade/pull/76"
},
{
"type": "WEB",
"url": "https://github.com/oivoodoo/devise_masquerade/releases/tag/v1.3.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": 8.1,
"type": "CVSS_V3"
}
],
"summary": "Improper Privilege Management in devise_masquerade"
}
},
"namespaces": {
"cve.org": {
"CVE_data_meta": {
"ASSIGNER": "cve@mitre.org",
"ID": "CVE-2021-28680",
"STATE": "PUBLIC"
},
"affects": {
"vendor": {
"vendor_data": [
{
"product": {
"product_data": [
{
"product_name": "n/a",
"version": {
"version_data": [
{
"version_value": "n/a"
}
]
}
}
]
},
"vendor_name": "n/a"
}
]
}
},
"data_format": "MITRE",
"data_type": "CVE",
"data_version": "4.0",
"description": {
"description_data": [
{
"lang": "eng",
"value": "The devise_masquerade gem before 1.3 allows certain attacks when a password\u0027s 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\u0027s password salt and simply knowing the user ID, by manipulating the session cookie and pretending that a user is already masqueraded by an administrator."
}
]
},
"problemtype": {
"problemtype_data": [
{
"description": [
{
"lang": "eng",
"value": "n/a"
}
]
}
]
},
"references": {
"reference_data": [
{
"name": "https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/",
"refsource": "MISC",
"url": "https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/"
},
{
"name": "https://github.com/oivoodoo/devise_masquerade/issues/83",
"refsource": "MISC",
"url": "https://github.com/oivoodoo/devise_masquerade/issues/83"
}
]
}
},
"github.com/rubysec/ruby-advisory-db": {
"cve": "2021-28680",
"cvss_v3": 8.1,
"date": "2021-12-08",
"description": "The devise_masquerade gem before 1.3 allows certain attacks when a password\u0027s\nsalt is unknown. An application that uses this gem to let administrators masquerade/impersonate\nusers loses one layer of security protection compared to a situation where Devise\n(without this extension) is used. If the server-side secret_key_base value became\npublicly known (for instance if it is committed to a public repository by mistake),\nthere are still other protections in place that prevent an attacker from impersonating\nany user on the site. When masquerading is not used in a plain Devise application,\none must know the password salt of the target user if one wants to encrypt and sign\na valid session cookie. When devise_masquerade is used, however, an attacker can\ndecide which user the \"back\" action will go back to without knowing that user\u0027s\npassword salt and simply knowing the user ID, by manipulating the session cookie\nand pretending that a user is already masqueraded by an administrator.\n",
"gem": "devise_masquerade",
"ghsa": "25f5-gc4h-hc22",
"patched_versions": [
"\u003e= 1.3.1"
],
"related": {
"url": [
"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/pull/76",
"https://github.com/oivoodoo/devise_masquerade/releases/tag/v1.3.1"
]
},
"title": "Improper Privilege Management in devise_masquerade",
"url": "https://github.com/oivoodoo/devise_masquerade/issues/83"
},
"gitlab.com": {
"advisories": [
{
"affected_range": "\u003c1.3.0",
"affected_versions": "All versions before 1.3.0",
"cvss_v2": "AV:N/AC:M/Au:N/C:P/I:P/A:P",
"cvss_v3": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"cwe_ids": [
"CWE-1035",
"CWE-937",
"CWE-284"
],
"date": "2021-12-13",
"description": "The devise_masquerade gem allows certain attacks when a password\u0027s 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\u0027s password salt and simply knowing the user ID, by manipulating the session cookie and pretending that a user is already masqueraded by an administrator.",
"fixed_versions": [
"1.3.0"
],
"identifier": "CVE-2021-28680",
"identifiers": [
"CVE-2021-28680"
],
"not_impacted": "All versions starting from 1.3.0",
"package_slug": "gem/devise_masquerade",
"pubdate": "2021-12-07",
"solution": "Upgrade to version 1.3.0 or above.",
"title": "Improper Access Control",
"urls": [
"https://nvd.nist.gov/vuln/detail/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/"
],
"uuid": "6de391be-8589-402a-991e-c0d269c7fbe9"
}
]
},
"nvd.nist.gov": {
"configurations": {
"CVE_data_version": "4.0",
"nodes": [
{
"children": [],
"cpe_match": [
{
"cpe23Uri": "cpe:2.3:a:devise_masquerade_project:devise_masquerade:*:*:*:*:*:ruby:*:*",
"cpe_name": [],
"versionEndExcluding": "1.3.0",
"vulnerable": true
}
],
"operator": "OR"
}
]
},
"cve": {
"CVE_data_meta": {
"ASSIGNER": "cve@mitre.org",
"ID": "CVE-2021-28680"
},
"data_format": "MITRE",
"data_type": "CVE",
"data_version": "4.0",
"description": {
"description_data": [
{
"lang": "en",
"value": "The devise_masquerade gem before 1.3 allows certain attacks when a password\u0027s 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\u0027s password salt and simply knowing the user ID, by manipulating the session cookie and pretending that a user is already masqueraded by an administrator."
}
]
},
"problemtype": {
"problemtype_data": [
{
"description": [
{
"lang": "en",
"value": "NVD-CWE-noinfo"
}
]
}
]
},
"references": {
"reference_data": [
{
"name": "https://github.com/oivoodoo/devise_masquerade/issues/83",
"refsource": "MISC",
"tags": [
"Issue Tracking",
"Third Party Advisory"
],
"url": "https://github.com/oivoodoo/devise_masquerade/issues/83"
},
{
"name": "https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/",
"refsource": "MISC",
"tags": [
"Exploit",
"Third Party Advisory"
],
"url": "https://labanskoller.se/blog/2021/03/23/the-devise-extension-that-peeled-off-one-layer-of-the-security-onion-cve-2021-28680/"
}
]
}
},
"impact": {
"baseMetricV2": {
"acInsufInfo": false,
"cvssV2": {
"accessComplexity": "MEDIUM",
"accessVector": "NETWORK",
"authentication": "NONE",
"availabilityImpact": "PARTIAL",
"baseScore": 6.8,
"confidentialityImpact": "PARTIAL",
"integrityImpact": "PARTIAL",
"vectorString": "AV:N/AC:M/Au:N/C:P/I:P/A:P",
"version": "2.0"
},
"exploitabilityScore": 8.6,
"impactScore": 6.4,
"obtainAllPrivilege": false,
"obtainOtherPrivilege": false,
"obtainUserPrivilege": false,
"severity": "MEDIUM",
"userInteractionRequired": false
},
"baseMetricV3": {
"cvssV3": {
"attackComplexity": "HIGH",
"attackVector": "NETWORK",
"availabilityImpact": "HIGH",
"baseScore": 8.1,
"baseSeverity": "HIGH",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
},
"exploitabilityScore": 2.2,
"impactScore": 5.9
}
},
"lastModifiedDate": "2021-12-13T18:28Z",
"publishedDate": "2021-12-07T21:15Z"
}
}
}
Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline
Sightings and recorded dates, grouped by day · UTC
How durations are calculated
Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.
Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.
Loading timeline…
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.