Security readout for executives and security teams
Plain-English summary
This flaw affects Java applications using vulnerable pgjdbc versions when they call ResultSet.refreshRow() on database results from attacker-influenced schemas. A malicious column name could cause extra SQL to run as the application's JDBC user. Most applications are unaffected unless that uncommon method and exposure pattern exist.
Executive priority
Prioritize remediation for Java systems that combine vulnerable pgjdbc, refreshRow() usage, and multi-tenant or user-controlled database schemas. For typical applications that never call refreshRow(), business urgency is lower, but dependency upgrades should still be scheduled.
Technical view
pgjdbc failed to escape column names inside ResultSet.refreshRow(). If an attacker can cause the application to query a table with malicious column names and refresh the row, injected SQL may execute with the JDBC user's privileges. Fixed releases are 42.2.26 and 42.4.1.
Likely exposure
Exposure is likely limited to Java services using pgjdbc 42.2.0-42.2.25 or 42.3.0-42.4.0 that call ResultSet.refreshRow(). Risk rises where applications query schemas, tables, or databases controlled by less-privileged or untrusted users.
Exploitation context
The advisory describes high attack complexity, low privileges, and required user interaction. The attacker must influence database object names and cause application behavior that invokes refreshRow(). The source bundle does not report active exploitation, and KEV status is false.
Researcher notes
Focus validation on the call path and privilege boundary, not only package presence. The important scenario is a privileged JDBC user reading attacker-controlled schema objects. Sources state no known workaround and identify fixed pgjdbc releases.
Mitigation direction
- Upgrade pgjdbc to 42.2.26, 42.4.1, or a later fixed release.
- Update distro packages such as libpgjava using Fedora or Debian security updates where applicable.
- Review applications for ResultSet.refreshRow() use with PostgreSQL JDBC ResultSets.
- Avoid privileged JDBC accounts querying schemas or tables controlled by less-privileged users.
- If immediate upgrade is blocked, check current pgjdbc vendor guidance because sources name no workaround.
Validation and detection
- Inventory Maven, Gradle, and packaged Java applications for affected pgjdbc versions.
- Search application code for ResultSet.refreshRow() calls against PostgreSQL ResultSets.
- Confirm whether services query schemas or tables writable by untrusted users.
- Verify deployed artifacts use the upgraded pgjdbc or patched distro package.
- Review JDBC account privileges for unnecessary elevated database permissions.
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.
CWE-89: Database access and collection lookup
Injection into data stores can inform collection, data access, and exfiltration detection reviews. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupDatabase behavior lookup
The CVE wording references database injection or access, so collection and exfiltration review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
Open ATT&CK lookupCVE-2022-31197 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
- High
- CVSS
- 7.1 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
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 vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H1.25.9Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
7.1HighVector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-r38f-c4h4-hqq2CVE reference
- https://github.com/pgjdbc/pgjdbc/commit/739e599d52ad80f8dcd6efedc6157859b1a9d637CVE reference
- FEDORA-2022-d7d49b2facCVE reference · vendor-advisory
- FEDORA-2022-cdeabe1bc0CVE reference · vendor-advisory
- [debian-lts-announce] 20221008 [SECURITY] [DLA 3140-1] libpgjava security updateCVE reference · mailing-list
- https://lists.debian.org/debian-lts-announce/2024/12/msg00017.htmlCVE reference
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.
