Skip to main content
Vulnerability Database/CVE-2026-111879

CVE-2026-111879: Perl DBI DBD::DBM Table Lock DOS Vulnerability

CVE-2026-111879 is a denial of service flaw in Perl DBI versions before 1.656 where failed DBD::DBM table opens cause indefinite blocking due to unreleased locks. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-111879 Overview

CVE-2026-111879 affects the Perl Database Interface (DBI) module versions before 1.656. The flaw lives in the DBD::DBM driver, where a failed open_data call leaves an exclusive flock on the table's lock file. The lock is never released because the table object is not blessed before the croak unwinds. Subsequent opens of the same table block indefinitely, including from separate database handles across different processes. An attacker who controls the Data Source Name (DSN) or connect attributes can trigger the condition by supplying an invalid dbm_mldbm serializer or dbm_type. The issue is tracked under CWE-667: Improper Locking.

Critical Impact

A caller controlling the DSN or connect attributes can permanently deadlock all future opens of a DBD::DBM table across the host.

Affected Products

  • Perl DBI module versions prior to 1.656
  • Applications using DBD::DBM with caller-controlled DSN or connect attributes
  • Perl distributions bundling DBI releases before 1.656

Discovery Timeline

  • 2026-10-20 - CVE CVE-2026-111879 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-111879

Vulnerability Analysis

The DBD::DBM driver's open_data routine creates a lock file and acquires an exclusive flock on it before performing validation checks. Those checks can croak under three conditions: a dbm_mldbm value that is not a module name, a failing tie, or a missing data file. When the croak fires, Perl unwinds the stack before the table object is blessed. Because nothing is blessed, no destructor runs to release the lock, and the meta data holding the open descriptor remains cached on the database handle. The flock has no timeout, so any later open of that table blocks for the lifetime of the handle holding the stale lock. The impact extends beyond the originating process because flock is visible system-wide.

Root Cause

The root cause is an ordering defect: input validation runs after lock acquisition instead of before it. The dbm_mldbm and dbm_type values originate from the DSN or connect attributes, so a caller selecting the serializer or storage backend can force the croak path and strand the lock.

Attack Vector

An attacker who can influence DSN strings or connect attribute hashes passed into DBI->connect can supply an invalid dbm_mldbm module name. The resulting failed open_data leaves the lock file held, and any subsequent legitimate consumer of the same DBD::DBM table hangs indefinitely. This produces a persistent denial-of-service condition against the data store.

perl
sub open_data
{
    my ( $className, $meta, $attrs, $flags ) = @_;

    # Validate dbm_mldbm BEFORE SUPER::open_data creates and flock()s the
    # lock file.  A croak after that point leaves $meta->{lockfh} holding an
    # exclusive lock for as long as the table meta data lives, and the next
    # open of the same table in this process blocks on it forever.
    if ( $meta->{dbm_mldbm} and not $flags->{dropMode} )
    {
        DBD::DBM::_CLASS( $meta->{dbm_mldbm} )
            or croak "Invalid dbm_mldbm '$meta->{dbm_mldbm}': expected a module name";
    }

    $className->SUPER::open_data( $meta, $attrs, $flags );

    unless ( $flags->{dropMode} )

Source: GitHub Commit Patch

The patch validates dbm_mldbm with DBD::DBM::_CLASS before calling SUPER::open_data, ensuring the lock file is never created when the serializer name is invalid.

Detection Methods for CVE-2026-111879

Indicators of Compromise

  • Perl processes stalled inside flock system calls targeting DBD::DBM lock files
  • Orphan .lck files in DBD::DBM data directories that persist across process lifetimes
  • Application logs recording Invalid dbm_mldbm or similar croak messages followed by subsequent connection timeouts

Detection Strategies

  • Inventory installed DBI versions with perl -MDBI -e 'print $DBI::VERSION' and flag any build earlier than 1.656
  • Audit code paths that forward user input into DBI->connect DSN strings or attribute hashes, specifically values for dbm_mldbm and dbm_type
  • Correlate croak events in application logs with later hung database handles against the same DBD::DBM table

Monitoring Recommendations

  • Track long-lived flock holders on filesystem paths used by DBD::DBM tables using lsof or fuser
  • Alert on Perl process trees whose runtime exceeds expected baselines when the parent application uses DBI
  • Record DSN and connect attribute values at the application boundary for forensic review

How to Mitigate CVE-2026-111879

Immediate Actions Required

  • Upgrade the DBI Perl module to version 1.656 or later across all hosts running DBD::DBM
  • Restrict callers from supplying arbitrary dbm_mldbm and dbm_type values through DSN strings or connect attributes
  • Terminate any Perl processes holding stale DBD::DBM lock files and remove the orphan lock files before restart

Patch Information

The fix landed in DBI 1.656 and is documented in the MetaCPAN Release Changes and the GitHub Security Advisory GHSA-8cx8-9vj9-9x7j. The code change is available in the GitHub Commit Patch. Additional discussion is on the OpenWall OSS-Security list.

Workarounds

  • Validate dbm_mldbm module names against an allowlist before passing them to DBI->connect
  • Reject any DSN component originating from untrusted input until the upgrade is applied
  • Isolate DBD::DBM workloads in short-lived processes so a stranded flock cannot block long-running services
bash
# Upgrade DBI from CPAN
cpanm DBI@1.656

# Verify installed version
perl -MDBI -e 'print "DBI $DBI::VERSION\n"'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.