CVE-2021-38140: PostgreSQL set_user - Privilege Escalation
- Cve: CVE-2021-38140
- Name: PostgreSQL set_user - Privilege Escalation
- Description: The set_user extension module before 2.0.1 for PostgreSQL allows a potential privilege escalation using RESET SESSION AUTHORIZATION after set_user().
- Impact: Attackers can escalate privileges within the database session, potentially gaining unauthorized access or control.
- Remediation: Update to version 2.0.1 or later.
- Vulnerability type: broken_access_control
- Vulnerability impact: privilege_escalation
- Requirement type: none
- Labels source: projectdiscovery
- Severity: critical
- Cvss score: 9.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.0129
- Epss percentile: 0.70847
- Assignee: [email protected]
- Published at: 2021-08-10T18:15:07Z
- Age in days: 1932
- Modified at: 2026-06-17T04:01:33Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-38140
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-269 | Improper Privilege Management |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/pgaudit/set_user/compare/REL2_0_0...REL2_0_1 | nvd | Patch, Third Party Advisory |
| https://github.com/pgaudit/set_user/releases/tag/REL2_0_1 | nvd | Release Notes, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| set_user_project:set_user | < 2.0.1 | no | nvd | /v1/products/set_user_project/set_user |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| pgaudit/set_user | compare, releases | yes | /v1/repositories/pgaudit/set_user |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts