Security Advisories (13)
CVE-2020-14393 (2020-09-16)

A buffer overflow was found in perl-DBI < 1.643 in DBI.xs. A local attacker who is able to supply a string longer than 300 characters could cause an out-of-bounds write, affecting the availability of the service or integrity of data.

CVE-2020-14392 (2020-06-17)

An untrusted pointer dereference flaw was found in Perl-DBI < 1.643. A local attacker who is able to manipulate calls to dbd_db_login6_sv() could cause memory corruption, affecting the service's availability.

CVE-2019-20919 (2020-09-17)

An issue was discovered in the DBI module before 1.643 for Perl. The hv_fetch() documentation requires checking for NULL and the code does that. But, shortly thereafter, it calls SvOK(profile), causing a NULL pointer dereference.

CVE-2014-10402 (2020-09-16)

An issue was discovered in the DBI module through 1.643 for Perl. DBD::File drivers can open files from folders other than those specifically passed via the f_dir attribute in the data source name (DSN). NOTE: this issue exists because of an incomplete fix for CVE-2014-10401.

CVE-2026-10879 (2026-06-05)

DBI versions before 1.648 for Perl have a heap overflow when preparsing SQL statements with more than 9 binders. The preparse method expands SQL placeholder characters to numbered binders of the form :pN, but only allocates three characters per binder in the buffer. Placeholders 10-99 require four characters, 100-999 require five characters, et cetera.

CVE-2026-14380 (2026-07-07)

DBI versions before 1.650 for Perl are vulnerable to code injection via caller-influenced Profile. When a string is assigned to a DBI handle's Profile attribute, DBI splits it into path, package and arguments, and interpolates the package part in a string eval with no validation of the package name. Any caller-influenced value that reaches the Profile attribute is therefore arbitrary Perl code execution, including calls to run system commands. The Profile attribute can be set from three different sources that can carry untrusted data: the DBI_PROFILE environment variable, a direct attribute assignment, and a DSN driver-attribute clause dbi:Driver(Profile=>SPEC):db. An attacker controlling any of those inputs runs arbitrary Perl in the host process. The strongest remote position is a network-exposed DBI::Gofer / DBI::ProxyServer whose per-request DSN reaches the Profile attribute, letting a client execute code on the broker host.

CVE-2026-14739 (2026-07-07)

DBI versions before 1.650 for Perl have a heap overflow when preparsing SQL statements with an extreme number of placeholders. The fix for CVE-2026-10879 did not allocate enough memory to handle approximately 1.2-million placeholders. DBI version 1.650 sets a hard limit of 99,999 placeholders.

CVE-2026-14740 (2026-07-07)

DBI versions before 1.650 for Perl read one byte out-of-bounds in preparse when deleting an initial SQL comment. The preparse method normalises SQL and removes comments. When the SQL starts with a comment line, the deletion of that line during normalisation led to an out-of-bounds read by one byte. The result is a fault on memory-hardened builds and nondeterministic newline retention on normal builds.

CVE-2026-15043 (2026-07-14)

DBI::SQL::Nano versions from 1.42 before 1.651 for Perl have inverted <= and >= SQL operators on text. DBI::SQL::Nano, DBI's built-in mini-SQL engine, evaluated WHERE predicates incorrectly in some cases. In the non-numeric string branch of the is_matched method, <= was evaluated using Perl's ge operator, and >= was evaluated using Perl's le operator. SQL::Nano is the fallback query engine for DBI's file-backed drivers (DBD::File, DBD::DBM, CSV-style drivers) whenever SQL::Statement is not installed, and is forced whenever DBI_SQL_NANO=1. Queries over such tables use these predicates directly. The impact depends on the context. Where an application relies on a WHERE clause to filter file-backed data for policy or authorization, an inverted <=/>= comparison silently returns the wrong rows.

CVE-2026-15392 (2026-07-14)

