diff --git a/meta-python/recipes-devtools/python/python3-flask/0001-pyproject.toml-allow-building-with-flit_core-4.patch b/meta-python/recipes-devtools/python/python3-flask/0001-pyproject.toml-allow-building-with-flit_core-4.patch
new file mode 100644
index 0000000000..2a1472696d
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-flask/0001-pyproject.toml-allow-building-with-flit_core-4.patch
@@ -0,0 +1,25 @@
+From: Tim Orling <tim.orling@konsulko.com>
+Subject: [PATCH] pyproject.toml: allow building with flit_core 4
+
+flit_core 4 only drops features this project does not use (the
+[tool.flit.metadata] table, sdists from VCS and --setup-py), so
+raise the upper bound to <5, as the flit 4.0 release notes suggest:
+https://flit.pypa.io/en/stable/history.html#version-4-0
+
+Upstream-Status: Denied [https://github.com/pallets/jinja/issues/2232]
+AI-Generated: Uses Claude Code (Claude Opus 5.5)
+Signed-off-by: Tim Orling <tim.orling@konsulko.com>
+---
+diff --git a/pyproject.toml b/pyproject.toml
+index 697d207..35c805f 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -84,7 +84,7 @@ Chat = "https://discord.gg/pallets"
+ flask = "flask.cli:main"
+ 
+ [build-system]
+-requires = ["flit_core>=3.11,<4"]
++requires = ["flit_core>=3.11,<5"]
+ build-backend = "flit_core.buildapi"
+ 
+ [tool.flit.module]
diff --git a/meta-python/recipes-devtools/python/python3-flask_3.1.3.bb b/meta-python/recipes-devtools/python/python3-flask_3.1.3.bb
index 5b87d0d26a..5249647852 100644
--- a/meta-python/recipes-devtools/python/python3-flask_3.1.3.bb
+++ b/meta-python/recipes-devtools/python/python3-flask_3.1.3.bb
@@ -6,6 +6,7 @@ HOMEPAGE = "https://github.com/pallets/flask"
 LICENSE = "BSD-3-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ffeffa59c90c9c4a033c7574f8f3fb75"
 
+SRC_URI += "file://0001-pyproject.toml-allow-building-with-flit_core-4.patch"
 SRC_URI[sha256sum] = "0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb"
 
 CVE_PRODUCT = "palletsprojects:flask"
