Skip to main content
MEDIUM

CVE-2022-41946

CVSS v3

5.5

MEDIUM

EPSS Score

0.5 %

exploit probability, as of 2026-10-19

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for postgresql.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • org.postgresql:postgresqlMavenfrom 42.5.0 · fixed in 42.5.1
  • postgresql-jdbc-driverBitnamifrom 42.2.0 · fixed in 42.2.27
  • postgresql-jdbcAlmaLinux:9all versions · fixed in 42.2.27-1.el9
  • postgresql-jdbcAlmaLinux:8all versions · fixed in 42.2.14-2.el8and 1 other package

Vendor advisories

  • CVE-2022-41946 Red Hat Product Security18 products fixed · 12 known affected

    postgresql-jdbc: Information leak of prepared statement data due to insecure temporary file permissions

    postgresql-jdbc as a component of Red Hat Enterprise Linux 6 · postgresql-jdbc.src as a component of Red Hat Enterprise Linux 6 · postgresql-jdbc as a component of Red Hat Enterprise Linux 7

  • RHSA-2023:3954 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Fuse 7.12 release and security update

  • RHSA-2023:3906 Red Hat Product Security1 product fixed

    Red Hat Security Advisory: Red Hat Integration Camel K 1.10.1 release security update

  • RHSA-2023:2867 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: postgresql-jdbc security update

  • RHSA-2023:2378 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: postgresql-jdbc security update

  • RHSA-2023:2097 Red Hat Product Security3 products fixed

    Red Hat Security Advisory: Satellite 6.13 Release

7 more advisories

Full record on NVD

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.

Technical details

Published
2022-11-23

Frequently asked questions

What is CVE-2022-41946?

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.

Is CVE-2022-41946 actively exploited?

Active exploitation of CVE-2022-41946 has not been confirmed. Its EPSS score was 0.5% on 2026-10-19, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2022-41946?

CVE-2022-41946 has a CVSS v3 base score of 5.5 (MEDIUM severity).

Running postgresql? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month