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.
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
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
Red Hat Security Advisory: Red Hat Fuse 7.12 release and security update
Red Hat Security Advisory: Red Hat Integration Camel K 1.10.1 release security update
Red Hat Security Advisory: postgresql-jdbc security update
Red Hat Security Advisory: postgresql-jdbc security update
Red Hat Security Advisory: Satellite 6.13 Release
7 more advisories
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?
Is CVE-2022-41946 actively exploited?
What is the CVSS score for CVE-2022-41946?
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
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.