{"answers":{"affected":"9 open source packages ship an affected version, including org.postgresql:postgresql and postgresql-jdbc-driver. It affects 2 products.","exploited":"There is no known exploitation of CVE-2022-41946 in the wild and no public exploit code.","fix":"Upgrade org.postgresql:postgresql to a fixed version for your release line: 42.2.27, 42.3.8, 42.4.3 or 42.5.1.","what":"CVE-2022-41946 is a medium-severity vulnerability in Debian Debian Linux, published on 23 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2022-41946 and fix it if it is affected.\n\nWhat it is: CVE-2022-41946 is a medium-severity vulnerability in Debian Debian Linux, published on 23 Nov 2022. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2022-41946 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- org.postgresql:postgresql (Maven): affected from 42.2.0; fixed in 42.2.27\n- org.postgresql:postgresql (Maven): affected from 42.2.0; fixed in 42.2.27\n- org.postgresql:postgresql (Maven): affected from 42.3.0; fixed in 42.3.8\n- org.postgresql:postgresql (Maven): affected from 42.3.0; fixed in 42.3.8\n- org.postgresql:postgresql (Maven): affected from 42.4.0; fixed in 42.4.3\n- org.postgresql:postgresql (Maven): affected from 42.4.0; fixed in 42.4.3\n- org.postgresql:postgresql (Maven): affected from 42.5.0; fixed in 42.5.1\n- org.postgresql:postgresql (Maven): affected from 42.5.0; fixed in 42.5.1\n- postgresql-jdbc-driver (Bitnami): affected from 42.2.0; fixed in 42.2.27, 42.3.8, 42.4.3, 42.5.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-41946/ (Markdown: https://insights.sbomify.com/CVE-2022-41946/index.md)","id":"CVE-2022-41946","markdown":"https://insights.sbomify.com/CVE-2022-41946/index.md","name":"CVE-2022-41946","record":{"aliases":["ALSA-2023:2378","ALSA-2023:2867","BIT-postgresql-jdbc-driver-2022-41946","DEBIAN-CVE-2022-41946","DLA-3218-1","GHSA-562r-vg33-8x8h","OESA-2023-1366","RHSA-2023:0759","RHSA-2023:1630","RHSA-2023:2378","RHSA-2023:2867","ROOT-APP-MAVEN-CVE-2022-41946","SUSE-SU-2023:0103-1","SUSE-SU-2023:0104-1","SUSE-SU-2023:0451-1","UBUNTU-CVE-2022-41946","openSUSE-SU-2024:12606-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"PostgreSQL JDBC driver","requires_auth":"low_privilege","summary":"Local attackers can read temporary files created by the PostgreSQL JDBC driver, potentially exposing sensitive data.","user_interaction":"not_required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"debian_linux","vendor":"debian"},{"product":"postgresql_jdbc_driver","vendor":"postgresql"}],"cvss":{"score":4.7,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-668","name":"Exposure of Resource to Wrong Sphere"},{"id":"CWE-377","name":"DEPRECATED: Insecure Temporary File"},{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"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.","ecosystems":["AlmaLinux:8","AlmaLinux:9","Bitnami","Maven","Red Hat:enterprise_linux:8::appstream","Red Hat:enterprise_linux:9::appstream","Red Hat:rhev_hypervisor:4.4::el8","Red Hat:rhev_manager:4.4:el8","Red Hat:satellite:6.12::el8","SUSE:Linux Enterprise Module for Server Applications 15 SP4","SUSE:Linux Enterprise Real Time 15 SP3","SUSE:Linux Enterprise Server 12 SP5","SUSE:Linux Enterprise Server for SAP Applications 12 SP5","SUSE:Manager Server Module 4.2","openSUSE:Leap 15.4"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"TemporaryFolder on unix-like systems does not limit access to created files in pgjdbc","id":"CVE-2022-41946","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":"debian:debian_linux","products":["debian:debian_linux"],"type":"information_disclosure","year":"2022"},"n_packages":47,"n_references":5,"next":{"headline":"Cross-site Scripting with user-uploaded files in dhis2-core","id":"CVE-2022-41947"},"packages":[{"ecosystem":"Bitnami","fixed":["42.2.27","42.3.8","42.4.3","42.5.1"],"introduced":["42.2.0","42.3.0","42.4.0","42.5.0"],"last_affected":[],"package":"postgresql-jdbc-driver","purl":"pkg:bitnami/postgresql-jdbc-driver","source":"BIT-postgresql-jdbc-driver-2022-41946"},{"ecosystem":"Maven","fixed":["42.2.27"],"introduced":["42.2.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.2.27"],"introduced":["42.2.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.3.8"],"introduced":["42.3.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.3.8"],"introduced":["42.3.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.4.3"],"introduced":["42.4.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.4.3"],"introduced":["42.4.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.5.1"],"introduced":["42.5.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":null,"source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"Maven","fixed":["42.5.1"],"introduced":["42.5.0"],"last_affected":[],"package":"org.postgresql:postgresql","purl":"pkg:maven/org.postgresql/postgresql","source":"GHSA-562r-vg33-8x8h"},{"ecosystem":"AlmaLinux:8","fixed":["42.2.14-2.el8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/almalinux/postgresql-jdbc","source":"ALSA-2023:2867"},{"ecosystem":"AlmaLinux:8","fixed":["42.2.14-2.el8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/almalinux/postgresql-jdbc-javadoc","source":"ALSA-2023:2867"},{"ecosystem":"AlmaLinux:9","fixed":["42.2.27-1.el9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/almalinux/postgresql-jdbc","source":"ALSA-2023:2378"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:42.2.14-2.el8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2023:2867"},{"ecosystem":"Red Hat:enterprise_linux:8::appstream","fixed":["0:42.2.14-2.el8"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2023:2867"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:42.2.27-1.el9"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2023:2378"},{"ecosystem":"Red Hat:rhev_hypervisor:4.4::el8","fixed":["0:2.4.2-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-ansible-collection","purl":"pkg:rpm/redhat/ovirt-ansible-collection","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:2.4.2-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-ansible-collection","purl":"pkg:rpm/redhat/ovirt-ansible-collection","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine","purl":"pkg:rpm/redhat/ovirt-engine","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-backend","purl":"pkg:rpm/redhat/ovirt-engine-backend","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-dbscripts","purl":"pkg:rpm/redhat/ovirt-engine-dbscripts","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-health-check-bundler","purl":"pkg:rpm/redhat/ovirt-engine-health-check-bundler","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-restapi","purl":"pkg:rpm/redhat/ovirt-engine-restapi","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup","purl":"pkg:rpm/redhat/ovirt-engine-setup","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-base","purl":"pkg:rpm/redhat/ovirt-engine-setup-base","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-cinderlib","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-cinderlib","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-imageio","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-imageio","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-ovirt-engine","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-ovirt-engine","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-ovirt-engine-common","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-ovirt-engine-common","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-vmconsole-proxy-helper","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-vmconsole-proxy-helper","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-setup-plugin-websocket-proxy","purl":"pkg:rpm/redhat/ovirt-engine-setup-plugin-websocket-proxy","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-tools","purl":"pkg:rpm/redhat/ovirt-engine-tools","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-tools-backup","purl":"pkg:rpm/redhat/ovirt-engine-tools-backup","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-vmconsole-proxy-helper","purl":"pkg:rpm/redhat/ovirt-engine-vmconsole-proxy-helper","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-webadmin-portal","purl":"pkg:rpm/redhat/ovirt-engine-webadmin-portal","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"ovirt-engine-websocket-proxy","purl":"pkg:rpm/redhat/ovirt-engine-websocket-proxy","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:42.2.14-2.el8ev"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc","purl":"pkg:rpm/redhat/postgresql-jdbc","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:42.2.14-2.el8ev"],"introduced":["0"],"last_affected":[],"package":"postgresql-jdbc-javadoc","purl":"pkg:rpm/redhat/postgresql-jdbc-javadoc","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"python3-ovirt-engine-lib","purl":"pkg:rpm/redhat/python3-ovirt-engine-lib","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:rhev_manager:4.4:el8","fixed":["0:4.5.3.7-1.el8ev"],"introduced":["0"],"last_affected":[],"package":"rhvm","purl":"pkg:rpm/redhat/rhvm","source":"RHSA-2023:0759"},{"ecosystem":"Red Hat:satellite:6.12::el8","fixed":["0:4.1.20-1.el8sat"],"introduced":["0"],"last_affected":[],"package":"candlepin","purl":"pkg:rpm/redhat/candlepin","source":"RHSA-2023:1630"}],"prev":{"headline":"Remote Code Execution (RCE) vulnerability in super-xray via URL input","id":"CVE-2022-41945"},"products":["pgjdbc"],"published":"2022-11-23","related":[{"cvss_score":10,"headline":"ProFTPD Improper Access Control","id":"CVE-2015-3306","kev_date_added":"2026-10-08","published":"2015-05-18"},{"cvss_score":9.9,"headline":"RoundCube Webmail Deserialization of Untrusted Data","id":"CVE-2025-49113","kev_date_added":"2026-02-20","published":"2025-06-02"},{"cvss_score":9.8,"headline":"GNU InetUtils Argument Injection","id":"CVE-2026-24061","kev_date_added":"2026-01-26","published":"2026-01-21"},{"cvss_score":9.8,"headline":"Linux Kernel Improper Check for Unusual or Exceptional Conditions","id":"CVE-2025-39682","kev_date_added":"2026-09-18","published":"2025-09-05"},{"cvss_score":9.8,"headline":"Mozilla Firefox Use-After-Free","id":"CVE-2024-9680","kev_date_added":"2024-10-15","published":"2024-10-09"},{"cvss_score":9.8,"headline":"RARLAB UnRAR Directory Traversal","id":"CVE-2022-30333","kev_date_added":"2022-08-09","published":"2022-05-09"},{"cvss_score":9.8,"headline":"Roundcube Webmail SQL Injection","id":"CVE-2021-44026","kev_date_added":"2023-06-22","published":"2021-11-19"}],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2025-11-03","vendors":["pgjdbc"]},"summary":"Local attackers can read temporary files created by the PostgreSQL JDBC driver, potentially exposing sensitive data.","url":"https://insights.sbomify.com/CVE-2022-41946/"}