Skip to content
Heist/ feed
Back to feed
Critical

DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse

Type: advisorySources: OSV

DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse. preparse reserves its output buffer with `newSV(strlen(statement) * 7 + 16)`, budgeting seven output bytes per input byte for the longest ':p99999' expansion. The product is computed in STRLEN, which is 32 bits wide on a 32-bit perl build, so a statement of 613,566,757 bytes multiplies to 4,294,967,299, wraps modulo 2^32 to 3, and reserves 19 bytes. The parser then copies the statement out through a raw pointer with no capacity check, writing the whole 585 MB input past the end of the allocation. The 99,999 placeholder limit does not bound this path, which is reached by ordinary non-placeholder content. Any caller that passes an untrusted statement of that length to preparse on a 32-bit perl gets a heap out-of-bounds write of attacker controlled bytes. Builds with a 64-bit STRLEN are not affected, since the wrap there needs a statement of about 2.3 exabytes.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-73193
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 03:52 UTC · Revision 1

Source evidence

DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse

core-osv · Original source

Published 15 Aug 2026, 12:09 UTC

DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse. preparse reserves its output buffer with `newSV(strlen(statement) * 7 + 16)`, budgeting seven output bytes per input byte for the longest ':p99999' expansion. The product is computed in STRLEN, which is 32 bits wide on a 32-bit perl build, so a statement of 613,566,757 bytes multiplies to 4,294,967,299, wraps modulo 2^32 to 3, and reserves 19 bytes. The parser then copies the statement out through a raw pointer with no capacity check, writing the whole 585 MB input past the end of the allocation. The 99,999 placeholder limit does not bound this path, which is reached by ordinary non-placeholder content. Any caller that passes an untrusted statement of that length to preparse on a 32-bit perl gets a heap out-of-bounds write of attacker controlled bytes. Builds with a 64-bit STRLEN are not affected, since the wrap there needs a statement of about 2.3 exabytes.

osv:CVE-2026-73193
Complete source record
{
  "id": "86f97273ee9d9c4717d553daf30b5706a241b6af906c7a1e2328925682ac50f0",
  "url": "https://osv.dev/vulnerability/CVE-2026-73193",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse",
    "summary": "DBI versions before 1.652 for Perl allow a heap out-of-bounds write on 32-bit perl via an integer wraparound in the output buffer size computed by preparse. preparse reserves its output buffer with `newSV(strlen(statement) * 7 + 16)`, budgeting seven output bytes per input byte for the longest ':p99999' expansion. The product is computed in STRLEN, which is 32 bits wide on a 32-bit perl build, so a statement of 613,566,757 bytes multiplies to 4,294,967,299, wraps modulo 2^32 to 3, and reserves 19 bytes. The parser then copies the statement out through a raw pointer with no capacity check, writing the whole 585 MB input past the end of the allocation. The 99,999 placeholder limit does not bound this path, which is reached by ordinary non-placeholder content. Any caller that passes an untrusted statement of that length to preparse on a 32-bit perl gets a heap out-of-bounds write of attacker controlled bytes. Builds with a 64-bit STRLEN are not affected, since the wrap there needs a statement of about 2.3 exabytes.",
    "evidence": "osv:CVE-2026-73193",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2026-73193",
      "aliases": [
        "CVE-2026-73193",
        "GHSA-wj3v-c3hh-mhqr"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/perl5-dbi/dbi",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "7fcc1e8d3500daa993ee78575f8ba5ac5590c7c0"
                },
                {
                  "fixed": "c751ae5a5a6f56c2f8284f37c1f4d43500352ef1"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "1.652"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "fixed": "c751ae5a5a6f56c2f8284f37c1f4d43500352ef1"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "1.651",
            "1.650",
            "1.649",
            "1.648",
            "1.647",
            "1.646",
            "1.645",
            "1.644",
            "1.643_02",
            "1.643_01",
            "1.643",
            "1.642",
            "1.641",
            "1.640",
            "1.639",
            "1.638",
            "1.637",
            "1.636",
            "1.635",
            "1.634",
            "1.633_92",
            "1.633_91",
            "1.633_90",
            "1.633",
            "1.632_90",
            "1.632",
            "1.631",
            "1.630",
            "1.628",
            "1.627",
            "1.626",
            "1.625",
            "1.624",
            "1.622",
            "1.619",
            "1.618",
            "1.615",
            "1.614_90",
            "1.613_93",
            "1.613_92",
            "1.613_91",
            "1.613_90",
            "1.613_71",
            "1.613_70",
            "1.611_94",
            "1.611_93",
            "1.611_92",
            "1.611_91",
            "1.611_90",
            "1.607",
            "1.602",
            "DBI-1.58",
            "DBI-1.57",
            "DBI-1.51",
            "DBI-1.47"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-73193.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:42.107302927Z",
      "provider": "osv",
      "references": [
        "https://cpan.org/modules",
        "https://www.cve.org/CVERecord?id=CVE-2026-14739",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73193.json",
        "https://github.com/perl5-dbi/dbi/security/advisories/GHSA-wj3v-c3hh-mhqr",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-73193",
        "https://github.com/perl5-dbi/dbi/commit/c751ae5a5a6f56c2f8284f37c1f4d43500352ef1.patch",
        "https://github.com/perl5-dbi/dbi"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-190",
          "CWE-787"
        ],
        "cna_assigner": "CPANSec",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/73xxx/CVE-2026-73193.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-73193",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 509989,
  "published_at": "2026-08-15T12:09:03.948+00:00"
}