/

CVE-2025-65104

Severity:

HIGH RISK

(7.9)

Information Exposure in Firebird FB3 Client Library

CVE-2025-65104

Analyzed

Vulnerability type

Category:

Information Exposure

CWE:

CWE-200

Impact:

Information Disclosure

Severity:

HIGH RISK

(7.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A data handling flaw in the Firebird FB3 client library causes incorrect data length values to be placed into XSQLDA fields when communicating with FB4 or newer servers.

Under these conditions, the mismatch can expose information that should not be visible to the client, leading to an information leak between client and server components.

Affected context

This vulnerability occurs in Firebird environments where an FB3 client library communicates with an FB4 or higher server.

The issue specifically affects the protocol interaction around XSQLDA (SQL Descriptor Area) fields, where data length values are incorrectly populated by the older client.

Deployments mixing client and server major versions are more likely to be affected, particularly when applications rely on the FB3 client against newer backend servers.

Exploit preconditions

  • Attack surface: Client–server communication channel between Firebird FB3 clients and FB4+ servers
  • Required access: Ability to run or influence an application that uses the vulnerable FB3 client library to connect to an FB4+ server
  • Trigger point: Execution of SQL statements that use XSQLDA structures (e.g., queries using prepared statements, parameterized queries, or result set metadata)
  • Why exploitation is possible: The FB3 client miscalculates or misreports data length values in XSQLDA fields, causing the server–client protocol to expose information beyond intended boundaries

Why this happens

The root cause lies in protocol-level incompatibility and incorrect handling of data length metadata in the FB3 client when interacting with FB4+ servers.

The client library populates XSQLDA fields with inaccurate length values, which can cause the server to return or reveal data in a way that was not intended by the protocol designers.

This behavior maps to CWE-200: Information Exposure, where internal information is unintentionally made available because of flawed data representation and boundary accounting in a cross-version communication context.

Potential impact

  • Unauthorized exposure of data structures or metadata related to SQL descriptors
  • Leakage of portions of database records or adjacent memory-derived information through protocol responses
  • Disclosure of internal schema details, such as column types and sizes, beyond what the application expects
  • Potential assistance to attackers in refining further attacks by revealing implementation details or data layout

General mitigation guidance

Mitigation generally focuses on avoiding cross-version protocol mismatches and enforcing strict data boundary handling between client and server components.

Recommended patterns include:

  • Aligning client and server major versions to use protocol-compatible libraries
  • Implementing version negotiation and compatibility checks in deployment procedures to prevent unsupported client–server combinations
  • Applying defense-in-depth controls at the application layer, such as limiting the exposure of sensitive columns and enforcing least-privilege access to database objects
  • Monitoring and constraining what metadata and diagnostic information are exposed to untrusted or semi-trusted clients
  • Treating mixed-version environments as higher risk and subjecting them to additional validation and testing before production use

How teams detect issues like this

Detection efforts can focus on both code-level and operational signals:

  • Reviewing Firebird client dependencies in applications to identify use of FB3 client libraries connecting to newer servers
  • Adding checks in deployment automation or configuration management to flag client–server version mismatches
  • Enabling protocol or query logging (where appropriate) to observe anomalous or unexpected responses related to XSQLDA fields
  • Using static analysis and code review to identify hard-coded or legacy client library usage and to ensure that database access layers are kept in sync with server versions
  • Applying database security policies that restrict sensitive data exposure so that any protocol-level leaks reveal minimal information

Sources

SourceLink
github.comgithub.com/FirebirdSQL/firebird/releases/tag/v4.0.0
github.comgithub.com/FirebirdSQL/firebird/security/advisories/GHSA-mfpr-9886-xjhg

Frequently asked

questions

It can be, in the sense that any remote application using the FB3 client to talk to an FB4+ server may encounter this information leak over the network, without requiring local access to the database host itself.

An attacker typically needs the ability to run or control a client application that uses the FB3 client library against an FB4 or higher Firebird server. Their effective privileges will also be constrained by the database credentials and roles used by that client.

The most robust pattern is to use a client library that is protocol-compatible with the server version, ensuring that metadata structures like XSQLDA are handled consistently and do not inadvertently expose extra information.

Preventive strategies include enforcing strict version compatibility policies, validating protocol-level structures in integration testing, and treating cross-version or legacy client–server combinations as exceptions that must pass additional security and regression checks before deployment.

Find out what's already
exploitable in your codebase.