Skip to content
Noroxi
NVD / CVE Program· CNA GitHub_M

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

Noroxi assessment

Priority: Monitor (action score 22/100)

  • The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
  • Probability of exploitation in the next 30 days: 0.54% (FIRST EPSS).
  • Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
  • Fixed version: pgjdbc pgjdbc 4.5.0.

Low priority for now. Upgrade to pgjdbc pgjdbc 4.5.0 or later.

Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it

Primary sources: NVD · CVE.org · FIRST EPSS

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.

MediumCVSS 5.5 · v3.1—No exploit Fix available
Published
Nov 23, 2022
Updated
Jun 17, 2026
EPSS
0.5% · 45th percentile

Report tools

JSON

Action score

22

Monitor

Low priority for now.

CVSS
22 / 40 · 5.5 / 10
CISA KEV
0 / 30 · Not listed
EPSS
0 / 30 · 0.5%

CNA vs NVD score

NVD
5.5
CNA · GitHub_M
4.7
0.8 point gap

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

The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.

Get told when this record changes

  • Not in KEV: no record of exploitation in the wild
  • No public exploit code on record
  • A fix has been released

If any of these changes, we'll tell you in the daily email digest.

Follow CVE-2022-41946

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits instantly.

Your free account also gets you

Running WordPress? Scan your site free with WP Lens

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Running WordPress? Scan your site free with WP Lens

Is your version affected? Check it

Noroxi analysis

What does it mean in your environment?

The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.

We use this product, ask for help

Affected systems

Is your version affected?

Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.

VendorProduct
postgresqlpostgresql jdbc driver
debiandebian linux

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • debian debian linux10.0
  • postgresql postgresql jdbc driver42.2.0 and later · before 42.2.27
  • postgresql postgresql jdbc driver42.3.0 and later · before 42.3.8
  • postgresql postgresql jdbc driver42.4.0 and later · before 42.4.3
  • postgresql postgresql jdbc driver42.5.0

Versions reported by the vendor

Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.

  • pgjdbc pgjdbc

    • >= 42.2.0, < 42.2.27, > 42.3.0, < 42.3.8, >= 42.4.0, < 42.4.3, >= 42.5.0, < 42.5.1affected

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
AlmaLinux:8postgresql-jdbcbefore 42.2.14-2.el842.2.14-2.el8
AlmaLinux:8postgresql-jdbc-javadocbefore 42.2.14-2.el842.2.14-2.el8
AlmaLinux:9postgresql-jdbcbefore 42.2.27-1.el942.2.27-1.el9
Debian:10libpgjavabefore 42.2.5-2+deb10u342.2.5-2+deb10u3
Debian:11libpgjavabefore 42.2.15-1+deb11u242.2.15-1+deb11u2
Debian:12libpgjavabefore 42.5.1-142.5.1-1
Mavenorg.postgresql:postgresqlfrom 42.2.0 · before 42.2.2742.2.27
Mavenorg.postgresql:postgresqlfrom 42.3.0 · before 42.3.842.3.8
Mavenorg.postgresql:postgresqlfrom 42.4.0 · before 42.4.342.4.3
Mavenorg.postgresql:postgresqlfrom 42.5.0 · before 42.5.142.5.1
openSUSE:Leap 15.4postgresql-jdbcbefore 42.2.25-150400.3.9.242.2.25-150400.3.9.2
Red Hat:enterprise_linux:8::appstreampostgresql-jdbcbefore 0:42.2.14-2.el80:42.2.14-2.el8
Red Hat:enterprise_linux:8::appstreampostgresql-jdbc-javadocbefore 0:42.2.14-2.el80:42.2.14-2.el8
Red Hat:enterprise_linux:9::appstreampostgresql-jdbcbefore 0:42.2.27-1.el90:42.2.27-1.el9
Red Hat:rhev_hypervisor:4.4::el8ovirt-ansible-collectionbefore 0:2.4.2-1.el8ev0:2.4.2-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-enginebefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-backendbefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-dbscriptsbefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-health-check-bundlerbefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-restapibefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-setupbefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-setup-basebefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-setup-plugin-cinderlibbefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev
Red Hat:rhev_manager:4.4:el8ovirt-engine-setup-plugin-imageiobefore 0:4.5.3.7-1.el8ev0:4.5.3.7-1.el8ev

+18

Other highest-scoring records for the same primary product.

  • CVE-2024-1597pgjdbc SQL Injection via line comment generation
    40Plan
  • CVE-2022-26520In pgjdbc before 42.3.3, an attacker (who controls the jdbc URL or properties) can call java.util.logging.FileHandler to write to arbitrary
    40Plan
  • CVE-2022-21724Unchecked Class Instantiation when providing Plugin Classes
    40Plan

Published before and after this one in the same product

  • ← EarlierCVE-2020-13692Jun 4, 2020 · PostgreSQL JDBC Driver (aka PgJDBC) before 42.2.13 allows XXE.
    31Monitor
  • ← EarlierCVE-2022-31197Aug 3, 2022 · SQL Injection in ResultSet.refreshRow() with malicious column names in pgjdbc
    33Monitor
  • Later →CVE-2025-49146Jun 11, 2025 · pgjdbc Client Allows Fallback to Insecure Authentication Despite channelBinding=require Configuration
    23Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
pgjdbc pgjdbc4.5.0 · descriptionVendor (CNA)
almalinux:postgresql-jdbc42.2.27-1.el9 · AlmaLinux:9Package registry (OSV)
almalinux:postgresql-jdbc-javadoc42.2.14-2.el8 · AlmaLinux:8Package registry (OSV)
debian:libpgjava42.5.1-1 · Debian:12Package registry (OSV)
Maven:org.postgresql:postgresql42.2.27Package registry (OSV)
Maven:org.postgresql:postgresql42.3.8Package registry (OSV)
Maven:org.postgresql:postgresql42.4.3Package registry (OSV)
Maven:org.postgresql:postgresql42.5.1Package registry (OSV)
opensuse:postgresql-jdbc42.2.25-150400.3.9.2 · openSUSE:Leap 15.4Package registry (OSV)
red hat:ovirt-ansible-collection0:2.4.2-1.el8ev · Red Hat:rhev_hypervisor:4.4::el8Package registry (OSV)
red hat:ovirt-engine0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-backend0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-dbscripts0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-health-check-bundler0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-restapi0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup-base0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup-plugin-cinderlib0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup-plugin-imageio0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup-plugin-ovirt-engine0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
red hat:ovirt-engine-setup-plugin-ovirt-engine-common0:4.5.3.7-1.el8ev · Red Hat:rhev_manager:4.4:el8Package registry (OSV)
suse:postgresql-jdbc42.2.25-150400.3.9.2 · SUSE:Linux Enterprise Module for Server Applications 15 SP4Package registry (OSV)

Exploit status

No known public exploit

No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

No dated events beyond publication.

EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Someone with local access to the system can trigger it.
  • A low-privileged account is enough.
  • No user action is required.
  • No special conditions are required; it is repeatable.

If successful

Confidentiality
high · data can be read
Integrity
none
Availability
none
Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality impact
High
Integrity impact
None
Availability impact
None

CVSS vector

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

nvd-primary

Root cause

The extension requests broader permissions than its function needs and sends the data it collects out for purposes beyond its stated function.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

json
{  "permissions": ["tabs", "<all_urls>"],  "background": { "service_worker": "analytics.js" }}

Fixed

json
{  "permissions": ["activeTab"],  "host_permissions": ["https://yildiz.example/*"]}

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records