Security readout for executives and security teams
Plain-English summary
A PostgreSQL extension used to change database user context had a privilege-escalation flaw before version 2.0.1. The issue involves RESET SESSION AUTHORIZATION after set_user(). The provided sources do not show active exploitation, CVSS scoring, or broad affected-product metadata.
Executive priority
Treat as a targeted database risk, not a broad platform emergency. Prioritize environments using set_user for privileged workflows or regulated data, and confirm upgrade status.
Technical view
CVE-2021-38140 affects the pgaudit set_user extension module before 2.0.1 for PostgreSQL. The vulnerability allows potential privilege escalation when RESET SESSION AUTHORIZATION is used after set_user(). The source bundle identifies release 2.0.1 as the correction point but provides no CVSS, CWE, CPE, or exploit evidence.
Likely exposure
Exposure is likely limited to PostgreSQL deployments that installed the pgaudit set_user extension before version 2.0.1. Standard PostgreSQL installations without this extension are not identified as affected in the provided sources.
Exploitation context
The source bundle does not cite active exploitation, public weaponization, or inclusion in CISA KEV. The issue still matters because privilege escalation inside a database can affect data access and administrative control.
Researcher notes
Evidence is sparse: the CVE text, GitHub release, and compare link identify the vulnerable version range and fix release, but not root-cause detail, CVSS, CWE, exploit maturity, or affected packaging paths.
Mitigation direction
- Inventory PostgreSQL systems for the pgaudit set_user extension.
- Upgrade set_user to version 2.0.1 or later where applicable.
- Review the pgaudit/set_user 2.0.1 release notes and compare diff.
- Check OS, container, or managed database vendor guidance for packaged versions.
- Limit powerful database roles until affected extension versions are remediated.
Validation and detection
- Confirm whether set_user is installed on each PostgreSQL instance.
- Verify the installed set_user version is 2.0.1 or later.
- Review database role and extension privileges for unnecessary elevated access.
- Check change records for remediation across production, staging, and backups.
Public sources used
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
Privilege behavior lookup
The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2021-38140 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- Unknown
- CVSS
- Not scored
- Known Exploited
- No
- Published
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS and timeline data
No CVSS vectors or timeline events were available in the normalized CVE source material.
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/pgaudit/set_user/compare/REL2_0_0...REL2_0_1CVE reference · x_refsource_MISC
- https://github.com/pgaudit/set_user/releases/tag/REL2_0_1CVE reference · x_refsource_CONFIRM
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
