CVE-2026-78183: CWE-787 Out-of-bounds Write
DBD::Pg version 3.21.0 for Perl contains a heap out-of-bounds write vulnerability in the quote_float function. The issue occurs because quote_float allocates insufficient memory when handling special floating-point literals such as NaN, Inf, and Infinity, leading to a buffer overflow by 2 bytes. This vulnerability can be triggered via the $dbh->quote method with these special literals. The flaw was introduced in version 3.21.0 due to a rewrite of quote.c.
AI Analysis
Technical Summary
CVE-2026-78183 is a heap out-of-bounds write vulnerability in DBD::Pg 3.21.0 for Perl, specifically in the quote_float function. The function allocates memory based on the length of the string plus one byte for the NULL terminator, which is sufficient for normal numeric values. However, for special floating-point literals like NaN, Inf, +Inf, -Inf, Infinity, +Infinity, and -Infinity, the function emits the literal surrounded by quotes plus a NULL terminator, requiring length plus three bytes. This mismatch causes an overflow by 2 bytes (a single quote and a NULL byte) on the heap. The vulnerability can be exploited by calling the $dbh->quote method with these special literals. This regression was introduced in version 3.21.0 following a rewrite of the quote.c source file.
Potential Impact
The heap out-of-bounds write can lead to memory corruption, which may cause application crashes or potentially enable arbitrary code execution depending on the context in which the vulnerable function is used. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
No official fix or patch has been published yet for this vulnerability. Users should avoid using version 3.21.0 of DBD::Pg or refrain from quoting special floating-point literals such as NaN, Inf, and Infinity using the $dbh->quote method until a patch is released. Monitor the vendor or CPAN security advisories for updates and apply official fixes once available.
CVE-2026-78183: CWE-787 Out-of-bounds Write
Description
DBD::Pg version 3.21.0 for Perl contains a heap out-of-bounds write vulnerability in the quote_float function. The issue occurs because quote_float allocates insufficient memory when handling special floating-point literals such as NaN, Inf, and Infinity, leading to a buffer overflow by 2 bytes. This vulnerability can be triggered via the $dbh->quote method with these special literals. The flaw was introduced in version 3.21.0 due to a rewrite of quote.c.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-78183 is a heap out-of-bounds write vulnerability in DBD::Pg 3.21.0 for Perl, specifically in the quote_float function. The function allocates memory based on the length of the string plus one byte for the NULL terminator, which is sufficient for normal numeric values. However, for special floating-point literals like NaN, Inf, +Inf, -Inf, Infinity, +Infinity, and -Infinity, the function emits the literal surrounded by quotes plus a NULL terminator, requiring length plus three bytes. This mismatch causes an overflow by 2 bytes (a single quote and a NULL byte) on the heap. The vulnerability can be exploited by calling the $dbh->quote method with these special literals. This regression was introduced in version 3.21.0 following a rewrite of the quote.c source file.
Potential Impact
The heap out-of-bounds write can lead to memory corruption, which may cause application crashes or potentially enable arbitrary code execution depending on the context in which the vulnerable function is used. However, no known exploits are reported in the wild at this time.
Mitigation Recommendations
No official fix or patch has been published yet for this vulnerability. Users should avoid using version 3.21.0 of DBD::Pg or refrain from quoting special floating-point literals such as NaN, Inf, and Infinity using the $dbh->quote method until a patch is released. Monitor the vendor or CPAN security advisories for updates and apply official fixes once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-08-23T16:38:31.813Z
- Cvss Version
- null
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a8b5310acd9273b4954fa2c
Added to database: 08/23/2026, 20:07:44 UTC
Last enriched: 08/23/2026, 20:22:03 UTC
Last updated: 08/23/2026, 20:30:17 UTC
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.