CVE-2022-41946
published 2022-11-23CVE-2022-41946: pgjdbc is an open source postgresql JDBC Driver. In affected versions a prepared statement using either `PreparedStatement.setText(int, InputStream)` or…
PriorityP424medium5.5CVSS 3.1
AVLACLPRLUINSUCHINAN
EPSS
0.48%
37.8th percentile
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.
Affected
7 ranges
| Vendor | Product | Version range | Fixed in |
|---|---|---|---|
| debian | debian_linux | — | — |
| debian | libpgjava | < libpgjava 42.5.1-1 (bookworm) | libpgjava 42.5.1-1 (bookworm) |
| lightbend | akka_http | < 10.5.2 | 10.5.2 |
| postgresql | postgresql_jdbc_driver | — | — |
| postgresql | postgresql_jdbc_driver | >= 42.2.0 < 42.2.27 | 42.2.27 |
| postgresql | postgresql_jdbc_driver | >= 42.3.0 < 42.3.8 | 42.3.8 |
| postgresql | postgresql_jdbc_driver | >= 42.4.0 < 42.4.3 | 42.4.3 |
CVSS provenance
nvdv3.15.5MEDIUMCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
osv5.5MEDIUM
vendor_debian4.7MEDIUM
vendor_redhat4.7MEDIUM
Stop checking back — get the weekly exploitation signal.
Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.
GHSA
GHSA-9f9g-qwcw-j94j: When Akka HTTP before 10
ghsa_unreviewed·2023-05-21·CVSS 4.7
CVE-2023-33251 [MEDIUM] CWE-732 GHSA-9f9g-qwcw-j94j: When Akka HTTP before 10
When Akka HTTP before 10.5.2 accepts file uploads via the FileUploadDirectives.fileUploadAll directive, the temporary file it creates has too weak permissions: it is readable by other users on Linux or UNIX, a similar issue to CVE-2022-41946.
OSV
CVE-2022-41946: pgjdbc is an open source postgresql JDBC Driver
osv·2022-11-23·CVSS 5.5
CVE-2022-41946 [MEDIUM] CVE-2022-41946: pgjdbc is an open source postgresql JDBC Driver
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 syst
OSV
TemporaryFolder on unix-like systems does not limit access to created files
osv·2022-11-23
CVE-2022-41946 [MEDIUM] TemporaryFolder on unix-like systems does not limit access to created files
TemporaryFolder on unix-like systems does not limit access to created files
**Vulnerability**
`PreparedStatement.setText(int, InputStream)`
and
`PreparedStatemet.setBytea(int, InputStream)`
will create a temporary file if the InputStream is larger than 51k
Example of vulnerable code:
```java
String s = "some very large string greater than 51200 bytes";
PreparedStatement.setInputStream(1, new ByteArrayInputStream(s.getBytes()) );
```
This will create a temporary file which is readable by other users on Unix like systems, but not MacOS.
Impact
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.
GHSA
TemporaryFolder on unix-like systems does not limit access to created files
ghsa·2022-11-23
CVE-2022-41946 [MEDIUM] CWE-200 TemporaryFolder on unix-like systems does not limit access to created files
TemporaryFolder on unix-like systems does not limit access to created files
**Vulnerability**
`PreparedStatement.setText(int, InputStream)`
and
`PreparedStatemet.setBytea(int, InputStream)`
will create a temporary file if the InputStream is larger than 51k
Example of vulnerable code:
```java
String s = "some very large string greater than 51200 bytes";
PreparedStatement.setInputStream(1, new ByteArrayInputStream(s.getBytes()) );
```
This will create a temporary file which is readable by other users on Unix like systems, but not MacOS.
Impact
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.
Red Hat
postgresql-jdbc: Information leak of prepared statement data due to insecure temporary file permissions
vendor_redhat·2022-11-23·CVSS 4.7
CVE-2022-41946 [MEDIUM] CWE-200 postgresql-jdbc: Information leak of prepared statement data due to insecure temporary file permissions
postgresql-jdbc: Information leak of prepared statement data due to insecure temporary file permissions
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 di
Debian
CVE-2022-41946: libpgjava - pgjdbc is an open source postgresql JDBC Driver. In affected versions a prepared...
vendor_debian·2022·CVSS 4.7
CVE-2022-41946 [MEDIUM] CVE-2022-41946: libpgjava - pgjdbc is an open source postgresql JDBC Driver. In affected versions a prepared...
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 syst
No detection rules found.
No public exploits indexed.
No writeups or analysis indexed.
https://github.com/pgjdbc/pgjdbc/commit/9008dc9aade6dbfe4efafcd6872ebc55f4699cf5https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8hhttps://lists.debian.org/debian-lts-announce/2022/12/msg00003.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/25TY2L3RMVNOC7VAHJEAO7PTT6M6JJAD/https://security.netapp.com/advisory/ntap-20240329-0003/https://github.com/pgjdbc/pgjdbc/commit/9008dc9aade6dbfe4efafcd6872ebc55f4699cf5https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8hhttps://lists.debian.org/debian-lts-announce/2022/12/msg00003.htmlhttps://lists.debian.org/debian-lts-announce/2024/12/msg00017.htmlhttps://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/25TY2L3RMVNOC7VAHJEAO7PTT6M6JJAD/https://security.netapp.com/advisory/ntap-20240329-0003/
2022-11-23
Published