Skip to content
Heist/ feed
Back to feed
Critical

Firebird: Path Traversal + Arbitrary File Write Leads to Remote Code Execution

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-40342
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:26 UTC · Revision 1

Source evidence

Firebird: Path Traversal + Arbitrary File Write Leads to Remote Code Execution

core-osv · Original source

Published 17 Apr 2026, 19:22 UTC

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.

osv:CVE-2026-40342
Complete source record
{
  "id": "932fd5aee831a3d0df41e58738e43d04ef14390f5c8514e8812555772569dd98",
  "url": "https://osv.dev/vulnerability/CVE-2026-40342",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Firebird: Path Traversal + Arbitrary File Write Leads to Remote Code Execution",
    "summary": "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.",
    "evidence": "osv:CVE-2026-40342",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-40342",
      "aliases": [
        "CVE-2026-40342",
        "GHSA-7pxc-h3rv-r257"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/firebirdsql/firebird",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "463bae029a4426deff7e9bb08a8317aaa398c7c7"
                },
                {
                  "introduced": "141bb5491d24cb363f03c5a0786a32f73a1faa5b"
                },
                {
                  "fixed": "26f6881c9eac77c5e3166d209682c0ebe8dd07c0"
                },
                {
                  "introduced": "af1546f15fa871b313ebcc7df1fd2df3c396c616"
                },
                {
                  "fixed": "f6d83a28c009ab039ea40ffdb4ccc58f190dfbe6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:firebirdsql:firebird:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "3.0.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:firebirdsql:firebird:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "4.0.0"
                      },
                      {
                        "fixed": "4.0.7"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:firebirdsql:firebird:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "5.0.0"
                      },
                      {
                        "fixed": "5.0.4"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "463bae029a4426deff7e9bb08a8317aaa398c7c7"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v3.0.14"
                  },
                  {
                    "range": [
                      {
                        "fixed": "26f6881c9eac77c5e3166d209682c0ebe8dd07c0"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v4.0.7"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f6d83a28c009ab039ea40ffdb4ccc58f190dfbe6"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v5.0.4"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v3.0.13",
            "v4.0.6",
            "v5.0.3",
            "v5.0.2",
            "v3.0.12",
            "v4.0.5",
            "v5.0.1",
            "v5.0.0",
            "v4.0.4",
            "v3.0.11",
            "v4.0.3",
            "v4.0.2",
            "v3.0.10",
            "v3.0.9",
            "v4.0.1",
            "v3.0.8",
            "v4.0.0",
            "R3_0_7",
            "R3_0_6",
            "R3_0_5",
            "R3_0_4",
            "R3_0_3",
            "R3_0_2",
            "R3_0_1",
            "R3_0_0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40342.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.331752700Z",
      "provider": "osv",
      "references": [
        "https://github.com/FirebirdSQL/firebird/releases/tag/v3.0.14",
        "https://github.com/FirebirdSQL/firebird/releases/tag/v4.0.7",
        "https://github.com/FirebirdSQL/firebird/releases/tag/v5.0.4",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40342.json",
        "https://github.com/FirebirdSQL/firebird/security/advisories/GHSA-7pxc-h3rv-r257",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-40342"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-22",
          "CWE-427",
          "CWE-73",
          "CWE-94"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40342.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-40342",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504623,
  "published_at": "2026-04-17T19:22:46.644+00:00"
}