Improper Initialization Affecting java-postgresql-jdbc package, versions <42.2.25-r0


Severity

Recommended
0.0
critical
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.95% (84th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-ALPINE321-JAVAPOSTGRESQLJDBC-8486821
  • published6 Dec 2024
  • disclosed2 Feb 2022

Introduced: 2 Feb 2022

CVE-2022-21724  (opens in a new tab)
CWE-665  (opens in a new tab)

How to fix?

Upgrade Alpine:3.21 java-postgresql-jdbc to version 42.2.25-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream java-postgresql-jdbc package and not the java-postgresql-jdbc package as distributed by Alpine. See How to fix? for Alpine:3.21 relevant fixed versions and status.

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.

CVSS Scores

version 3.1