Skip to contentSkip to conversation

package/python-webpy: bump version to 0.70 and add upstream commit to fix CVE-2025-3818

PATCH Applied Bernd Kuhls 2 participants 2 messages Oct 14, 2025 – Oct 15, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-webpy: bump version to 0.70 and add upstream commit to fix CVE-2025-3818

Release notes: https://github.com/webpy/webpy/releases/tag/webpy-0.70

Switched _SITE to github because version 0.70 was not released to pypi.org: https://pypi.org/project/web.py/#history

Added upstream commit to fix CVE-2025-3818.

This bump includes
https://github.com/webpy/webpy/commit/f7540bef650bce7227af796728136d41e44cdd0e
which removes the deprecated cgi module which was removed in Python 3.13 and causes build errors since buildroot bumped python3 to 3.13.2 with commit d63e207eb869063f82c867658676c2903beb08cb.

Fixes:
https://autobuild.buildroot.net/results/5a7/5a7382250d33ddfd49de2c7996fb54aaf20dd62c/

---
 .../0001-Address-CVE-2025-3818.patch          | 42 +++++++++++++++++++
 package/python-webpy/python-webpy.hash        |  5 +--
 package/python-webpy/python-webpy.mk          |  5 +--
 3 files changed, 46 insertions(+), 6 deletions(-)
 create mode 100644 package/python-webpy/0001-Address-CVE-2025-3818.patch
