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::LiteralSource - A raw SQL fragment used as a query source.

DESCRIPTION

A source (see DBIx::QuickORM::Role::Source) backed by a literal SQL string rather than a table, view, or join. The object is a blessed scalar reference holding the SQL; source_db_moniker returns that SQL verbatim.

The SQL is spliced in as the FROM target of the generated statement, so by default it must be a table name or FROM-fragment (for example users or users AS u), not a complete SELECT statement. A full statement produces broken SQL (SELECT * FROM SELECT ...).

To query a complete statement, pass the subquery option: the SQL is wrapped as a derived table, ( <sql> ) AS <alias>, where the alias is the value of subquery:

# SELECT * FROM ( SELECT ... ) AS recent
my $src = DBIx::QuickORM::LiteralSource->new($full_select, subquery => 'recent');

Literal sources carry no schema metadata: they expose no fields, no primary key, and no row class, so the field/key accessors return nothing and the source is not cachable. fields_to_fetch is ['*'].

SYNOPSIS

# FROM-fragment (table name)
my $source = DBIx::QuickORM::LiteralSource->new("users");

# Full statement wrapped as a derived table
my $sub = DBIx::QuickORM::LiteralSource->new(
    "SELECT * FROM users WHERE active = 1",
    subquery => 'active_users',
);

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/