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.
Published: 2026-07-14
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

DBI::SQL::Nano, the miniature SQL engine bundled with Perl’s DBI module, contains a logic error in the is_matched method: when dealing with non‑numeric strings, the operator <= is implemented with Perl’s ge and >= with le, effectively inverting the comparison. The consequence is that any WHERE clause that relies on text comparisons returns the opposite set of rows, silently subverting policy or authorization checks that use such predicates.

Affected Systems

Versions of HMBRAND's DBI::SQL::Nano module from 1.42 up to and including 1.650 are affected. These versions are used by file‑backed drivers such as DBD::File, DBD::DBM, and CSV‑style drivers whenever SQL::Statement is not present, and they are also forced into use when the environment variable DBI_SQL_NANO is set to 1.

Risk and Exploitability

The CVSS score of 9.8 indicates a critical vulnerability, while the EPSS score of < 1 % suggests low current exploitation activity; the issue is not listed in CISA’s KEV catalog. The likely attack surface is local or application‑level, requiring that an adversary be able to dictate a SQL query that includes a <= or >= comparison against a text field in a file‑backed database accessed through DBI. Based on the description, the attacker could manipulate the query to retrieve rows that should have been excluded, or otherwise bypass application‑level authorization checks that depend on text comparisons.

Generated by OpenCVE AI on August 1, 2026 at 10:00 UTC.

Remediation

Vendor Solution

Upgrade to DBI 1.651 or later.


Vendor Workaround

For deployments that cannot upgrade, apply the patch or install SQL::Statement.


OpenCVE Recommended Actions

  • Upgrade DBI to version 1.651 or newer, which removes the inverted operator logic.
  • Apply the community patch located in the provided GitHub commit to correct the logic error.
  • Install the SQL::Statement module, which replaces the faulty Nano engine.
  • Ensure the environment variable DBI_SQL_NANO is unset or set to 0 to prevent fallback to the dangerous Nano engine.

Generated by OpenCVE AI on August 1, 2026 at 10:00 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 27 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
First Time appeared Hmbrand
Hmbrand dbi::sql::nano
Vendors & Products Hmbrand
Hmbrand dbi::sql::nano

Fri, 17 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Tue, 14 Jul 2026 15:45:00 +0000

Type Values Removed Values Added
References

Tue, 14 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Tue, 14 Jul 2026 10:00:00 +0000

Type Values Removed Values Added
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.
Title DBI::SQL::Nano versions from 1.42 before 1.651 for Perl have inverted <= and >= SQL operators on text
Weaknesses CWE-480
References

Subscriptions

Hmbrand Dbi::sql::nano
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-07-14T15:32:33.329Z

Reserved: 2026-07-08T11:48:00.718Z

Link: CVE-2026-15043

cve-icon Vulnrichment

Updated: 2026-07-14T11:30:25.876Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-14T09:44:25Z

Links: CVE-2026-15043 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T10:15:03Z

Weaknesses
  • CWE-480

    Use of Incorrect Operator