CVE-2022-41946 in Debian Linux and 1 more product
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...
Affects 2 products from 2 vendors. Facts below cite their sources.
Requires local access, low complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Debian | Debian Linux | 10.0 |
| Postgresql | Postgresql Jdbc Driver | 42.5.0 ≥ 42.2.0, < 42.2.27 ≥ 42.3.0, < 42.3.8 ≥ 42.4.0, < 42.4.3 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2022-41946 |
|---|---|
| BreachSpider ID | BS-2022-GLOBAL-333881-M |
| CVSS vector | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| Published | 2022-11-23 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-200: Exposure of Sensitive Information
Application reveals restricted data such as system internals, credentials, or user data to unauthorized actors.
CWE-377: CWE-377
CWE-668: CWE-668
Related attack patterns (CAPEC)
CAPEC-13 Subverting Environment Variable Values via CWE-200
CAPEC-59 Session Credential Falsification through Prediction via CWE-200
CAPEC-60 Reusing Session IDs (aka Session Replay) via CWE-200
CAPEC-79 Using Slashes in Alternate Encoding via CWE-200
CAPEC-149 Explore for Predictable Temporary File Names via CWE-377
Show all 61
CAPEC-155 Screen Temporary Files for Sensitive Information via CWE-377
CAPEC-285 ICMP Echo Request Ping via CWE-200
CAPEC-287 TCP SYN Scan via CWE-200
CAPEC-290 Enumerate Mail Exchange (MX) Records via CWE-200
CAPEC-291 DNS Zone Transfers via CWE-200
CAPEC-293 Traceroute Route Enumeration via CWE-200
CAPEC-294 ICMP Address Mask Request via CWE-200
CAPEC-295 Timestamp Request via CWE-200
CAPEC-296 ICMP Information Request via CWE-200
CAPEC-297 TCP ACK Ping via CWE-200
CAPEC-298 UDP Ping via CWE-200
CAPEC-299 TCP SYN Ping via CWE-200
CAPEC-301 TCP Connect Scan via CWE-200
CAPEC-302 TCP FIN Scan via CWE-200
CAPEC-303 TCP Xmas Scan via CWE-200
CAPEC-304 TCP Null Scan via CWE-200
CAPEC-305 TCP ACK Scan via CWE-200
CAPEC-306 TCP Window Scan via CWE-200
CAPEC-307 TCP RPC Scan via CWE-200
CAPEC-308 UDP Scan via CWE-200
CAPEC-310 Scanning for Vulnerable Software via CWE-200
CAPEC-317 IP ID Sequencing Probe via CWE-200
CAPEC-318 IP 'ID' Echoed Byte-Order Probe via CWE-200
CAPEC-319 IP (DF) 'Don't Fragment Bit' Echoing Probe via CWE-200
CAPEC-320 TCP Timestamp Probe via CWE-200
CAPEC-321 TCP Sequence Number Probe via CWE-200
CAPEC-322 TCP (ISN) Greatest Common Divisor Probe via CWE-200
CAPEC-323 TCP (ISN) Counter Rate Probe via CWE-200
CAPEC-324 TCP (ISN) Sequence Predictability Probe via CWE-200
CAPEC-325 TCP Congestion Control Flag (ECN) Probe via CWE-200
CAPEC-326 TCP Initial Window Size Probe via CWE-200
CAPEC-327 TCP Options Probe via CWE-200
CAPEC-328 TCP 'RST' Flag Checksum Probe via CWE-200
CAPEC-329 ICMP Error Message Quoting Probe via CWE-200
CAPEC-330 ICMP Error Message Echoing Integrity Probe via CWE-200
CAPEC-472 Browser Fingerprinting via CWE-200
CAPEC-508 Shoulder Surfing via CWE-200
CAPEC-643 Identify Shared Files/Directories on System via CWE-200
CAPEC-292 Host Discovery via CWE-200
CAPEC-300 Port Scanning via CWE-200
CAPEC-309 Network Topology Mapping via CWE-200
CAPEC-312 Active OS Fingerprinting via CWE-200
CAPEC-313 Passive OS Fingerprinting via CWE-200
CAPEC-497 File Discovery via CWE-200
CAPEC-573 Process Footprinting via CWE-200
CAPEC-574 Services Footprinting via CWE-200
CAPEC-575 Account Footprinting via CWE-200
CAPEC-576 Group Permission Footprinting via CWE-200
CAPEC-577 Owner Footprinting via CWE-200
CAPEC-616 Establish Rogue Location via CWE-200
CAPEC-646 Peripheral Footprinting via CWE-200
CAPEC-651 Eavesdropping via CWE-200
CAPEC-22 Exploiting Trust in Client via CWE-200
CAPEC-116 Excavation via CWE-200
CAPEC-169 Footprinting via CWE-200
CAPEC-224 Fingerprinting via CWE-200
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2022-41946 affects pgjdbc, an open-source PostgreSQL JDBC Driver, by creating a temporary file readable by other users on Unix-like systems when using specific PreparedStatement methods with large InputStreams.
An attacker could exploit this vulnerability by leveraging the creation of a readable temporary file to access sensitive data on Unix-like systems, potentially leading to data leakage.
Questions
What is CVE-2022-41946?
CVE-2022-41946 affects pgjdbc, an open-source PostgreSQL JDBC Driver, by creating a temporary file readable by other users on Unix-like systems when using specific PreparedStatement methods with large InputStreams.
What is the CVSS score for CVE-2022-41946?
CVE-2022-41946 has CVSS 5.5 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N. EPSS: 0.4%.
Is CVE-2022-41946 actively exploited?
No confirmed active exploitation of CVE-2022-41946 as of 2026-09-25.
How do I remediate CVE-2022-41946?
Priority: MEDIUM.
What systems are affected by CVE-2022-41946?
CVE-2022-41946 affects Debian Debian Linux; Postgresql Postgresql Jdbc Driver.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Debian","product":"Debian Linux","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.