# What is CVE-2022-41946?

> CVE-2022-41946 is a medium-severity flaw (CVSS 5.5) in Postgresql Jdbc Driver, published on 23 November 2022. It is not on the list of flaws known to be exploited today. The latest forecast puts its chance of use in the next 30 days at 0.5%. If you run an affected version, plan in the vendor’s fix.

Canonical page: https://www.precursorintelligence.com/what-is/cve-2022-41946

## At a glance

- **Verdict:** Plan it in. No sign of exploitation and a low forecast. Patch it in your normal update cycle.
- **Precursor Intelligence risk score:** 41 out of 100 (Medium); action: Plan remediation. Kept up to date as the evidence changes.
- **Severity:** Medium (CVSS 5.5 out of 10)
- **Known to be exploited:** No, not on the list of flaws known to be exploited today
- **Chance of use in the next 30 days:** 0.5% (latest exploit-likelihood forecast)
- **Published:** 23 November 2022
- **Record last updated:** 3 November 2025
- **Main product:** Postgresql Jdbc Driver
- **Affected products:** 2

## What is CVE-2022-41946? In plain terms

An attacker has to be already on the device with an ordinary user account, and nobody has to click anything. If it works, the attacker can read data.

### The official 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.

### What kind of flaw is it?

- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
- CWE-668: Exposure of Resource to Wrong Sphere
- CWE-377: Insecure Temporary File

### How an attack on it works

- Where an attacker can be: Already on the device
- How hard it is to pull off: Easy: no special conditions
- Login needed first: An ordinary user account
- Does someone have to click: No, nobody has to do anything
- What an attacker gets: Can read data

Severity vector: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## Is CVE-2022-41946 being exploited? Not that we know of

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 0.5%. That can change at any time, which is why we keep watching.

Exploit likelihood over the last 7 days: 0.5%, 0.5%, 0.5%, 0.5%, 0.5%, 0.5%, 0.5%.

### Timeline

- 23 November 2022: Published
- 3 November 2025: Record last updated

### How Precursor Intelligence ranks it

CVE-2022-41946 scores **41 out of 100 (Medium)**, with the action "Plan remediation".

Every published flaw gets a risk score from 0 to 100, kept up to date as the evidence changes. Four things go into the score, from the one that counts most to the ones that count less:

- Evidence it is being exploited: biggest factor
- How severe it is: strong factor
- How widely exposed it is: smaller factor
- Threat activity around it: smaller factor

85 and above is Critical. Anything confirmed as exploited is always marked for an emergency patch, whatever its score. When this flaw matches software you track, it lands in your list with its score and the reasons behind it.

## Who is affected by CVE-2022-41946?

The published record lists 2 products. Versions are as published: "42.2.0 to before 42.2.27" means from 42.2.0 up to, but not including, 42.2.27.

- [Postgresql Jdbc Driver](https://www.precursorintelligence.com/product/postgresql/postgresql_jdbc_driver) by [PostgreSQL](https://www.precursorintelligence.com/vendors/postgresql) (Application): 42.2.0 to before 42.2.27, 42.3.0 to before 42.3.8, 42.4.0 to before 42.4.3, 42.5.0-rc1, 42.5.0
- [Debian Linux](https://www.precursorintelligence.com/product/debian/debian_linux) by [Debian](https://www.precursorintelligence.com/vendors/debian) (Operating system): 10.0

## How do I fix CVE-2022-41946?

1. **Check whether you run it.** Compare your versions with the affected products above. Not sure what you run? Precursor Intelligence can work it out from your public website, or you can pick it from a list.
2. **Apply the vendor’s fix.** Install the update named in the vendor’s advisory. We’ve put the advisories and patch notes first in the list.
3. **If you can’t patch today.** Follow any mitigation the vendor publishes, and limit who can reach the affected system from the internet until the update is in.
4. **Keep an eye on it.** Track the product and we tell you as soon as we spot this flaw on the list of exploited flaws, or a jump in its exploit likelihood.

### References

- [github.com](https://github.com/pgjdbc/pgjdbc/commit/9008dc9aade6dbfe4efafcd6872ebc55f4699cf5) (Patch)
- [github.com](https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h) (Exploit, Patch, Third-party advisory)
- [lists.debian.org](https://lists.debian.org/debian-lts-announce/2022/12/msg00003.html) (Mailing list, Third-party advisory)
- [lists.fedoraproject.org](https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/25TY2L3RMVNOC7VAHJEAO7PTT6M6JJAD/)
- [security.netapp.com](https://security.netapp.com/advisory/ntap-20240329-0003/)
- [lists.debian.org](https://lists.debian.org/debian-lts-announce/2024/12/msg00017.html)

## Questions

### What is CVE-2022-41946?

CVE-2022-41946 is a medium-severity flaw in Postgresql Jdbc Driver, published on 23 November 2022. An attacker has to be already on the device with an ordinary user account, and nobody has to click anything. If it works, the attacker can read data.

### How serious is CVE-2022-41946?

It scores 5.5 out of 10 on the CVSS severity scale, which is medium. Our risk score for CVE-2022-41946 is 41 out of 100, which is Medium. Its action is "Plan remediation". No sign of exploitation and a low forecast. Patch it in your normal update cycle.

### Is CVE-2022-41946 being exploited?

It is not on the list of flaws known to be exploited today. The latest forecast puts the chance of it being used in the next 30 days at 0.5%. That can change at any time, which is why we keep watching.

### Which versions does CVE-2022-41946 affect?

For Postgresql Jdbc Driver: 42.2.0 to before 42.2.27, 42.3.0 to before 42.3.8, 42.4.0 to before 42.4.3, 42.5.0-rc1, 42.5.0. The record lists 2 products in all, each with its versions, under "Who is affected" on this page.

### How do I fix CVE-2022-41946?

Install the update the vendor names in its advisory, linked first under "How do I fix" on this page. If you can't patch today, follow the vendor's mitigation and limit who can reach the affected system from the internet.

## Does CVE-2022-41946 affect you?

Precursor Intelligence keeps checking for you:

- **Tell us what you run.** Pick your software from a list, or let us work it out from your website.
- **We match it to every flaw.** Over 400,000 published flaws, checked against your list.
- **Ranked by real-world risk.** Every flaw gets a 0 to 100 risk score, kept up to date, led by evidence criminals are using it.
- **Told as soon as we know.** An alert by email, in the app or by webhook to your own tools.

Start free (no card, nothing to install): https://www.precursorintelligence.com/register
Book a demo: https://www.precursorintelligence.com/contact

