CVE-2026-40342
Published: 17 April 2026
Summary
CVE-2026-40342 is a critical-severity Path Traversal (CWE-22) vulnerability in Firebirdsql Firebird. Its CVSS base score is 9.9 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked at the 34.9th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.
The strongest mitigations our analysis identified are NIST 800-53 SI-10 (Information Input Validation) and SI-2 (Flaw Remediation).
Threat & Defense at a Glance
Threat & Defense Details
Mitigating Controls (NIST 800-53 r5)AI
Requires validation and sanitization of user-supplied engine names to block path traversal and arbitrary library loading.
Mandates timely remediation of the specific path traversal flaw through patching to Firebird versions 5.0.4, 4.0.7, or 3.0.14.
Enforces least privilege by restricting CREATE FUNCTION privileges to only trusted users, reducing exploitation risk.
MITRE ATT&CK Enterprise TechniquesAI
Why these techniques?
Path traversal in network-accessible DB plugin loader enables remote authenticated users to load arbitrary shared libraries for immediate code execution, directly mapping to exploitation of public-facing applications and privilege escalation from DB to OS account privileges.
NVD Description
Firebird is an open-source relational database management system. In versions prior to 5.0.4, 4.0.7 and 3.0.14, the external engine plugin loader concatenates a user-supplied engine name into a filesystem path without filtering path separators or .. components. An authenticated user…
more
with CREATE FUNCTION privileges can use a crafted ENGINE name to load an arbitrary shared library from anywhere on the filesystem via path traversal. The library's initialization code executes immediately during loading, before Firebird validates the module, achieving code execution as the server's OS account. This issue has been fixed in versions 5.0.4, 4.0.7 and 3.0.14.
Deeper analysisAI
CVE-2026-40342 is a path traversal vulnerability in the external engine plugin loader of Firebird, an open-source relational database management system. Affected versions are those prior to 5.0.4, 4.0.7, and 3.0.14. The loader concatenates a user-supplied engine name into a filesystem path without filtering path separators or ".." components, enabling attackers to reference arbitrary files. This flaw is rated at CVSS 9.9 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) and maps to CWEs-22, -73, -94, and -427.
An authenticated user with CREATE FUNCTION privileges can exploit this by crafting a malicious ENGINE name during function creation, causing Firebird to load an arbitrary shared library from any location on the filesystem. The library's initialization code executes immediately upon loading, prior to any validation by Firebird, resulting in arbitrary code execution with the privileges of the server's operating system account.
Firebird has addressed the issue in versions 5.0.4, 4.0.7, and 3.0.14, as detailed in the project's GitHub release notes and security advisory GHSA-7pxc-h3rv-r257. Security practitioners should prioritize upgrading affected Firebird instances to these patched versions to mitigate the risk.
Details
- CWE(s)