The vulnerability is a privilege escalation issue in the AWS Advanced JDBC Wrapper when used with Amazon Aurora PostgreSQL. It stems from the use of unqualified function names in SQL queries sent by the wrapper to the database. An authenticated low-privilege attacker can create a malicious function with the same name as a system function (e.g., aurora_db_instance_identifier). When the JDBC wrapper executes a query using this function name without specifying the schema (pg_catalog), the database may execute the attacker's function instead of the intended one. This leads to the execution of arbitrary code with the privileges of the application's database user. The patch fixes this by adding the pg_catalog schema qualifier to all PostgreSQL internal function calls in the JDBC wrapper's dialect files, ensuring that the correct, trusted functions are always executed. The identified vulnerable functions are part of the database dialect implementation and are responsible for generating or executing these unsafe queries.
software.amazon.jdbc.dialect.PgDialect.getHostAliasQuerywrapper/src/main/java/software/amazon/jdbc/dialect/PgDialect.java
software.amazon.jdbc.dialect.PgDialect.getServerVersionQuerywrapper/src/main/java/software/amazon/jdbc/dialect/PgDialect.java
software.amazon.jdbc.dialect.PgDialect.isDialectwrapper/src/main/java/software/amazon/jdbc/dialect/PgDialect.java
software.amazon.jdbc.dialect.AuroraPgDialect.getTopologywrapper/src/main/java/software/amazon/jdbc/dialect/AuroraPgDialect.java
software.amazon.jdbc.dialect.AuroraPgDialect.isWriterwrapper/src/main/java/software/amazon/jdbc/dialect/AuroraPgDialect.java
software.amazon.jdbc.dialect.RdsMultiAzDbClusterPgDialect.isReaderwrapper/src/main/java/software/amazon/jdbc/dialect/RdsMultiAzDbClusterPgDialect.java
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| software.amazon.jdbc:aws-advanced-jdbc-wrapper | maven | <= 2.6.4 | 2.6.5 |
Ongoing coverage of React2Shell