CVE-2026-40342 Firebird: Path Traversal + Arbitrary File Write Leads to Remote Code Execution
An authenticated user with CREATE FUNCTION privileges can achieve remote code execution via path traversal in the external engine plugin loader.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-40342?
CVE-2026-40342 is a critical path traversal vulnerability in FirebirdSQL firebird, published on 17 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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 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.
Which versions are affected by CVE-2026-40342?
It affects 1 product.
Products include Firebirdsql Firebird.
How do I fix CVE-2026-40342?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-40342 being exploited?
There is no known exploitation of CVE-2026-40342 in the wild and no public exploit code.
Other vulnerabilities in FirebirdSQL firebird
Sources
Also known as DEBIAN-CVE-2026-40342, ECHO-6873-b8db-a927, GHSA-7pxc-h3rv-r257, UBUNTU-CVE-2026-40342.