---
id: "CVE-2026-108518"
kind: "vulnerability"
aliases: ["CVE-2026-108518"]
title: "Perl DBI: type confusion in dbi_profile crashes processes on handle destruction"
severity: "medium"
cvss: null
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["dbi", "package", "perl", "self-hosted"]
not_affected_if: ["dbi-1.656-or-later", "no-profiling-enabled"]
published_at: "2026-10-20T22:18:48+00:00"
first_seen_at: "2026-10-23T21:57:23+00:00"
updated_at: "2026-10-25T05:04:15+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-108518", "first_seen_at": "2026-10-23T21:57:23+00:00"}]
---

# Perl DBI: type confusion in dbi_profile crashes processes on handle destruction

DBI before 1.656 for Perl mishandles a database handle being destroyed while a Profile Path with an {attr} element is active, so dbi_profile dereferences a hash bucket array as if it were a handle. The result is a SIGSEGV that kills the process, a denial of service; the sources do not describe code execution.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Run `perl -MDBI -e 'print $DBI::VERSION'` and compare the output with `1.656`
- Check whether `DBI_PROFILE` is set in the environment or whether the application sets the Profile attribute with an {attr} element (`grep -rn 'Profile' .`)

## Fix

- Upgrade the DBI module to `1.656` or later
- Unset `DBI_PROFILE` or remove {attr} elements from Profile paths until upgraded

## Timeline

- 2026-10-23T21:57:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-108518

## From the sources

DBI versions before 1.656 for Perl crash via type confusion in dbi_profile when a database handle is destroyed under a Profile Path with an {attr} element.

An {attr} element names a database handle attribute, which dbi_profile reads from the handle's inner hash. It expects the inner handle as a reference and dereferences it, but a handle that is being destroyed hands back the inner hash itself, so the dereference yields the hash's bucket array. A type check on that pointer usually fails and the call goes unprofiled. When the memory it addresses passes the check, the attribute lookup dereferences a NULL or invalid pointer and the process dies on SIGSEGV.

The Path is set by the application, by the Profile handle attribute, or by the DBI_PROFILE environment variable, so `DBI_PROFILE={ImplementorClass}` can crash an unmodified program.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
