new file mode 100644
@@ -0,0 +1,43 @@
+From 216bf2cce660265bf7035610fbc67978d65a4ab3 Mon Sep 17 00:00:00 2001
+From: "H.Merijn Brand - Tux" <linux@tux.freedom.nl>
+Date: Wed, 27 May 2026 11:16:50 +0200
+Subject: [PATCH] Fix possible stack overflow (old issue already noted by Tim)
+
+CVE: CVE-2026-9698
+Upstream-Status: Backport [https://github.com/perl5-dbi/dbi/commit/bfe5d73c162d2d1f761a639a0aa33aad6a9eb54e]
+
+Backport Changes:
+ - Omit ChangeLog, dbixs_rev.h, and lib/DBI/Changes.pm release metadata because the target remains DBI 1.643.
+ - Omit the unrelated Makefile.PL documentation-generation update; the DBI.xs security hunk is unchanged.
+
+(cherry picked from commit bfe5d73c162d2d1f761a639a0aa33aad6a9eb54e)
+Signed-off-by: Hetvi Thakar <hthakar@cisco.com>
+---
+ DBI.xs | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/DBI.xs b/DBI.xs
+index 2cea4ac..c549d15 100644
+--- a/DBI.xs
++++ b/DBI.xs
+@@ -3998,7 +3998,6 @@ XS(XS_DBI_dispatch)
+ SV **statement_svp = NULL;
+ const int is_warning = (!SvTRUE(err_sv) && strlen(SvPV_nolen(err_sv))==1);
+ const char *err_meth_name = meth_name;
+- char intro[200];
+
+ if (meth_type == methtype_set_err) {
+ SV **sem_svp = hv_fetch((HV*)SvRV(h), "dbi_set_err_method", 18, GV_ADDWARN);
+@@ -4006,10 +4005,8 @@ XS(XS_DBI_dispatch)
+ err_meth_name = SvPV_nolen(*sem_svp);
+ }
+
+- /* XXX change to vsprintf into sv directly */
+- sprintf(intro,"%s %s %s: ", HvNAME(DBIc_IMP_STASH(imp_xxh)), err_meth_name,
+- SvTRUE(err_sv) ? "failed" : is_warning ? "warning" : "information");
+- msg = sv_2mortal(newSVpv(intro,0));
++ msg = sv_2mortal(newSVpvf("%s %s %s: ", HvNAME(DBIc_IMP_STASH(imp_xxh)), err_meth_name,
++ SvTRUE(err_sv) ? "failed" : is_warning ? "warning" : "information"));
+ if (SvOK(DBIc_ERRSTR(imp_xxh)))
+ sv_catsv(msg, DBIc_ERRSTR(imp_xxh));
+ else
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=10982c7148e0a012c0fd80534522f5c5"
SRC_URI = "http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-${PV}.tar.gz \
file://CVE-2014-10402.patch \
+ file://CVE-2026-9698.patch \
"
SRC_URI[md5sum] = "352f80b1e23769c116082a90905d7398"
SRC_URI[sha256sum] = "8a2b993db560a2c373c174ee976a51027dd780ec766ae17620c20393d2e836fa"