package/python-webpy/0001-Address-CVE-2025-3818.patch new file +42 -0
new file mode 100644
index 0000000000..d8373cbac6
@@ -0,0 +1,42 @@
+From 3ba1b40e5a828a26a1df1b49cdc87395f3274c81 Mon Sep 17 00:00:00 2001
+From: Mek <[email protected]>
+Date: Wed, 7 May 2025 15:14:44 -0400
+Subject: [PATCH] Address CVE-2025-3818 (#807)
+
+* Address CVE-2025-3818
+
+Co-authored-by: Scott Barnes <[email protected]>
+
+Upstream: https://github.com/webpy/webpy/commit/3ba1b40e5a828a26a1df1b49cdc87395f3274c81
+
+Fixes CVE-2025-3818: https://github.com/advisories/GHSA-9g47-36rw-gjh2
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ web/db.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/web/db.py b/web/db.py
+index 5284f8d0..ba3e12c5 100644
+--- a/web/db.py
++++ b/web/db.py
+@@ -1198,10 +1198,18 @@ def _process_insert_query(self, query, tablename, seqname):
+                 seqname = None
+ 
+         if seqname:
+-            query += "; SELECT currval('%s')" % seqname
++            query += self.get_sequence_query(seqname)
+ 
+         return query
+ 
++    def get_sequence_query(self, seqname):
++        import re
++        # Ensure the sequence name is valid
++        if not re.match(r'^[a-zA-Z_][a-zA-Z0-9_$]*$', seqname):
++            raise ValueError(f"Invalid sequence name: {seqname}")
++        return SQLQuery("; SELECT currval(%s)", seqname)
++
++
+     def _get_all_sequences(self):
+         """Query postgres to find names of all sequences used in this database."""
+         if self._sequences is None:
package/python-webpy/python-webpy.hash +2 -3
index 540771a244..0fb39170c7 100644
@@ -1,3 +1,2 @@
-# md5, sha256 from https://pypi.org/pypi/web.py/json
-md5  cd2c0296ceffa1acb96ae5315214eb42  web.py-0.62.tar.gz
-sha256  5ce684caa240654cae5950da8b4b7bc178812031e08f990518d072bd44ab525e  web.py-0.62.tar.gz
+# Locally computed
+sha256  eee36e423b5e85463145159d94735e3c3a4c1c8078555042d8139348350b0022  python-webpy-0.70.tar.gz
package/python-webpy/python-webpy.mk +2 -3
index 06d4ae039b..62b2331c08 100644
@@ -4,9 +4,8 @@
 #
 ################################################################################
 
-PYTHON_WEBPY_VERSION = 0.62
-PYTHON_WEBPY_SOURCE = web.py-$(PYTHON_WEBPY_VERSION).tar.gz
-PYTHON_WEBPY_SITE = https://files.pythonhosted.org/packages/cd/6e/338a060bb5b52ee8229bdada422eaa5f71b13f8d33467f37f870ed2cae4b
+PYTHON_WEBPY_VERSION = 0.70
+PYTHON_WEBPY_SITE = $(call github,webpy,webpy,webpy-$(PYTHON_WEBPY_VERSION))
 PYTHON_WEBPY_SETUP_TYPE = setuptools
 PYTHON_WEBPY_LICENSE = Public Domain
 
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 6 lines · Bernd Kuhls

Release notes: https://github.com/webpy/webpy/releases/tag/webpy-0.70

Switched _SITE to github because version 0.70 was not released to pypi.org: https://pypi.org/project/web.py/#history

Added upstream commit to fix CVE-2025-3818.

That CVE unfortunately also affects 0.62 which is the version in 2025.02.x...
Any chance of backporting the patch?

Quoted 11 lines

This bump includes
https://github.com/webpy/webpy/commit/f7540bef650bce7227af796728136d41e44cdd0e
which removes the deprecated cgi module which was removed in Python 3.13 and causes build errors since buildroot bumped python3 to 3.13.2 with commit d63e207eb869063f82c867658676c2903beb08cb.

Fixes:
https://autobuild.buildroot.net/results/5a7/5a7382250d33ddfd49de2c7996fb54aaf20dd62c/

Applied to master, thanks.

Regards,
Arnout

Quoted 71 lines
---
  .../0001-Address-CVE-2025-3818.patch          | 42 +++++++++++++++++++
  package/python-webpy/python-webpy.hash        |  5 +--
  package/python-webpy/python-webpy.mk          |  5 +--
  3 files changed, 46 insertions(+), 6 deletions(-)

create mode 100644 package/python-webpy/0001-Address-CVE-2025-3818.patch

package/python-webpy/0001-Address-CVE-2025-3818.patch new file +42 -0
new file mode 100644
index 0000000000..d8373cbac6
@@ -0,0 +1,42 @@
+From 3ba1b40e5a828a26a1df1b49cdc87395f3274c81 Mon Sep 17 00:00:00 2001
+From: Mek <[email protected]>
+Date: Wed, 7 May 2025 15:14:44 -0400
+Subject: [PATCH] Address CVE-2025-3818 (#807)
+
+* Address CVE-2025-3818
+
+Co-authored-by: Scott Barnes <[email protected]>
+
+Upstream: https://github.com/webpy/webpy/commit/3ba1b40e5a828a26a1df1b49cdc87395f3274c81
+
+Fixes CVE-2025-3818: https://github.com/advisories/GHSA-9g47-36rw-gjh2
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ web/db.py | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/web/db.py b/web/db.py
+index 5284f8d0..ba3e12c5 100644
+--- a/web/db.py
++++ b/web/db.py
+@@ -1198,10 +1198,18 @@ def _process_insert_query(self, query, tablename, seqname):
+                 seqname = None
+
+         if seqname:
+-            query += "; SELECT currval('%s')" % seqname
++            query += self.get_sequence_query(seqname)
+
+         return query
+
++    def get_sequence_query(self, seqname):
++        import re
++        # Ensure the sequence name is valid
++        if not re.match(r'^[a-zA-Z_][a-zA-Z0-9_$]*$', seqname):
++            raise ValueError(f"Invalid sequence name: {seqname}")
++        return SQLQuery("; SELECT currval(%s)", seqname)
++
++
+     def _get_all_sequences(self):
+         """Query postgres to find names of all sequences used in this database."""
+         if self._sequences is None:
package/python-webpy/python-webpy.hash +2 -3
index 540771a244..0fb39170c7 100644
@@ -1,3 +1,2 @@
-# md5, sha256 from https://pypi.org/pypi/web.py/json
-md5  cd2c0296ceffa1acb96ae5315214eb42  web.py-0.62.tar.gz
-sha256  5ce684caa240654cae5950da8b4b7bc178812031e08f990518d072bd44ab525e  web.py-0.62.tar.gz
+# Locally computed
+sha256  eee36e423b5e85463145159d94735e3c3a4c1c8078555042d8139348350b0022  python-webpy-0.70.tar.gz
package/python-webpy/python-webpy.mk +0 -0
index 06d4ae039b..62b2331c08 100644
@@ -4,9 +4,8 @@
  #

package/python-webpy/python-webpy.mk line 11

Quoted 10 lines
package/python-webpy/python-webpy.mk +2 -3
  ################################################################################
 
-PYTHON_WEBPY_VERSION = 0.62
-PYTHON_WEBPY_SOURCE = web.py-$(PYTHON_WEBPY_VERSION).tar.gz
-PYTHON_WEBPY_SITE = https://files.pythonhosted.org/packages/cd/6e/338a060bb5b52ee8229bdada422eaa5f71b13f8d33467f37f870ed2cae4b
+PYTHON_WEBPY_VERSION = 0.70
+PYTHON_WEBPY_SITE = $(call github,webpy,webpy,webpy-$(PYTHON_WEBPY_VERSION))
  PYTHON_WEBPY_SETUP_TYPE = setuptools
  PYTHON_WEBPY_LICENSE = Public Domain
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot