Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Postgres with SELECT on hdfs_fdw foreign table
-
DeliverySupply crafted array value containing single quote
-
ExploitBreak out of pushed-down HiveQL string literal
-
ExecutionInjected HiveQL executes on remote Hive/Spark
-
ImpactRead or alter remote data under foreign-server credentials
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated Postgres account with at least SELECT on a foreign table backed by hdfs_fdw (versions before 2.4.0), where the query uses an IN or = ANY(array) predicate that the wrapper pushes down to the remote Hive or Spark server. The attacker must control the array/list value, into which a single quote is embedded to escape the HiveQL string literal; the injected query then executes with the configured foreign server's credentials. Limiting factors: valid low-privilege authentication is mandatory (PR:L, so not remote-unauthenticated), the predicate must actually be pushed down to the remote engine, and impact is bounded by the privileges of the foreign server's credentials on the Hive/Spark cluster rather than granting direct Postgres compromise. Fixed in hdfs_fdw 2.4.0, which escapes single quotes in these literals. |
| Impact | The input assigns CVSS 4.0 6.5 (Medium) with vector AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H. The signals are internally consistent: network-reachable (AV:N), low complexity (AC:L), no attack requirements (AT:N) and no user interaction (UI:N), but exploitation needs PR:L - an authenticated Postgres account holding SELECT on an hdfs_fdw foreign table. Notably, there is NO impact to the vulnerable system itself (VC:N/VI:N/VA:N); all impact lands on a SUBSEQUENT system - the remote Hive/Spark server - at High confidentiality, integrity and availability (SC:H/SI:H/SA:H), because injected HiveQL runs there under the foreign server's credentials. This scope-crossing impact is what keeps the score at Medium rather than higher: the attacker gains only what those foreign-server credentials permit, not local Postgres compromise. No KEV listing, no EPSS score, and no PoC reference are present in the supplied data, so exploitation probability cannot be quantified from these sources. The vuln.today decision label is 'this_month' (not act_now/emergency). Net assessment: a genuine but not urgent priority - real because remote code/query execution on the backing cluster is possible and the fix is a one-line-class escaping bug, but gated behind an authenticated low-privilege Postgres account and predicate pushdown, which narrows the realistic threat to insiders or compromised low-privilege accounts. EPSS is missing, so widespread-exploitation likelihood is unverified. |
| Exploit ScenarioDerived | An authenticated Postgres user holding only SELECT on an hdfs_fdw foreign table runs a query whose WHERE ... IN (...) or = ANY(array) predicate hdfs_fdw pushes down to the remote Hive or Spark server. By embedding a single quote in the supplied array value, the attacker breaks out of the string literal and appends arbitrary HiveQL that executes on the remote cluster under the foreign server's credentials. No public exploit identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 25, 2026
HiveQL injection in EnterpriseDB hdfs_fdw releases before 2.4.0 allows an authenticated PostgreSQL user holding only SELECT on an hdfs_fdw foreign table to break out of the string literal the wrapper builds for pushed-down IN and = ANY(array) predicates, thereby altering the remote query that executes on the Hive or Spark cluster under the foreign server's credentials. Exploitation requires that the crafted array/list value be attacker-controlled and that the predicate actually be pushed down; impact is consequently bounded by the privileges of the configured foreign-server credentials on the remote cluster rather than by direct compromise of the PostgreSQL instance. The vendor fixed the flaw in hdfs_fdw 2.4.0 by escaping single quotes in these literals; no public exploit code and no confirmed active exploitation were identified at time of analysis, and the input assigns CVSS 4.0 6.5 (Medium) with a vuln.today decision label of this_month.
RemediationAI
Vendor-released patch: hdfs_fdw 2.4.0, which escapes single quotes in IN and = ANY(array) literals as described in the advisory at https://www.enterprisedb.com/docs/security/advisories/cve202662156/ and the release at https://github.com/EnterpriseDB/hdfs_fdw/releases/tag/v2.4.0. Before upgrading, audit existing foreign servers, user mappings and foreign tables for dbname or table_name values containing characters outside alphanumerics and underscores and rename them, because 2.4.0 rejects those options; the same release also removes support for PostgreSQL/Postgres Extended/EDB Postgres Advanced Server 13, and requires a user name on the JDBC default authentication path instead of the previous dummy credential fallback, so verify connection definitions still authenticate after the upgrade. Where immediate upgrade is not possible, restrict SELECT on hdfs_fdw foreign tables to roles that are trusted with the remote cluster's data, since the injected HiveQL runs with the foreign server's credentials and the blast radius is capped by those remote privileges; restrict access to the PostgreSQL server log, because log_remote_sql records remote SQL including literal values, which would otherwise expose the very values used in injected statements (and prior releases logged the JDBC connection string including trustStorePassword). After upgrading, confirm that trustStorePassword is masked in logs and that credentials are cleared from memory post-connection as the release notes state.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
hdfs_fdw is EnterpriseDB's PostgreSQL Foreign Data Wrapper that presents remote Apache Hive and Spark (JDBC/Thrift-backed) tables as local foreign tables, pushing down predicates to the remote engine to reduce data transfer. The defect is a CWE-89 SQL injection arising because string literals generated for IN lists and = ANY(array) constructs were assembled without escaping embedded single quotes, so a value containing a quote terminates the literal and appends attacker-chosen HiveQL. Because the injected statement is sent over the JDBC connection, it executes with the identity and privileges configured in the foreign server definition on the Hive/Spark side. The CPE cpe:2.3:a:enterprisedb:hdfs_foreign_data_wrapper_(hdfs_fdw) identifies the affected component. The trigger path for a given deployment depends on the query shape and on whether the planner actually pushes the predicate to the remote engine; the supplied sources describe the flaw at the literal-construction level and do not detail the code path for every pushdown case. The same 2.4.0 release hardened adjacent areas: trustStorePassword is masked in connection-string logs and password/trustStorePassword values are cleared from memory after connecting, the JDBC default authentication path now requires a user name instead of falling back to a dummy credential pair, dbname and table_name options accept only alphanumeric characters and underscores, and log_remote_sql continues to write remote SQL including literal values to the server log.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
PR:L for the required authenticated SELECT, AV:N/AC:L for network predicate pushdown, and S:C with C:H/I:H/A:H because injected HiveQL fully impacts a separate remote Hive/Spark system.
Primary rating from Vendor (EDB).
CVSS VectorVendor: EDB
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-135563
GHSA-99w4-7pj7-8wx2
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB