CVE-2026-78183: DBD::Pg version 3.21.0 for Perl has a heap out-of-bounds write in quote_float

Published Aug 23, 2026
·
Updated

DBD::Pg version 3.21.0 for Perl has a heap out-of-bounds write in quotefloat.

quotefloat() allocates the length of the string + 1, which is the size of the bare numeric symbol plus NULL. But for special literals NaN, Inf, +Inf, -Inf, Infinity, +Infinity, -Infinity it emits the literal surrounded by quotes plus NULL, which is length + 3 bytes. Every recognised literal (case-insensitive) overflows by 2 bytes, a single quote and a NULL.

This can be reached by the $dbh->quote method, for example

$dbh->quote( "Infinity", DBI::SQLNUMERIC ).

This regression was introduced in 3.21.0 by the quote.c rewrite.

Affected Software

1 affected component
DBD::Pg DBD::Pg=3.21.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade DBD::Pg (Perl) to a version that resolves this vulnerability.

    Fixed in 3.21.1

Event History

Aug 23, 2026
CVE Published
via MITRE·07:53 PM
Data Sourced
via MITRE·07:53 PM
RemedyDescriptionWeakness
Data Sourced
via NVD·08:16 PM
DescriptionWeakness

Frequently Asked Questions

1

What input is required to trigger the out-of-bounds write?

The application must call quote_float(), directly or through $dbh->quote with DBI::SQL_NUMERIC, using a recognized special numeric literal. Affected values are case-insensitive forms of NaN, Inf, +Inf, -Inf, Infinity, +Infinity, and -Infinity.

2

Are ordinary numeric values affected?

The described overflow occurs when quote_float() handles the listed special literals, because it adds quotes around them without allocating enough space. The data does not describe an overflow for ordinary numeric values.

3

Which version introduced the issue?

The issue was introduced in DBD::Pg 3.21.0 as part of the quote.c rewrite.

4

How can I identify potentially affected application code?

Review code paths that call $dbh->quote with DBI::SQL_NUMERIC, or otherwise invoke quote_float(), and determine whether attacker-controlled or otherwise untrusted values can be one of the recognized special floating-point literals.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203