HMBRAND DBI::SQL::Nano
DBI::SQL::Nano versions from 1.42 before 1.651 for Perl have inverted <= and >= SQL operators on text
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 1.42, < 1.651
Fixed in 1.651
Mitigation
Upgrade to DBI 1.651 or later.
Workaround
For deployments that cannot upgrade, apply the patch or install SQL::Statement.
References
- Vendor advisory github.com/perl5-dbi/dbi/security/advisories/G…
- Release notes metacpan.org/release/HMBRAND/DBI-1.651/changes
- Patch github.com/perl5-dbi/dbi/commit/e9742ef85a7586…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.