DBD::File versions before 1.651 for Perl do not ensure the table file is not a symlink to an untrusted location. The complete_table_name method builds the absolute table file path without checking whether the file is a symbolic link. A link inside the data directory can point to a table file at any path outside of the configured f_dir and f_dir_search directories. Callers of file-based drivers can read or write files outside of the data directory.

CVE-2026-60081 (2026-07-14)

DBI::ProfileData versions before 1.651 for Perl do not limit the path index. The path index column of profile dump files is used to allocate an array of data for the parser. An unbounded value allows an attacker to specify a large index and consume available memory.

CVE-2026-60082 (2026-07-14)

DBI versions before 1.651 for Perl do not enforce statement handle consistency with the row. When the statement handle had no fields but the source row was non-empty, the internal row-buffer helper would read from a negative array index. This could be triggered by a caller supplying inconsistent metadata and rows to the prepare method.

CVE-2026-9698 (2026-06-09)

DBI versions before 1.648 for Perl saved errors in a limited-sized buffer. Error messages that were returned when RaiseError, PrintError or HandleError were set were written to a 200-byte buffer without a length limit. Attackers that can influence the error text in an application can trigger a buffer overflow.

NAME

dbiprof - command-line client for DBI::ProfileData

SYNOPSIS

See a report of the ten queries with the longest total runtime in the profile dump file prof1.out:

dbiprof prof1.out

See the top 10 most frequently run queries in the profile file dbi.prof (the default):

dbiprof --sort count

See the same report with 15 entries:

dbiprof --sort count --number 15

DESCRIPTION

This tool is a command-line client for the DBI::ProfileData. It allows you to analyze the profile data file produced by DBI::ProfileDumper and produce various useful reports.

OPTIONS

This program accepts the following options:

--number N

Produce this many items in the report. Defaults to 10. If set to "all" then all results are shown.

--sort field

Sort results by the given field. Sorting by multiple fields isn't currently supported (patches welcome). The available sort fields are:

total

Sorts by total time run time across all runs. This is the default sort.

longest

Sorts by the longest single run.

count

Sorts by total number of runs.

first

Sorts by the time taken in the first run.

shortest

Sorts by the shortest single run.

key1

Sorts by the value of the first element in the Path, which should be numeric. You can also sort by key2 and key3.

--reverse

Reverses the selected sort. For example, to see a report of the shortest overall time:

dbiprof --sort total --reverse
--match keyN=value

Consider only items where the specified key matches the given value. Keys are numbered from 1. For example, let's say you used a DBI::Profile Path of:

[ DBIprofile_Statement, DBIprofile_Methodname ]

And called dbiprof as in:

dbiprof --match key2=execute

Your report would only show execute queries, leaving out prepares, fetches, etc.

If the value given starts and ends with slashes (/) then it will be treated as a regular expression. For example, to only include SELECT queries where key1 is the statement:

dbiprof --match key1=/^SELECT/

By default the match expression is matched case-insensitively, but this can be changed with the --case-sensitive option.

--exclude keyN=value

Remove items for where the specified key matches the given value. For example, to exclude all prepare entries where key2 is the method name:

dbiprof --exclude key2=prepare

Like --match, If the value given starts and ends with slashes (/) then it will be treated as a regular expression. For example, to exclude UPDATE queries where key1 is the statement:

dbiprof --match key1=/^UPDATE/

By default the exclude expression is matched case-insensitively, but this can be changed with the --case-sensitive option.

--case-sensitive

Using this option causes --match and --exclude to work case-sensitively. Defaults to off.

--delete

Sets the DeleteFiles option to DBI::ProfileData which causes the files to be deleted after reading. See DBI::ProfileData for more details.

--dumpnodes

Print the list of nodes in the form of a perl data structure. Use the -sort option if you want the list sorted.

--version

Print the dbiprof version number and exit.

AUTHOR

Sam Tregar <sam@tregar.com>

COPYRIGHT AND LICENSE

Copyright (C) 2002 Sam Tregar

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself.

SEE ALSO

DBI::ProfileDumper, DBI::Profile, DBI.