CVE-2022-41946: Exposure of Resource to Wrong Sphere (CWE-668)
value: 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.
CWE description: The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.
CVSS v3 base score: 5.5
Published: 2022-11-23T20:15Z
Repository: https://github.com/pgjdbc/pgjdbc
Language: Markdown
Files changed: CHANGELOG.md, contributors.json, docs/content/changelogs/2022-11-21-42.5.1-release.md, docs/data/homepagedata.toml, docs/data/versions.toml, docs/layouts/partials/home/info.html, pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
Commit date: 2022-11-23 09:25:08 -0500
Commit message: Merge pull request from GHSA-562r-vg33-8x8h

* Fix: createTempFile vulnerability on unix like systems where temporary files can be read by other users on the system

* Update site with change logs and new version information
Diff: diff --git a/CHANGELOG.md b/CHANGELOG.md
index 27317f09e..d83169e29 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,10 +8,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
 
 ### Added
 
 ### Fixed
 
+[42.5.1] (2022-11-21 15:21:59 -0500)
+### Security
+- security: StreamWrapper spills to disk if setText, or setBytea sends very large Strings or arrays to the server. createTempFile creates a file which can be read by other users on unix like systems (Not macos).
+This has been fixed in this version fixes CVE-2022-41946 see the [security advisory](https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h) for more details. Reported by [Jonathan Leitschuh](https://github.com/JLLeitschuh) This has been fixed in versions 42.5.1, 42.4.3 42.3.8, 42.2.27.jre7. Note there is no fix for 42.2.26.jre6. See the security advisory for work arounds.
+
+### Fixed
+
+- fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes [#Issue 2548](https://github.com/pgjdbc/pgjdbc/issues/2548) [PR #2552](https://github.com/pgjdbc/pgjdbc/issues/2552)
+- fix: binary decoding of bool values [PR #2640](https://github.com/pgjdbc/pgjdbc/pull/2640)
+- perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR #2634](https://github.com/pgjdbc/pgjdbc/pull/2634)
+- chore: fix various spelling errors [PR #2592](https://github.com/pgjdbc/pgjdbc/pull/2592)
+- chore: Feature/urlparser improve URLParser [PR #2641](https://github.com/pgjdbc/pgjdbc/pull/2592)
+
 ## [42.5.0] (2022-08-23 11:20:11 -0400)
 ### Changed
 - fix: revert change in [PR #1986](https://github.com/pgjdbc/pgjdbc/pull/1986) where float was aliased to float4 from float8. 
 float now aliases to float8 [PR #2598](https://github.com/pgjdbc/pgjdbc/pull/2598) fixes [Issue #2597](https://github.com/pgjdbc/pgjdbc/issues/2597) 
 
@@ -741,6 +754,7 @@ thrown to caller to be dealt with so no need to log at this verbosity by pgjdbc
 [42.3.6]: https://github.com/pgjdbc/pgjdbc/compare/REL42.3.5...REL42.3.6
 [42.4.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.3.6...REL42.4.0
 [42.4.1]: https://github.com/pgjdbc/pgjdbc/compare/REL42.4.0...REL42.4.1
 [42.4.2]: https://github.com/pgjdbc/pgjdbc/compare/REL42.4.1...REL42.4.2
 [42.5.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.4.2...REL42.5.0
-[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.0...HEAD
+[42.5.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.0...REL42.5.1
+[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.1...HEAD
diff --git a/contributors.json b/contributors.json
index 33b94f160..a56736e48 100644
--- a/contributors.json
+++ b/contributors.json
@@ -196,7 +196,12 @@
    "paulo-kluh" : "80355988+paulo-kluh@users.noreply.github.com",
    "Dmitriy Mukhin" : "mitya555@users.noreply.github.com",
    "Olivier Bourgain" : "olivierbourgain02@gmail.com",
    "Andrei Lurie" : "alurie@users.noreply.github.com",
    "Sven Diedrichsen" : "sven.diedrichsen@gmail.com",
-   "Sasa Vilic" : "sasavilic@gmail.com"
+   "Sasa Vilic" : "sasavilic@gmail.com",
+   "Evgeniy Devyatykh" : "devyatyh@gmail.com",
+   "Josh Soref" : "2119212+jsoref@users.noreply.github.com",
+   "Kevin222004" : "kevinpatel222004@gmail.com",
+   "Knut Olav Løite" : "koloite@gmail.com",
+   "μtkarsh" : "61664827+utkar-sh-ukla@users.noreply.github.com"
 }
diff --git a/docs/content/changelogs/2022-11-21-42.5.1-release.md b/docs/content/changelogs/2022-11-21-42.5.1-release.md
new file mode 100644
index 000000000..bbf527790
--- /dev/null
+++ b/docs/content/changelogs/2022-11-21-42.5.1-release.md
@@ -0,0 +1,64 @@
+---
+title:  PostgreSQL JDBC Driver 42.5.1 Released
+date:   2022-11-21 15:21:47 -0500
+categories:
+    - new_release
+version: 42.5.1
+---
+**Notable changes**
+
+### Security
+- security: StreamWrapper spills to disk if setText, or setBytea sends very large Strings or arrays to the server. createTempFile creates a file which can be read by other users on unix like systems (Not macos).\
+This has been fixed in this version fixes CVE-2022-41946 see the [security advisory](https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h) for more details.\
+Reported by [Jonathan Leitschuh](https://github.com/JLLeitschuh)\
+This has been fixed in versions 42.5.1, 42.4.3 42.3.8, 42.2.27.jre7.\
+**Note** there is no fix for 42.2.26.jre6. See the security advisory for work arounds.
+
+### Fixed
+
+- fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes [#Issue 2548](https://github.com/pgjdbc/pgjdbc/issues/2548) [PR #2552](https://github.com/pgjdbc/pgjdbc/issues/2552)
+- fix: binary decoding of bool values [PR #2640](https://github.com/pgjdbc/pgjdbc/pull/2640)
+- perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR #2634](https://github.com/pgjdbc/pgjdbc/pull/2634)
+- chore: fix various spelling errors [PR #2592](https://github.com/pgjdbc/pgjdbc/pull/2592)
+- chore: Feature/urlparser improve URLParser [PR #2641](https://github.com/pgjdbc/pgjdbc/pull/2592)
+
+
+<!--more-->
+
+**Commits by author**
+
+Dave Cramer (13):
+  Update README.md [PR 2609](https://github.com/pgjdbc/pgjdbc/pull/2609)\
+  Ignore simplequery for postgresql 8.4 [PR 2614](https://github.com/pgjdbc/pgjdbc/pull/2614)\
+  Single commit to move newdocs into master [PR 2618](https://github.com/pgjdbc/pgjdbc/pull/2618)\
+  update versions [PR 2619](https://github.com/pgjdbc/pgjdbc/pull/2619)\
+  fix grammar, fix downloads, minor edits [PR 2626](https://github.com/pgjdbc/pgjdbc/pull/2626)\
+  fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes #Issue 2548 [PR 2552](https://github.com/pgjdbc/pgjdbc/pull/2552)\
+  clarify prepared statement usage [PR 2629](https://github.com/pgjdbc/pgjdbc/pull/2629)\
+  fix maven coordinates [PR 2631](https://github.com/pgjdbc/pgjdbc/pull/2631)\
+  remove javadoc links for java 17 and above [PR 2637](https://github.com/pgjdbc/pgjdbc/pull/2637)\
+  revert change to PGProperty.get() to keep the API the same [PR 2644](https://github.com/pgjdbc/pgjdbc/pull/2644)\
+  exclude ArrayTest versions less than 9.1 [PR 2645](https://github.com/pgjdbc/pgjdbc/pull/2645)\
+
+Evgeniy Devyatykh (1):
+      perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR 2634](https://github.com/pgjdbc/pgjdbc/pull/2634)
+
+Josh Soref (1):
+      chore: fix various spelling errors [PR 2592](https://github.com/pgjdbc/pgjdbc/pull/2592)
+
+Kevin222004 (1):
+
+Knut Olav Løite (1):
+      fix: binary decoding of bool values [PR 2640](https://github.com/pgjdbc/pgjdbc/pull/2640)
+
+Marek Läll (1):
+      Feature/urlparser improve3 pr1 [PR 2641](https://github.com/pgjdbc/pgjdbc/pull/2641)
+
+Vladimir Sitnikov (4):
+      docs: clarify we ship security fixes by default for the latest 42.x and 42.2 only [PR 2586](https://github.com/pgjdbc/pgjdbc/pull/2586)
+
+μtkarsh (1):
+      Optimize png files [PR 2621](https://github.com/pgjdbc/pgjdbc/pull/2621)
+
+
+    
\ No newline at end of file
diff --git a/docs/data/homepagedata.toml b/docs/data/homepagedata.toml
index 486b546f5..ca6f7c323 100644
--- a/docs/data/homepagedata.toml
+++ b/docs/data/homepagedata.toml
@@ -12,10 +12,15 @@ path = "/icons/api-icon.svg"
 desc = "The current development driver supports eleven server versions and three java environments."
 path = "/icons/driver-icon.svg"
 
 # Releases Info
 
+[[info]]
+date = "21 October 2022"
+url = "/changelogs/2022-11-21-42.5.1-release/"
+version = "42.5.1"
+
 [[info]]
 date = "24 August 2022"
 url = "/changelogs/2022-08-24-42.5.0-release/"
 version = "42.5.0"
 
@@ -28,8 +33,8 @@ version = "42.4.2"
 date = "03 August 2022"
 url = "/changelogs/2022-08-03-42.4.1-release/"
 version = "42.4.1"
 
 [[info]]
-date = "09 JUne 2022"
+date = "09 June 2022"
 url = "/changelogs/2022-06-09-42.4.0-release/"
 version = "42.4.0"
diff --git a/docs/data/versions.toml b/docs/data/versions.toml
index eb0b54949..6b38202ef 100644
--- a/docs/data/versions.toml
+++ b/docs/data/versions.toml
@@ -1,48 +1,43 @@
 # Recent Versions
 
 [[recent]]
 j_name= "Java 8"
-version= "42.5.0"
+version= "42.5.1"
 suffix=""
 description= "If you are using Java 8 or newer then you should use the  JDBC 4.2 version."
-url= "/download/postgresql-42.5.0.jar"
+url= "/download/postgresql-42.5.1.jar"
 
 [[recent]]
 j_name= "Java 7"
-version= "42.2.26"
+version= "42.2.27"
 suffix="jre7"
 description= "If you are using Java 7  then you should use the  JDBC 4.1 version."
-url= "/download/postgresql-42.2.26.jre7.jar"
+url= "/download/postgresql-42.2.27.jre7.jar"
 
 [[recent]]
 j_name= "Java 6"
-version= "42.2.26"
+version= "42.2.27"
 suffix="jre6"
 description= "If you are using Java 6  then you should use the  JDBC 4.0 version."
-url= "/download/postgresql-42.2.26.jre6.jar"
+url= "/download/postgresql-42.2.27.jre6.jar"
 
 # Past Versions
 
 [[past]]
-v_name= "Postgresql JDBC 42.4.0"
-version= "42.4.0"
+v_name= "Postgresql JDBC 42.5.0"
+version= "42.5.0"
 suffix=""
-url= "/download/postgresql-42.4.0.jar"
+url= "/download/postgresql-42.5.0.jar"
 
 [[past]]
-v_name= "Postgresql JDBC 42.3.6"
-version= "42.3.6"
+v_name= "Postgresql JDBC 42.4.2"
+version= "42.4.2"
 suffix=""
-url= "/download/postgresql-42.3.6.jar"
+url= "/download/postgresql-42.4.2.jar"
 
 [[past]]
-v_name= "Postgresql JDBC 42.3.5"
-version= "42.3.5"
+v_name= "Postgresql JDBC 42.3.7"
+version= "42.3.7"
 suffix=""
-url= "/download/postgresql-42.3.5.jar"
+url= "/download/postgresql-42.3.7.jar"
 
-[[past]]
-v_name= "Postgresql JDBC 42.3.4"
-version= "42.3.4"
-suffix=""
-url= "/download/postgresql-42.3.4.jar"
diff --git a/docs/layouts/partials/home/info.html b/docs/layouts/partials/home/info.html
index dc29eef85..6c763b454 100644
--- a/docs/layouts/partials/home/info.html
+++ b/docs/layouts/partials/home/info.html
@@ -13,11 +13,13 @@
     <article class="info__release flow">
         <h2>
             Latest Releases
         </h2>
         <p>
-            pgJDBC has released v42.5.0 on 24 August, 2022. Please see the release notes below.
+            pgJDBC has released v42.5.1 on 21 October, 2022. This is a security release which fixes CVE-2022-41946 
+            see <a href="https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h" >Security Advisory</a>
+            for details
         </p>
         <ul role="list">
             {{ range $.Site.Data.homepagedata.info }}
             <li role="listitem">
                 <strong>{{ .version }}</strong> · {{ .date }} · <a href="{{ .url }}">Notes</a>
diff --git a/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java b/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
index e4d48f7bc..7ff49bc40 100644
--- a/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
+++ b/pgjdbc/src/main/java/org/postgresql/util/StreamWrapper.java
@@ -15,10 +15,11 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.file.Files;
 
 /**
  * Wrapper around a length-limited InputStream.
  *
  * @author Oliver Jowett (oliver@opencloud.com)
@@ -49,11 +50,11 @@ public class StreamWrapper {
       final int memoryLength = copyStream(stream, memoryOutputStream, MAX_MEMORY_BUFFER_BYTES);
       byte[] rawData = memoryOutputStream.toByteArray();
 
       if (memoryLength == -1) {
         final int diskLength;
-        final File tempFile = File.createTempFile(TEMP_FILE_PREFIX, null);
+        final File tempFile = Files.createTempFile(TEMP_FILE_PREFIX, null).toFile();
         FileOutputStream diskOutputStream = new FileOutputStream(tempFile);
         diskOutputStream.write(rawData);
         try {
           diskLength = copyStream(stream, diskOutputStream, Integer.MAX_VALUE - rawData.length);
           if (diskLength == -1) {

Vulnerable code: [Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.0...HEAD
   "Sasa Vilic" : "sasavilic@gmail.com"
date = "09 JUne 2022"
version= "42.5.0"
url= "/download/postgresql-42.5.0.jar"
version= "42.2.26"
url= "/download/postgresql-42.2.26.jre7.jar"
version= "42.2.26"
url= "/download/postgresql-42.2.26.jre6.jar"
v_name= "Postgresql JDBC 42.4.0"
version= "42.4.0"
url= "/download/postgresql-42.4.0.jar"
v_name= "Postgresql JDBC 42.3.6"
version= "42.3.6"
url= "/download/postgresql-42.3.6.jar"
v_name= "Postgresql JDBC 42.3.5"
version= "42.3.5"
url= "/download/postgresql-42.3.5.jar"
[[past]]
v_name= "Postgresql JDBC 42.3.4"
version= "42.3.4"
suffix=""
url= "/download/postgresql-42.3.4.jar"
            pgJDBC has released v42.5.0 on 24 August, 2022. Please see the release notes below.
        final File tempFile = File.createTempFile(TEMP_FILE_PREFIX, null);
Fixed code: [42.5.1] (2022-11-21 15:21:59 -0500)
### Security
- security: StreamWrapper spills to disk if setText, or setBytea sends very large Strings or arrays to the server. createTempFile creates a file which can be read by other users on unix like systems (Not macos).
This has been fixed in this version fixes CVE-2022-41946 see the [security advisory](https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h) for more details. Reported by [Jonathan Leitschuh](https://github.com/JLLeitschuh) This has been fixed in versions 42.5.1, 42.4.3 42.3.8, 42.2.27.jre7. Note there is no fix for 42.2.26.jre6. See the security advisory for work arounds.

### Fixed

- fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes [#Issue 2548](https://github.com/pgjdbc/pgjdbc/issues/2548) [PR #2552](https://github.com/pgjdbc/pgjdbc/issues/2552)
- fix: binary decoding of bool values [PR #2640](https://github.com/pgjdbc/pgjdbc/pull/2640)
- perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR #2634](https://github.com/pgjdbc/pgjdbc/pull/2634)
- chore: fix various spelling errors [PR #2592](https://github.com/pgjdbc/pgjdbc/pull/2592)
- chore: Feature/urlparser improve URLParser [PR #2641](https://github.com/pgjdbc/pgjdbc/pull/2592)

[42.5.0]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.0...REL42.5.1
[Unreleased]: https://github.com/pgjdbc/pgjdbc/compare/REL42.5.1...HEAD
   "Sasa Vilic" : "sasavilic@gmail.com",
   "Evgeniy Devyatykh" : "devyatyh@gmail.com",
   "Josh Soref" : "2119212+jsoref@users.noreply.github.com",
   "Kevin222004" : "kevinpatel222004@gmail.com",
   "Knut Olav Løite" : "koloite@gmail.com",
   "μtkarsh" : "61664827+utkar-sh-ukla@users.noreply.github.com"
---
title:  PostgreSQL JDBC Driver 42.5.1 Released
date:   2022-11-21 15:21:47 -0500
categories:
    - new_release
version: 42.5.1
---
**Notable changes**

### Security
- security: StreamWrapper spills to disk if setText, or setBytea sends very large Strings or arrays to the server. createTempFile creates a file which can be read by other users on unix like systems (Not macos).\
This has been fixed in this version fixes CVE-2022-41946 see the [security advisory](https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h) for more details.\
Reported by [Jonathan Leitschuh](https://github.com/JLLeitschuh)\
This has been fixed in versions 42.5.1, 42.4.3 42.3.8, 42.2.27.jre7.\
**Note** there is no fix for 42.2.26.jre6. See the security advisory for work arounds.

### Fixed

- fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes [#Issue 2548](https://github.com/pgjdbc/pgjdbc/issues/2548) [PR #2552](https://github.com/pgjdbc/pgjdbc/issues/2552)
- fix: binary decoding of bool values [PR #2640](https://github.com/pgjdbc/pgjdbc/pull/2640)
- perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR #2634](https://github.com/pgjdbc/pgjdbc/pull/2634)
- chore: fix various spelling errors [PR #2592](https://github.com/pgjdbc/pgjdbc/pull/2592)
- chore: Feature/urlparser improve URLParser [PR #2641](https://github.com/pgjdbc/pgjdbc/pull/2592)


<!--more-->

**Commits by author**

Dave Cramer (13):
  Update README.md [PR 2609](https://github.com/pgjdbc/pgjdbc/pull/2609)\
  Ignore simplequery for postgresql 8.4 [PR 2614](https://github.com/pgjdbc/pgjdbc/pull/2614)\
  Single commit to move newdocs into master [PR 2618](https://github.com/pgjdbc/pgjdbc/pull/2618)\
  update versions [PR 2619](https://github.com/pgjdbc/pgjdbc/pull/2619)\
  fix grammar, fix downloads, minor edits [PR 2626](https://github.com/pgjdbc/pgjdbc/pull/2626)\
  fix: make sure we select array_in from pg_catalog to avoid duplicate array_in functions fixes #Issue 2548 [PR 2552](https://github.com/pgjdbc/pgjdbc/pull/2552)\
  clarify prepared statement usage [PR 2629](https://github.com/pgjdbc/pgjdbc/pull/2629)\
  fix maven coordinates [PR 2631](https://github.com/pgjdbc/pgjdbc/pull/2631)\
  remove javadoc links for java 17 and above [PR 2637](https://github.com/pgjdbc/pgjdbc/pull/2637)\
  revert change to PGProperty.get() to keep the API the same [PR 2644](https://github.com/pgjdbc/pgjdbc/pull/2644)\
  exclude ArrayTest versions less than 9.1 [PR 2645](https://github.com/pgjdbc/pgjdbc/pull/2645)\

Evgeniy Devyatykh (1):
      perf: improve performance of PgResultSet getByte/getShort/getInt/getLong for float-typed columns [PR 2634](https://github.com/pgjdbc/pgjdbc/pull/2634)

Josh Soref (1):
      chore: fix various spelling errors [PR 2592](https://github.com/pgjdbc/pgjdbc/pull/2592)

Kevin222004 (1):

Knut Olav Løite (1):
      fix: binary decoding of bool values [PR 2640](https://github.com/pgjdbc/pgjdbc/pull/2640)

Marek Läll (1):
      Feature/urlparser improve3 pr1 [PR 2641](https://github.com/pgjdbc/pgjdbc/pull/2641)

Vladimir Sitnikov (4):
      docs: clarify we ship security fixes by default for the latest 42.x and 42.2 only [PR 2586](https://github.com/pgjdbc/pgjdbc/pull/2586)

μtkarsh (1):
      Optimize png files [PR 2621](https://github.com/pgjdbc/pgjdbc/pull/2621)


    
[[info]]
date = "21 October 2022"
url = "/changelogs/2022-11-21-42.5.1-release/"
version = "42.5.1"

date = "09 June 2022"
version= "42.5.1"
url= "/download/postgresql-42.5.1.jar"
version= "42.2.27"
url= "/download/postgresql-42.2.27.jre7.jar"
version= "42.2.27"
url= "/download/postgresql-42.2.27.jre6.jar"
v_name= "Postgresql JDBC 42.5.0"
version= "42.5.0"
url= "/download/postgresql-42.5.0.jar"
v_name= "Postgresql JDBC 42.4.2"
version= "42.4.2"
url= "/download/postgresql-42.4.2.jar"
v_name= "Postgresql JDBC 42.3.7"
version= "42.3.7"
url= "/download/postgresql-42.3.7.jar"
            pgJDBC has released v42.5.1 on 21 October, 2022. This is a security release which fixes CVE-2022-41946 
            see <a href="https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-562r-vg33-8x8h" >Security Advisory</a>
            for details
import java.nio.file.Files;
        final File tempFile = Files.createTempFile(TEMP_FILE_PREFIX, null).toFile();