Skip to main content

DBD::Pg EUVDEUVD-2026-64665

| CVE-2026-78183 CRITICAL
Out-of-bounds Write (CWE-787)
2026-08-23 CPANSec GHSA-6mq2-jf7v-pvjx
9.8
CVSS 3.1 · Vendor: CPANSec
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit special literal via app input
  2. Delivery
    App calls quote() with SQL_NUMERIC
  3. Exploit
    quote_float allocates length+1 not +3
  4. Execution
    2-byte heap out-of-bounds write
  5. Impact
    Corrupt adjacent heap, crash or DoS

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the application to invoke DBD::Pg's quote functionality with a numeric SQL type - concretely $dbh->quote(value, DBI::SQL_NUMERIC) (or an equivalent SQL_FLOAT/numeric type binding) - on attacker-controlled input, and that input must be one of the recognised special literals NaN, Inf, +Inf, -Inf, Infinity, +Infinity, or -Infinity (matched case-insensitively). What limits exploitation: it only triggers on DBD::Pg 3.21.0 specifically, only via the numeric-type quoting path (not ordinary string quoting or parameter binding), and only for those literal values; the overflow is a fixed 2 bytes (one quote character plus NULL), which constrains what an attacker can corrupt. It is unauthenticated at the network level only insofar as a front-end application relays the tainted value into that non-default quote() call.

Impact

The input CVSS is 9.8 (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H), but the real-world signals argue for materially lower priority: EPSS is only 0.23% (14th percentile), there is no KEV listing, and SSVC records exploitation as none. SSVC does flag Automatable:yes and Technical Impact:total, which reflects worst-case heap-corruption potential rather than observed exploitability. The 9.8 network/unauthenticated rating is transitive at best - the flaw is only reachable if an application explicitly calls quote() with a numeric SQL type (e.g. SQL_NUMERIC/SQL_FLOAT) on attacker-influenced input containing one of the special literals, which is not a default or common code path. The overflow itself is a fixed 2-byte write (a single quote and a NULL), so a full C:H/I:H/A:H remote-code-execution outcome is not established by the available evidence; denial of service via heap corruption is the more probable impact. Treat as a genuine memory-safety bug to patch, but not an emergency: the CVSS network vector overstates accessibility relative to the specific quote()-with-numeric-type precondition implied by the description.

Exploit ScenarioDerived

An application takes a user-supplied field and, believing it numeric, passes it through $dbh->quote($input, DBI::SQL_NUMERIC); an attacker submits the string 'Infinity' (or NaN/Inf variants, case-insensitive), causing quote_float() to write 2 bytes past its heap allocation. Repeated or carefully timed requests corrupt adjacent heap structures, most plausibly crashing the process (denial of service). No public proof-of-concept exploit was identified in the provided data.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 25, 2026

Heap out-of-bounds write in DBD::Pg 3.21.0, the Perl DBI driver for PostgreSQL, lets an attacker corrupt heap memory by passing special floating-point literals (NaN, Inf, +Inf, -Inf, Infinity, and signed variants) to the quote_float() routine, reachable through the common $dbh->quote(value, DBI::SQL_NUMERIC) path. The bug is a 2-byte overwrite (a single quote plus a NULL terminator) introduced by the 3.21.0 quote.c rewrite and fixed in 3.21.1. No public exploit identified at time of analysis; EPSS is low (0.23%, 14th percentile) and CISA SSVC records exploitation status as none.

RemediationAI

Vendor-released patch: 3.21.1 - upgrade DBD::Pg to 3.21.1 or later (fix confirmed in the CPAN Changes at https://metacpan.org/release/TURNSTEP/DBD-Pg-3.21.1/source/Changes and commit 6d6f47ed2403cda55c82b1bad56e388ba7390065). Since 3.21.0 is the only affected release, an alternative is to downgrade to a pre-3.21.0 version that predates the quote.c rewrite if immediate upgrade is not possible. As an interim compensating control for applications that cannot patch, audit code paths that call $dbh->quote() (or quote_identifier) with a numeric type such as DBI::SQL_NUMERIC/SQL_FLOAT and avoid passing untrusted or unvalidated strings there - for example reject or numerically validate inputs before quoting so the NaN/Inf literal branch is never reached; the trade-off is added input-validation logic and possible rejection of legitimately unusual numeric strings. Refer to the vendor advisory GHSA-785p-fw3v-r822 and the oss-security post (https://seclists.org/oss-sec/2026/q3/554) for details.

Affected ProductsAI

DBD::Pg version 3.21.0 for Perl (the PostgreSQL DBI driver, distributed as TURNSTEP/DBD-Pg on CPAN) is affected; the regression was introduced in 3.21.0 by the quote.c rewrite and does not affect earlier releases. The vendor security advisory is GHSA-785p-fw3v-r822 (https://github.com/bucardo/dbdpg/security/advisories/GHSA-785p-fw3v-r822), with NVD tracking at https://nvd.nist.gov/vuln/detail/CVE-2026-78183 and ENISA EUVD-2026-64665. No CPE strings were provided in the input, so exact platform enumeration is limited to the version stated in the description and Changes file.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

DBD::Pg is the DBI database driver that connects Perl applications to PostgreSQL, and quoting routines like quote_float() are used to safely render Perl scalars into SQL literals. The root cause is CWE-787 (Out-of-bounds Write): quote_float() allocates strlen(string)+1 bytes assuming a bare numeric token plus NULL, but for the recognised special literals (case-insensitive NaN/Inf/Infinity family) it emits the value wrapped in single quotes, requiring length+3 bytes. The 2-byte shortfall overflows the heap buffer. The vendor commit (6d6f47e) corrects the allocation to length+3 in quote.c, and the same diff also fixes a related off-by-one in pg_destringify_array (strlen(input) vs strlen(input)+1) and a bytea hex de-quoting bounds check, indicating the 3.21.0 quote.c/parsing rewrite introduced several memory-safety regressions.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (CPANSec) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 7.0 HIGH

Reachable only via a non-default quote()-with-numeric-type call on specific literals, so AC:H; a fixed 2-byte heap overflow most plausibly yields crashes (A:H) with limited C/I.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Red Hat 7.5 HIGH

Primary rating from Vendor (CPANSec).

CVSS VectorVendor: CPANSec

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
CVSS changed
Aug 25, 2026 - 20:22 NVD
9.8 (None) 9.8 (CRITICAL)
CVE Published
Aug 23, 2026 - 19:53 cve.org
CRITICAL 9.8
CVE Published
Aug 23, 2026 - 19:53 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.org

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.

Executive ViewAI

Why It Matters

DBD::Pg 3.21.0, a critical Perl library for PostgreSQL database access, contains a memory corruption vulnerability (CVSS 9.8) that could allow attackers to compromise data or system integrity through database operations. Organizations using Perl-based applications are at risk, particularly those handling sensitive data or running database-dependent services. The vendor has released patch 3.21.1; no public exploit has been identified.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 86% exploitable
Prevalence
Medium
de facto PostgreSQL driver for Perl DBI, but only v3.21.0 affected
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Desktop 15 SP7 Not-Affected
SUSE Linux Enterprise Module for Development Tools 15 SP7 Not-Affected
SUSE Linux Enterprise Server 15 SP7 Not-Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Not-Affected
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Not-Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy