# Babelfish: SQL Server compatibility adds a pre-authentication TDS parser

> Two memory-safety defects affect the Babelfish TDS layer. One is reachable during the handshake; the other processes authenticated RPC calls.

Published: 2026-11-09  
Canonical: https://rootzero.eu/en/research/babelfish-tds-preauth-memory-safety-2026/

**AWS published its bulletin on 6 November 2026.** Two memory-safety vulnerabilities affect the TDS layer in Babelfish for PostgreSQL and Aurora PostgreSQL. CVE-2026-119923 occurs during the handshake and is reachable by an unauthenticated remote actor; AWS lists possible impact to the confidentiality, integrity and availability of the database process. CVE-2026-119924 is in remote-procedure-call handling: it requires authentication and can read adjacent memory or cause denial of service.

AWS publishes no proof of concept, triggering packet structure or active-exploitation report. Analysis must therefore stay within the disclosed component, prerequisites and effects.

## A compatibility layer is a new network entry point

Babelfish lets an application designed for SQL Server communicate with PostgreSQL without changing its driver. The extension understands the TDS protocol and usually exposes its service on port 1433. It must decode the SQL Server handshake, authentication and query formats before translating them for PostgreSQL.

Compatibility is more than replacing a few SQL keywords. It adds a complex protocol parser to the server's network path:

```text
SQL Server client
       │ TDS: handshake, authentication, RPC
       ▼
Babelfish layer
       │ translation
       ▼
PostgreSQL
```

CVE-2026-119923 is in the first segment, before an identity is established. Stronger account passwords or account restrictions do not remove that path. CVE-2026-119924 appears after authentication and also requires review of legitimate or compromised clients that can send RPC calls.

## Two memory flaws, two exposure models

The phrase “memory-safety issue” does not publicly establish a particular buffer overflow, use-after-free or controlled-write primitive. For the first vulnerability, AWS says all three security properties of the process can be affected. That supports broad potential impact, not a claim of demonstrated code execution in every version.

The second flaw can read nearby memory or stop the service. An adjacent-memory read does not automatically mean extraction of an entire database: the content, size and repeatability are not disclosed. It can still reveal data present in the process, depending on its state when the fault occurs.

Affected extension versions cover branches 1.0 through 1.5, 2.1 through 2.15, 3.1 through 3.12, 4.0 through 4.8 and 5.1 through 5.4. Aurora ranges depend on both the PostgreSQL version and the embedded Babelfish release. A single copied threshold would be misleading; compare the exact cluster version with the [AWS table](https://aws.amazon.com/security/security-bulletins/2026-166-aws/).

## Obtain the version actually serving traffic

For Aurora, AWS documents a query over the PostgreSQL port that returns Aurora, PostgreSQL and Babelfish versions together. It avoids inferring the release from the cluster creation date or a number displayed by a SQL Server client:

```sql
SELECT
  aurora_version() AS aurora_version,
  version() AS postgresql_version,
  sys.SERVERPROPERTY('BabelfishVersion') AS babelfish_version;
```

`aurora_version()` does not exist in a self-hosted Babelfish deployment. Installed extensions and the TDS port can be inventoried without sending a specially constructed TDS packet:

```sql
SELECT extname, extversion
FROM pg_extension
WHERE extname LIKE 'babelfish%'
ORDER BY extname;

SELECT current_setting('babelfishpg_tds.port', true) AS tds_port;
```

The [AWS version-identification documentation](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-information-identify-version.html) is authoritative for Aurora. For self-hosting, compare both binaries and extensions with the project's upgrade procedure. An updated SQL extension alone does not prove that the process loaded a fixed TDS parser binary.

No public PoC appears in the reviewed sources. Sending random malformed handshakes or RPC calls does not reproduce a determined memory flaw and may interrupt the service. Until a triggering packet and detailed patch are public, useful evidence is the combination of an affected version, a reachable TDS listener and unapplied maintenance.

## Update the extension and Aurora maintenance

Published fixed branches for Babelfish for PostgreSQL are **4.10**, **5.6** and **6.1**. A deployment on an older branch should not infer that an unnamed intermediate version is safe. It must follow a maintained project upgrade path.

For Aurora PostgreSQL, AWS lists minimum versions per branch and asks customers to apply pending maintenance. A displayed engine version does not prove that the fix is active if the cluster has not applied its maintenance patch.

Until the update is installed, AWS recommends limiting the TDS port, `1433` by default, to trusted sources through VPC security groups. Filtering reduces exposure to the pre-authentication flaw; it does not protect against a compromised authorised workstation and does not replace the fix. A port hidden from the Internet may still be reachable from an application network with excessive scope.

## Verify the boundary added by migration

Inventory the native PostgreSQL port separately from the TDS port, its security groups and the applications that still use it. A migration may retain Babelfish for a few legacy clients while the team believes it operates an ordinary PostgreSQL database. TDS connection logs, process errors and unexplained restarts should be correlated with network flows, without treating a crash as proof of exploitation of either CVE.

After updating, service tests should cover the handshake and RPC operations used by authorised applications. They validate compatibility after remediation; they do not reproduce vulnerabilities when the triggering packets are unknown.

Babelfish shows why a migration layer retains its own attack surface after a migration. While any client speaks TDS, the compatibility service needs inventory, filtering, logging and patching in its own right.

**Primary sources:** [AWS bulletin for CVE-2026-119923 and CVE-2026-119924](https://aws.amazon.com/security/security-bulletins/2026-166-aws/), [identifying Babelfish versions on Aurora](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-information-identify-version.html), [Babelfish ports and protocols](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish.html), [fixed open-source project releases](https://github.com/babelfish-for-postgresql/babelfish_extensions/releases).
