Cyber Resilience

CVE-2026-40342

RCE in Firebirdsql Firebird ≤ 3.0.14

Published
17 April 2026
Modified
27 April 2026
Patch / advisory
CVSS Score v3.1 9.9
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS Score 0.0069 50th percentile
Risk Priority 69 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 Path Interception (T1034); ranked at the 50th 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 map to AC-3 (Access Enforcement) and CM-6 (Configuration Settings) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

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 Data

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 Techniques

T1034 Path Interception Persistence
**This technique has been deprecated.
T1574.007 Path Interception by PATH Environment Variable Stealth
Adversaries may execute their own malicious payloads by hijacking environment variables used to load libraries.
T1574.008 Path Interception by Search Order Hijacking Stealth
Adversaries may execute their own malicious payloads by hijacking the search order used to load other programs.
T1005 Data from Local System Collection
Adversaries may search local system sources, such as file systems, configuration files, local databases, virtual machine files, or process memory, to find files of interest and sensitive data prior to Exfiltration.
T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-25636Shared CWE-22, CWE-73
CVE-2026-13014Shared CWE-22, CWE-73
CVE-2023-35897Shared CWE-427, CWE-94
CVE-2024-37149Shared CWE-73, CWE-94
CVE-2025-23304Shared CWE-22, CWE-94
CVE-2024-22514Shared CWE-22, CWE-94
CVE-2024-32680Shared CWE-22, CWE-94
CVE-2026-73291Shared CWE-22, CWE-94
CVE-2026-14439Shared CWE-22, CWE-94
CVE-2026-59866Shared CWE-22, CWE-94

Affected Assets

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

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 2 hardening rules · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)
  • V5.3.2
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Enforces the intended directory access authorizations that path traversal would otherwise bypass.

Establishes restrictive configuration settings that can define and lock down approved search paths.

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly neutralizes special path elements before pathname construction occurs.

Least privilege reduces the impact of any unauthorized file access obtained via traversal.

Restricts logical and physical access to change system configuration, including search-path settings and directories.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-06 full match
prevents

Secure SDLC practices include input validation and path sanitization that eliminate this weakness.

PR.AA-05 mostly match
prevents

Least-privilege file authorization directly limits damage from externally controlled paths.

PR.PS-01 partial match
prevents

Hardened configuration baselines can enforce safe search-path settings and reduce exposure.

PR.PS-02 partial match
prevents

Patching/maintenance can remediate known path-traversal flaws in deployed software (partial prevention of exploitability) but does nothing to stop the coding defect from being introduced in the first place.

PR.PS-05 partial match
prevents

Execution allow-listing can block malicious binaries placed in hijackable search locations.

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches path traversal via static/dynamic analysis.

mitigates

Restricting software installation reduces the chance that an attacker-controlled path element is introduced into the search path.

prevents

Secure SDLC mandates input validation and path sanitization that directly prevent path traversal.

prevents

Application security requirements include rules for safe file handling and canonicalization.

prevents

Secure architecture principles require least-privilege file access and directory isolation.

prevents

Secure coding standards explicitly forbid unsafe path construction and mandate safe APIs.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248577 OL 8 must enable kernel parameters to enforce Discretionary Access Control (DAC) on symlinks. prevents CWE-427

References