CVE-2026-78183
Received Received - Intake

Heap Out-of-Bounds Write in DBD::Pg Perl Module

Vulnerability report for CVE-2026-78183, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-23

Last updated on: 2026-08-23

Assigner: CPANSec

Description

DBD::Pg version 3.21.0 for Perl has a heap out-of-bounds write in quote_float. quote_float() 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::SQL_NUMERIC ). This regression was introduced in 3.21.0 by the quote.c rewrite.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-23
Last Modified
2026-08-23
Generated
2026-08-24
AI Q&A
2026-08-23
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
bucardo dbd_pg 3.21.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-787 The product writes data past the end, or before the beginning, of the intended buffer.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a heap out-of-bounds write in the DBD::Pg Perl module version 3.21.0. The issue occurs in the quote_float function, which incorrectly allocates memory for special floating-point literals like NaN, Inf, or Infinity. The function allocates space for the string plus one byte but requires three extra bytes for these literals, causing a 2-byte overflow. This can be triggered via the $dbh->quote method with DBI::SQL_NUMERIC.

Detection Guidance

This vulnerability is specific to DBD::Pg version 3.21.0 for Perl and involves a heap out-of-bounds write in the quote_float function. Detection requires checking if your system uses this version of DBD::Pg. Use commands like 'perl -MDBD::Pg -e "print $DBD::Pg::VERSION"' to verify the installed version. If version 3.21.0 is detected, the system is vulnerable.

Impact Analysis

This vulnerability could allow an attacker to cause a buffer overflow by providing malicious input through the $dbh->quote method. This may lead to crashes, data corruption, or potentially arbitrary code execution depending on the application's environment and configuration.

Compliance Impact

This vulnerability involves a heap out-of-bounds write in DBD::Pg version 3.21.0, specifically when quoting special floating-point literals like Infinity. While the impact on compliance standards like GDPR or HIPAA is not explicitly detailed in the provided context, such memory corruption issues could potentially lead to data integrity problems or unauthorized access, which may affect compliance with data protection regulations.

Mitigation Strategies

Immediately upgrade DBD::Pg to a version that includes the patch for this vulnerability. The patch addresses incorrect memory allocation for quoting floating-point numbers. Check the official DBD::Pg repository or your package manager for updates. Avoid using the quote method with special float literals like Infinity until patched.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-78183. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart