Home / pgjdbc / pgjdbc / CVE-2022-41946
CVE-2022-41946: is it exploited, and which versions of pgjdbc are affected and fixed?
CVE-2022-41946 is an information disclosure vulnerability in pgjdbc. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:38 UTC). Affected: org.postgresql:postgresql from 42.2.0 before 42.2.27, org.postgresql:postgresql from 42.3.0 before 42.3.8, org.postgresql:postgresql from 42.4.0 before 42.4.3 and 1 more (GitHub advisory GHSA-562r-vg33-8x8h). Fixed in 42.2.27, 42.3.8, 42.4.3 and 42.5.1 (GitHub advisory GHSA-562r-vg33-8x8h). Severity: Medium (4.7, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:38 UTC, CVE record November 19, 2026, 07:14 UTC and NVD November 19, 2026, 07:43 UTC.
What is CVE-2022-41946?
TemporaryFolder on unix-like systems does not limit access to created files in pgjdbc
pgjdbc is an open source postgresql JDBC Driver. In affected versions a prepared statement using either `PreparedStatement.setText(int, InputStream)` or `PreparedStatemet.setBytea(int, InputStream)` will create a temporary file if the InputStream is larger than 2k. This will create a temporary file which is readable by other users on Unix like systems, but not MacOS. On Unix like systems, the system's temporary directory is shared between all users on that system. Because of this, when files and directories are written into this directory they are, by default, readable by other users on that same system. This vulnerability does not allow other users to overwrite the contents of these directories or files. This is purely an information disclosure vulnerability. Because certain JDK file system APIs were only added in JDK 1.7, this this fix is dependent upon the version of the JDK you are using. Java 1.7 and higher users: this vulnerability is fixed in 4.5.0. Java 1.6 and lower users: no patch is available. If you are unable to patch, or are stuck running on Java 1.6, specifying the java.io.tmpdir system environment variable to a directory that is exclusively owned by the executing user will mitigate this vulnerability.
From the CVE record by GitHub_M, last updated November 3, 2025, 21:46 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| pgjdbc | pgjdbc | >= 42.2.0, < 42.2.27 > 42.3.0, < 42.3.8 >= 42.4.0, < 42.4.3 >= 42.5.0, < 42.5.1 |
As the CVE record by GitHub_M states it, last updated November 3, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Maven | org.postgresql:postgresql | >= 42.2.0, < 42.2.27 | 42.2.27 | GHSA-562r-vg33-8x8h |
| Maven | org.postgresql:postgresql | >= 42.3.0, < 42.3.8 | 42.3.8 | GHSA-562r-vg33-8x8h |
| Maven | org.postgresql:postgresql | >= 42.4.0, < 42.4.3 | 42.4.3 | GHSA-562r-vg33-8x8h |
| Maven | org.postgresql:postgresql | >= 42.5.0, < 42.5.1 | 42.5.1 | GHSA-562r-vg33-8x8h |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 4, 2025. Summary: TemporaryFolder on unix-like systems does not limit access to created files.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| postgresql | postgresql jdbc driver | from 42.2.0 before 42.2.27 | application |
| postgresql | postgresql jdbc driver | from 42.3.0 before 42.3.8 | application |
| postgresql | postgresql jdbc driver | from 42.4.0 before 42.4.3 | application |
| postgresql | postgresql jdbc driver | 42.5.0 | application |
| debian | debian linux | 10.0 | operating system |
NVD analysis (status Modified), last modified June 17, 2026, 05:04 UTC.
How severe is CVE-2022-41946?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 4.7 | CVSS 3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N | GitHub_M |
| Medium 5.5 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2022-41946 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 0.57% probability of exploitation activity in the next 30 days, percentile 48.5 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
- CWE-377 insecure temporary file
- CWE-668 Exposure of Resource to Wrong Sphere
Where are the vendor advisories and references?
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h
- https://github.com/pgjdbc/pgjdbc/commit/9008dc9aade6dbfe4efafcd6872ebc55f4699cf5
- [debian-lts-announce] 20221202 [SECURITY] [DLA 3218-1] libpgjava security update mailing-list
- FEDORA-2023-42d6ba9bd6 vendor-advisory
- https://security.netapp.com/advisory/ntap-20240329-0003/
- https://lists.debian.org/debian-lts-announce/2024/12/msg00017.html
When was it published, and where is the official record?
- Reserved
- September 30, 2022
- Published
- November 23, 2022, 00:00 UTC
- CVE record updated
- November 3, 2025, 21:46 UTC by GitHub_M
- NVD
- Modified, last modified June 17, 2026, 05:04 UTC
- Last checked
- CVE list November 19, 2026, 07:14 UTC; NVD November 19, 2026, 07:43 UTC; KEV December 3, 2026, 12:38 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect pgjdbc?
- Nov 23, 2026CVE-2026-134847 pgjdbc: numeric Truncation Error
- Nov 23, 2026CVE-2026-134848 pgjdbc: improper Neutralization of Null Byte or NUL Character
- Nov 23, 2026CVE-2026-134846 pgjdbc: authentication bypass by replay
- Nov 23, 2026CVE-2026-134844 pgjdbc: uncontrolled search path (DLL or library hijacking)
- Nov 23, 2026CVE-2026-134845 pgjdbc: improper certificate validation
- Nov 23, 2026CVE-2026-134843 pgjdbc: exceptional condition mishandled
- Nov 23, 2026CVE-2026-134841 pgjdbc: SQL injection
- Nov 23, 2026CVE-2026-134842 pgjdbc: SQL injection
Questions about CVE-2022-41946
Is CVE-2022-41946 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:38 UTC. FIRST's EPSS gives it a 0.57% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of pgjdbc are affected by CVE-2022-41946?
org.postgresql:postgresql from 42.2.0 before 42.2.27, org.postgresql:postgresql from 42.3.0 before 42.3.8, org.postgresql:postgresql from 42.4.0 before 42.4.3 and org.postgresql:postgresql from 42.5.0 before 42.5.1, per the GitHub advisory GHSA-562r-vg33-8x8h. The tables above give every range the sources list.
Which version fixes CVE-2022-41946?
42.2.27, 42.3.8, 42.4.3 and 42.5.1, per the GitHub advisory GHSA-562r-vg33-8x8h. Check the vendor's advisory before you rely on it.
How severe is CVE-2022-41946?
Medium (4.7, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2022-41946?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.