CVE-2026-15043
Deferred Deferred - Pending Action

Incorrect SQL Operator Comparison in DBI::SQL::Nano

Vulnerability report for CVE-2026-15043, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-14

Last updated on: 2026-07-14

Assigner: CPANSec

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-14
Last Modified
2026-07-14
Generated
2026-08-04
AI Q&A
2026-07-14
EPSS Evaluated
2026-08-02
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
perl dbi 1.42
perl dbi 1.650
perl dbi From 1.651 (inc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-480 The product accidentally uses the wrong operator, which changes the logic in security-relevant ways.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability affects DBI::SQL::Nano, a built-in mini-SQL engine for Perl's DBI module. The issue involves inverted SQL comparison operators (<= and >=) when evaluating text-based comparisons.

Specifically, in the is_matched method's non-numeric string branch, the <= operator incorrectly uses Perl's 'ge' (greater than or equal) operator, and the >= operator incorrectly uses Perl's 'le' (less than or equal) operator. This means that WHERE clauses using these operators on text values return the opposite results of what they should.

DBI::SQL::Nano is used as a fallback query engine for DBI's file-backed drivers (such as DBD::File, DBD::DBM, and CSV-style drivers) when SQL::Statement is not installed. It is also forced when DBI_SQL_NANO=1 is set. This flaw can cause applications to silently retrieve incorrect rows when filtering data, which may impact policy enforcement or authorization logic.

  • Affected versions: DBI versions 1.42 through 1.650.
  • Fixed version: DBI version 1.651.
Detection Guidance

Detecting this vulnerability requires checking the version of the DBI module installed on your Perl environment and verifying if DBI::SQL::Nano is being used as the SQL engine for file-backed drivers.

  • Check the installed version of DBI: Run the command 'perl -MDBI -e 'print $DBI::VERSION'' to display the version. If the version is between 1.42 and 1.650, the system is vulnerable.
  • Determine if DBI::SQL::Nano is in use: Check if the environment variable DBI_SQL_NANO is set to 1 or if SQL::Statement is not installed. Run 'perl -e 'print $ENV{DBI_SQL_NANO}'' to check the environment variable. To check for SQL::Statement, run 'perl -MSQL::Statement -e 1'. If this fails, SQL::Statement is not installed, and DBI::SQL::Nano is likely being used.
  • Review application logs or code for queries using file-backed drivers (e.g., DBD::File, DBD::DBM) with WHERE clauses containing <= or >= operators on text fields. These queries may return incorrect results if the vulnerability is present.
Impact Analysis

The impact of this vulnerability depends on how your application uses DBI::SQL::Nano and file-backed database drivers.

If your application relies on WHERE clauses to filter data for policy enforcement, authorization, or access control, this vulnerability could silently return incorrect rows. For example, a query intended to restrict access to certain records might instead grant access to unintended records, or vice versa.

In scenarios where data filtering is critical for security (e.g., user permissions, sensitive data access), this flaw could lead to unauthorized access or data leaks. For display-only queries, the impact may be limited to incorrect data being shown, but this could still cause confusion or operational issues.

  • Potential risks include bypassing access controls or authorization policies.
  • No SQL injection or remote code execution is possible due to this vulnerability.
Compliance Impact

This vulnerability could impact compliance with standards and regulations that require strict access control, data integrity, or confidentiality, such as GDPR or HIPAA.

For GDPR, if the vulnerability leads to unauthorized access to personal data, it could result in a violation of data protection principles, particularly the requirement to ensure appropriate security measures (Article 5(1)(f)) and the right to protection of personal data (Article 32). Incorrect filtering of data might also lead to non-compliance with data subject access requests (Article 15).

For HIPAA, if the vulnerability affects systems handling protected health information (PHI), it could violate the Security Rule, which mandates safeguards to ensure the confidentiality, integrity, and availability of electronic PHI. Incorrect data filtering might result in unauthorized disclosure of PHI, leading to non-compliance.

In both cases, the organization could face regulatory scrutiny, fines, or reputational damage if the vulnerability is exploited or if it leads to a breach of sensitive data.

Mitigation Strategies

To mitigate this vulnerability, follow these immediate steps:

  • Upgrade the DBI module to version 1.651 or later. This version includes the fix for the inverted <= and >= operators. Use the command 'cpan DBI' or your system's package manager to upgrade.
  • If upgrading is not immediately possible, install the SQL::Statement module. This will prevent DBI::SQL::Nano from being used as the fallback engine. Install it using 'cpan SQL::Statement'.
  • Alternatively, apply the patch provided in Resource 2 to fix the inverted operators in DBI::SQL::Nano. The patch swaps the incorrect 'ge' and 'le' operators for <= and >= comparisons.
  • Review applications that use file-backed drivers (e.g., DBD::File, DBD::DBM) and rely on WHERE clauses with <= or >= operators on text fields. Manually verify the results of such queries to ensure they are correct until the fix is applied.
  • If the environment variable DBI_SQL_NANO is set to 1, unset it to allow the use of SQL::Statement if installed. Run 'unset DBI_SQL_NANO' in your shell or remove it from your application's environment configuration.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-15043. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart