new file mode 100644
@@ -0,0 +1,95 @@
+From de9c8200cf327f45abfcd88774fb40e82b3fe58e Mon Sep 17 00:00:00 2001
+From: Toon Claes <toon@iotcl.com>
+Date: Thu, 9 Apr 2026 18:04:14 +0200
+Subject: [PATCH] connect: validate unborn HEAD symref-target in protocol v2
+
+A server using protocol v2 can advertise an unborn HEAD with
+symref-target. This symref can include various unallowed characters. The
+client copies this value verbatim into .git/HEAD. When subsequent
+actions want to update HEAD, resolving the ref can lead to unwanted
+behavior.
+
+Add check_refname_format() validation in process_ref_v2() before
+accepting the unborn HEAD symref-target. And as an added measure, also
+add similar validation in clone.c.
+
+Only protocol v2 needs to be hardened against this, v1 already checks
+refnames since a45b5f0552 (connect: annotate refs with their symref
+information in get_remote_head(), 2013-09-17).
+
+CVE: CVE-2026-113408
+Upstream-Status: Backport [https://github.com/git/git/commit/b371db812524aa7831d3c3a9aed782defd1dcfb2]
+
+Reported-by: Luke Martin <lmartin@paramenoeng.com>
+Signed-off-by: Toon Claes <toon@iotcl.com>
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ builtin/clone.c | 1 +
+ connect.c | 5 ++++-
+ t/t5702-protocol-v2.sh | 25 +++++++++++++++++++++++++
+ 3 files changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/builtin/clone.c b/builtin/clone.c
+index b40cee59..3b8c0efa 100644
+--- a/builtin/clone.c
++++ b/builtin/clone.c
+@@ -1561,6 +1561,7 @@ int cmd_clone(int argc,
+ }
+
+ if (transport_ls_refs_options.unborn_head_target &&
++ !check_refname_format(transport_ls_refs_options.unborn_head_target, 0) &&
+ skip_prefix(transport_ls_refs_options.unborn_head_target,
+ "refs/heads/", &branch)) {
+ unborn_head = xstrdup(transport_ls_refs_options.unborn_head_target);
+diff --git a/connect.c b/connect.c
+index c6f76e30..d4efa49a 100644
+--- a/connect.c
++++ b/connect.c
+@@ -426,7 +426,10 @@ static int process_ref_v2(struct packet_reader *reader, struct ref ***list,
+ const char *arg = line_sections.items[i].string;
+
+ if (skip_prefix(arg, "symref-target:", &arg)) {
+- *unborn_head_target = xstrdup(arg);
++ if (!check_refname_format(arg, 0))
++ *unborn_head_target = xstrdup(arg);
++ else
++ warning(_("remote advertised invalid symref-target '%s', ignoring"), arg);
+ break;
+ }
+ }
+diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
+index f826ac46..85bf9b06 100755
+--- a/t/t5702-protocol-v2.sh
++++ b/t/t5702-protocol-v2.sh
+@@ -1077,6 +1077,31 @@ test_expect_success 'clone big repository with http:// using protocol v2' '
+ grep "Send header: Transfer-Encoding: chunked" log
+ '
+
++test_expect_success 'clone with http:// using protocol v2 rejects invalid unborn symref-target' '
++ P="$HTTPD_DOCUMENT_ROOT_PATH/http_unborn_invalid" &&
++
++ git init "$P" &&
++ test_commit -C "$P" --no-tag stuff &&
++ git -C "$P" config lsrefs.unborn advertise &&
++ git -C "$P" symbolic-ref HEAD refs/heads/mydefaultbranch &&
++
++ # Advertise an unborn symref-target HEAD to include invalid characters
++ write_script "$HTTPD_ROOT_PATH/one-time-script" <<-\EOF &&
++ sed "s/mydefaultbranch/this*is*invalid/" "$1"
++ EOF
++
++ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME= \
++ git -c init.defaultBranch=main -c protocol.version=2 \
++ clone "$HTTPD_URL/one_time_script/http_unborn_invalid" \
++ http_unborn_child 2>stderr &&
++
++ # Client rejects the invalid HEAD and falls back to its default branch name
++ echo "refs/heads/main" >expect &&
++ git -C http_unborn_child symbolic-ref HEAD >actual &&
++ test_cmp expect actual &&
++ test_grep "remote advertised invalid symref-target" stderr
++'
++
+ test_expect_success 'fetch with http:// using protocol v2' '
+ test_when_finished "rm -f log" &&
+
new file mode 100644
@@ -0,0 +1,79 @@
+From 327316a4077612f034e3f2d68e8772d4763cb39e Mon Sep 17 00:00:00 2001
+From: Toon Claes <toon@iotcl.com>
+Date: Thu, 9 Apr 2026 18:04:15 +0200
+Subject: [PATCH] connect: validate born ref symref-target in protocol v2
+
+A server using protocol v2 can advertise HEAD with a symref-target
+attribute. The value is stored in ref->symref without validation. It
+is used by guess_remote_head() to determine which local branch HEAD
+should point to.
+
+Add check_refname_format() validation for the born ref symref-target
+value, matching the protection already added for unborn HEAD in the
+previous commit. Invalid symref-targets are silently dropped, causing
+guess_remote_head() to find what HEAD most likely points to.
+
+CVE: CVE-2026-113408
+Upstream-Status: Backport [https://github.com/git/git/commit/8cb7e2e031978c59381adf086fd1c0ce1e3a7315]
+
+Reported-by: Luke Martin <lmartin@paramenoeng.com>
+Signed-off-by: Toon Claes <toon@iotcl.com>
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ connect.c | 8 ++++++--
+ t/t5702-protocol-v2.sh | 23 +++++++++++++++++++++++
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/connect.c b/connect.c
+index d4efa49a..4c5878b5 100644
+--- a/connect.c
++++ b/connect.c
+@@ -450,8 +450,12 @@ static int process_ref_v2(struct packet_reader *reader, struct ref ***list,
+
+ for (; i < line_sections.nr; i++) {
+ const char *arg = line_sections.items[i].string;
+- if (skip_prefix(arg, "symref-target:", &arg))
+- ref->symref = xstrdup(arg);
++ if (skip_prefix(arg, "symref-target:", &arg)) {
++ if (!check_refname_format(arg, 0))
++ ref->symref = xstrdup(arg);
++ else
++ warning(_("remote advertised invalid symref-target '%s', ignoring"), arg);
++ }
+
+ if (skip_prefix(arg, "peeled:", &arg)) {
+ struct object_id peeled_oid;
+diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
+index 85bf9b06..1dbcc92e 100755
+--- a/t/t5702-protocol-v2.sh
++++ b/t/t5702-protocol-v2.sh
+@@ -1102,6 +1102,29 @@ test_expect_success 'clone with http:// using protocol v2 rejects invalid unborn
+ test_grep "remote advertised invalid symref-target" stderr
+ '
+
++test_expect_success 'clone with http:// using protocol v2 rejects invalid symref-target' '
++ P="$HTTPD_DOCUMENT_ROOT_PATH/http_head_invalid" &&
++
++ git init "$P" &&
++ test_commit -C "$P" one &&
++
++ # Advertise a symref-target HEAD to include invalid characters
++ write_script "$HTTPD_ROOT_PATH/one-time-script" <<-\EOF &&
++ sed "s|symref-target:refs/heads/main|symref-target:refs/heads/ma*n|" "$1"
++ EOF
++
++ git -c protocol.version=2 \
++ clone "$HTTPD_URL/one_time_script/http_head_invalid" \
++ http_head_child 2>stderr &&
++
++ # Client rejects the invalid HEAD and guess_remote_head falls back
++ # to a ref matching the OID matching, being refs/heads/main
++ echo "refs/heads/main" >expect &&
++ git -C http_head_child symbolic-ref HEAD >actual &&
++ test_cmp expect actual &&
++ test_grep "remote advertised invalid symref-target" stderr
++'
++
+ test_expect_success 'fetch with http:// using protocol v2' '
+ test_when_finished "rm -f log" &&
+
new file mode 100644
@@ -0,0 +1,76 @@
+From eb0b64cf98b9cf2a34ee4a8928e5b20da4b1c9f6 Mon Sep 17 00:00:00 2001
+From: Toon Claes <toon@iotcl.com>
+Date: Thu, 9 Apr 2026 18:04:16 +0200
+Subject: [PATCH] connect: validate ref names in protocol v2 ls-refs response
+
+A server using protocol v2 can advertise many refs in the ls-refs
+response. At the client, these are passed directly into alloc_ref()
+without validation.
+
+Validate all incoming refs using check_refname_format() with
+REFNAME_ALLOW_ONELEVEL (to accept HEAD). Invalid ref names are skipped
+with a warning, allowing the clone/fetch to proceed with other valid
+refs.
+
+CVE: CVE-2026-113408
+Upstream-Status: Backport [https://github.com/git/git/commit/f357b9c2c77eae1a1d37dfa44c1dda53f532a82a]
+
+Reported-by: Luke Martin <lmartin@paramenoeng.com>
+Signed-off-by: Toon Claes <toon@iotcl.com>
+Signed-off-by: Ashishkumar Parmar <asparmar@cisco.com>
+---
+ connect.c | 7 +++++++
+ t/t5702-protocol-v2.sh | 22 ++++++++++++++++++++++
+ 2 files changed, 29 insertions(+)
+
+diff --git a/connect.c b/connect.c
+index 4c5878b5..20106262 100644
+--- a/connect.c
++++ b/connect.c
+@@ -442,6 +442,13 @@ static int process_ref_v2(struct packet_reader *reader, struct ref ***list,
+ goto out;
+ }
+
++ if (check_refname_format(line_sections.items[i].string,
++ REFNAME_ALLOW_ONELEVEL)) {
++ warning(_("remote advertised invalid ref name '%s', ignoring"),
++ line_sections.items[i].string);
++ goto out;
++ }
++
+ ref = alloc_ref(line_sections.items[i++].string);
+
+ memcpy(ref->old_oid.hash, old_oid.hash, reader->hash_algo->rawsz);
+diff --git a/t/t5702-protocol-v2.sh b/t/t5702-protocol-v2.sh
+index 1dbcc92e..a2ef4983 100755
+--- a/t/t5702-protocol-v2.sh
++++ b/t/t5702-protocol-v2.sh
+@@ -1125,6 +1125,28 @@ test_expect_success 'clone with http:// using protocol v2 rejects invalid symref
+ test_grep "remote advertised invalid symref-target" stderr
+ '
+
++test_expect_success 'clone via http:// using protocol v2 rejects invalid ref from ls-refs' '
++ P="$HTTPD_DOCUMENT_ROOT_PATH/http_lsref_invalid" &&
++
++ git init "$P" &&
++ test_commit -C "$P" one &&
++ git -C "$P" checkout -b branchwithstuff &&
++ test_commit -C "$P" two &&
++
++ # Inject a ref with invalid characters
++ write_script "$HTTPD_ROOT_PATH/one-time-script" <<-\EOF &&
++ sed "s| refs/heads/main| refs/heads/ma*n|" "$1"
++ EOF
++
++ git -c protocol.version=2 \
++ clone "$HTTPD_URL/one_time_script/http_lsref_invalid" \
++ http_lsref_child 2>stderr &&
++
++ # The invalid ref name should be rejected with a warning
++ git -C http_lsref_child rev-parse refs/remotes/origin/branchwithstuff &&
++ test_grep "remote advertised invalid ref name" stderr
++'
++
+ test_expect_success 'fetch with http:// using protocol v2' '
+ test_when_finished "rm -f log" &&
+
@@ -12,6 +12,9 @@ SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \
file://CVE-2026-105437_p1.patch \
file://CVE-2026-105437_p2.patch \
+ file://CVE-2026-113408_p1.patch \
+ file://CVE-2026-113408_p2.patch \
+ file://CVE-2026-113408_p3.patch \
"
SRC_URI:append:class-nativesdk = " \