Security Advisories (1)
CVE-2026-13766 (2026-06-30)

DBIx::QuickORM versions before 0.000026 for Perl allow SQL injection via unquoted SQL identifiers. The default SQL builder, a SQL::Abstract subclass, sets bindtype in its constructor but never quote_char, so SQL::Abstract emits identifiers verbatim. Caller-supplied identifiers (order_by, where-clause column keys, field and returning lists, upsert columns, and join aliases) reach the SQL string raw, while values are placeholder-bound and unaffected. A caller that forwards untrusted input to an affected identifier position, such as a user-controlled order_by value, enables SQL injection: the row order can be made to depend on a sub-select over columns the query never selected, and the where and update identifier positions permit further data disclosure and tampering.

NAME

DBIx::QuickORM::Affinity - Column affinity helpers for DBIx::QuickORM.

DESCRIPTION

Functions for working with column "affinities" - the broad value categories (string, numeric, binary, boolean) that drive type-aware comparison and introspection. Maps SQL type names to affinities, validates affinity names, and compares two values according to a given affinity.

All four functions are exported by default.

SYNOPSIS

use DBIx::QuickORM::Affinity;

my @all      = valid_affinities();
my $affinity = affinity_from_type('VARCHAR(255)');   # 'string'
my $ok       = validate_affinity('numeric');         # 'numeric'

my $same = compare_affinity_values('numeric', 1, 1.0);

EXPORTS

@affinities = valid_affinities()

Returns the sorted, de-duplicated list of valid affinity names.

$affinity_or_undef = validate_affinity($affinity)

Returns the affinity name if it is valid, otherwise returns nothing.

$bool = compare_affinity_values($affinity, $a, $b)

Compares two values under the given affinity and returns true when they are considered equal. For boolean, undef is treated as false; for the other affinities two undefs compare equal and a defined/undef mismatch is unequal. Croaks when $affinity is missing or not valid.

$affinity_or_undef = affinity_from_type($type)

Maps a SQL type name to an affinity. Lower-cases the type, strips any parenthesized size/precision, and resolves common tiny/medium/big/ long/var prefixes. Returns undef for unknown types.

SOURCE

The source code repository for DBIx::QuickORM can be found at https://github.com/exodist/DBIx-QuickORM.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See https://dev.perl.org/licenses/