5.5

CVE-2022-41946: TemporaryFolder on unix-like systems does not limit access to created files in pgjdbc

Modified
AliasesSUSE-SU-2023:0103-1SUSE-SU-2023:0104-1SUSE-SU-2023:0451-1
Published 23-11-2022Last modified 03-11-2025

Vulnerability summary

CVE-2022-41946 is a medium (CVSS 5.5) vulnerability in debian debian_linux. EPSS estimates a 0.57% chance of exploitation in the next 30 days, higher than 48.5% of scored vulnerabilities. 1 public exploit is recorded.

Priority
Routine

Not severe (CVSS 4.7, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.5/10
010
Medium · v3.1 (NVD)
EPSS score
0.57%
0%100%
Low · +0.02 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits1github

Advisory lineage

Upstream 0 · Downstream 2

Timeline

  1. 23-11-2022
    PublishedVulnerability first disclosed.
  2. 03-11-2025
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

7 scores · 7 sources · 1 version

EPSS trend

Probability

0.57%

Chance of exploitation in the next 30 days

Percentile

49%

Versus all other CVEs

30-day change

Increase +0.02 pp

From 0.55% on 04-11-2026

04-11-202604-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

1 found
  • githubUnverified

    Pgjdbc

    Maturity: poc

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat25 products
  • candlepin< 0:4.1.20-1.el8sat
  • candlepin-selinux< 0:4.1.20-1.el8sat
  • ovirt-ansible-collection< 0:2.4.2-1.el8ev
  • ovirt-engine< 0:4.5.3.7-1.el8ev
  • ovirt-engine-backend< 0:4.5.3.7-1.el8ev
Suse5 products
  • postgresql-jdbc&distro=SUSE Linux Enterprise Module for Server Applications 15 SP4< 42.2.25-150400.3.9.2
  • postgresql-jdbc&distro=SUSE Linux Enterprise Real Time 15 SP3< 42.2.25-150300.3.11.2
  • postgresql-jdbc&distro=SUSE Linux Enterprise Server 12 SP5< 9.4-3.9.1
  • postgresql-jdbc&distro=SUSE Linux Enterprise Server for SAP Applications 12 SP5< 9.4-3.9.1
  • postgresql-jdbc&distro=SUSE Manager Server Module 4.2< 42.2.25-150300.3.11.2
Debian2 products
Alpine1 product
  • java-postgresql-jdbc< 42.5.1-r0
Opensuse1 product
  • postgresql-jdbc&distro=openSUSE Leap 15.4< 42.2.25-150400.3.9.2
Org.postgresql1 product
  • postgresql≥ 42.2.0, < 42.2.27 | ≥ 42.3.0, < 42.3.8 | ≥ 42.4.0, < 42.4.3 | ≥ 42.5.0, < 42.5.1
Pgjdbc1 product
  • 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
Postgresql1 product
  • postgresql_jdbc_driver≥ 42.2.0, < 42.2.27 | ≥ 42.3.0, < 42.3.8 | ≥ 42.4.0, < 42.4.3 | 42.5.0 | 42.5.0:rc1
Ubuntu1 product
  • libpgjavaAll versions (No fix recorded)

9 vendors · 38 products

References

52 links
Show all 52 references