CVE-2022-21724Unchecked Class Instantiation when providing Plugin Classes
pgjdbc is the offical PostgreSQL JDBC Driver. A security hole was found in the jdbc driver for postgresql database while doing security research. The system using the postgresql library will be attacked when attacker control the jdbc url or properties. pgjdbc instantiates plugin instances based on class names provided via `authenticationPluginClassName`, `sslhostnameverifier`, `socketFactory`, `sslfactory`, `sslpasswordcallback` connection properties. However, the driver did not verify if the class implements the expected interface before instantiating the class. This can lead to code execution loaded via arbitrary classes. Users using plugins are advised to upgrade. There are no known workarounds for this issue.
What to do
Fixed builds are available from Alpine, Debian, Maven: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | libpgjava | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | libpgjava | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | libpgjava | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | libpgjava | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | libpgjava | Fix pending | UBUNTU-CVE-2022-21724 | |
| Ubuntu 18.04 | libpgjava | Fix pending | UBUNTU-CVE-2022-21724 | |
| Ubuntu 16.04 | libpgjava | Fix pending | UBUNTU-CVE-2022-21724 | |
| Ubuntu 14.04 | libpgjava | Fix pending | UBUNTU-CVE-2022-21724 | |
| Debian 14 | libpgjava | Fixed | 42.3.2-1 | DEBIAN-CVE-2022-21724 |
| Debian 13 | libpgjava | Fixed | 42.3.2-1 | DEBIAN-CVE-2022-21724 |
| Debian 12 | libpgjava | Fixed | 42.3.2-1 | DEBIAN-CVE-2022-21724 |
| Red Hat Enterprise Linux 9 | postgresql-jdbc | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-af | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-bg | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ca | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-cs | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-da | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-de | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-el | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-en | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-es | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-fa | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-fi | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-fr | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ga | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-hr | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-hu | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-is | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-it | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ja | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ko | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-lb | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-lt | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-mn | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-nl | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-pl | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-pt | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ro | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-ru | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-sk | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-sl | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-sr | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-sv | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-tr | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-vi | Not affected | ||
| Red Hat Enterprise Linux 8 | autocorr-zh | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-base | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-calc | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-core | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-data | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-draw | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-emailmerge | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-filters | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-gdb-debug-support | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-graphicfilter | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-gtk2 | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-gtk3 | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ar | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-bg | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-bn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ca | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-cs | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-da | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-de | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-dz | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-el | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-en | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-es | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-et | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-eu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-fi | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-fr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-gl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-gu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-he | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-hi | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-hr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-hu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-id | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-it | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ja | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ko | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-lt | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-lv | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-nb | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-nl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-nn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-pl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-pt-BR | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-pt-PT | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ro | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ru | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-si | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-sk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-sl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-sv | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-ta | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-tr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-uk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-zh-Hans | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-help-zh-Hant | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-impress | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-af | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ar | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-as | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-bg | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-bn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-br | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ca | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-cs | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-cy | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-da | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-de | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-dz | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-el | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-en | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-es | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-et | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-eu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-fa | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-fi | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-fr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ga | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-gl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-gu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-he | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-hi | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-hr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-hu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-id | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-it | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ja | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-kk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-kn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ko | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-lt | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-lv | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-mai | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ml | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-mr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-nb | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-nl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-nn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-nr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-nso | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-or | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-pa | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-pl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-pt-BR | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-pt-PT | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ro | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ru | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-si | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-sk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-sl | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-sr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ss | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-st | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-sv | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ta | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-te | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-th | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-tn | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-tr | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ts | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-uk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-ve | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-xh | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-zh-Hans | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-zh-Hant | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-langpack-zu | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-math | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-ogltrans | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-opensymbol-fonts | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-pdfimport | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-pyuno | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-sdk | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-sdk-doc | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-ure | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-ure-common | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-wiki-publisher | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-writer | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-x11 | Not affected | ||
| Red Hat Enterprise Linux 8 | libreoffice-xsltfilter | Not affected | ||
| Red Hat Enterprise Linux 8 | libreofficekit | Not affected | ||
| Red Hat Enterprise Linux 8 | postgresql-jdbc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | postgresql-jdbc-javadoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | postgresql-jdbc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | postgresql-jdbc-javadoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | postgresql-jdbc | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.23 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.22 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.21 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.20 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.19 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.18 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.17 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Alpine Linux 3.16 | java-postgresql-jdbc | Fixed | 42.2.25-r0 | ALPINE-CVE-2022-21724 |
| Maven library | org.postgresql:postgresql | Fixed | 42.3.2 | GHSA-v7wg-cpwc-24m4 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://www.debian.org/security/2022/dsa-5196 (vendor-advisory)
References
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-v7wg-cpwc-24m4
- https://github.com/pgjdbc/pgjdbc/commit/f4d0ed69c0b3aae8531d83d6af4c57f22312c813
- https://security.netapp.com/advisory/ntap-20220311-0005/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BVEO7BEFXPBVHSPYL3YKQWZI6DYXQLFS/
- https://lists.debian.org/debian-lts-announce/2022/05/msg00027.html
- https://www.debian.org/security/2022/dsa-5196
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.