Description
hdfs_fdw builds string literals for IN and = ANY(array) clauses pushed down to the remote Hive or Spark server without escaping single quotes. An authenticated user with only SELECT on a foreign table can supply a crafted array value that breaks out of the literal and changes the HiveQL query, which then runs on the remote server with the foreign server's credentials. The same release fixes two lower-severity issues: the JDBC connection string, including the trustStorePassword value, was written to logs, and credentials stayed in memory in cleartext after the connection was established. The issue is fixed in hdfs_fdw 2.4.0. From hdfs_fdw 2.4.0, hdfs_fdw escapes single quotes in these literals, masks trustStorePassword in logs and clears credentials from memory after connecting.
Affected products and versions
CVSS vector, explained
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
- Attack vector
- Network (from the internet)
- Attack complexity
- Low
- Attack requirements
- None
- Privileges required
- Regular user
- User interaction
- Not required
- Confidentiality
- None
- Integrity
- None
- Availability
- None
Weakness type (CWE)
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
- CWE-532 Insertion of Sensitive Information into Log File
- CWE-316 Cleartext Storage of Sensitive Information in Memory
References
- www.enterprisedb.com/docs/security/advisories/cve202662156/ vendor advisory
- github.com/EnterpriseDB/hdfs_fdw/releases/tag/v2.4.0 patch
Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.