Cyber Resilience

CVE-2026-40342

CriticalPublic PoCRCE

Published: 17 April 2026

Published
17 April 2026
Modified
27 April 2026
KEV Added
Patch
CVSS Score v3.1 9.9 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.0069 48.1th percentile
Risk Priority 70 floored blend · peak EPSS

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 48.1th 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).

Deeper analysis

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.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability details

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise TechniquesAI

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
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.

Confidence: HIGH · MITRE ATT&CK Enterprise v19.0

CVEs Like This One

CVE-2025-24975Same product: Firebirdsql Firebird
CVE-2026-33337Same product: Firebirdsql Firebird
CVE-2026-28224Same product: Firebirdsql Firebird
CVE-2026-28212Same product: Firebirdsql Firebird
CVE-2026-27890Same product: Firebirdsql Firebird
CVE-2026-34232Same product: Firebirdsql Firebird
CVE-2025-65104Same product: Firebirdsql Firebird
CVE-2026-35215Same product: Firebirdsql Firebird
CVE-2026-24897Shared CWE-22, CWE-94
CVE-2025-41757Shared CWE-22

Affected Assets

firebirdsql
firebird
≤ 3.0.14 · 4.0.0 — 4.0.7 · 5.0.0 — 5.0.4

Mitigating Controls

Mitigating Controls (NIST 800-53 r5) AI

prevent

Requires validation and sanitization of user-supplied engine names to block path traversal and arbitrary library loading.

prevent

Mandates timely remediation of the specific path traversal flaw through patching to Firebird versions 5.0.4, 4.0.7, or 3.0.14.

prevent

Enforces least privilege by restricting CREATE FUNCTION privileges to only trusted users, reducing exploitation risk.

References