Files
buildroot/package/busybox/0011-wget-dont-allow-control-characters-or-spaces-in-the-URL.patch
Bernd Kuhls 5a27004cff package/busybox: security bump version to 1.38.0
https://www.busybox.net/news.html

Removed patches which are included in this release, renumbered remaining
patches.

Patch 0006 was removed because its fix is included in upstream commit
9a8796436b

which also adds a new Kconfig option, disabled by default, to fix
CVE-2023-39810. To improve security we enable this option by default.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2026-05-30 10:45:41 +02:00

43 lines
1.5 KiB
Diff

From: Radoslav Kolev <radoslav.kolev@suse.com>
Date: Fri, 21 Nov 2025 11:21:18 +0200
Subject: wget: don't allow control characters or spaces in the URL
Forwarded: yes, https://lists.busybox.net/pipermail/busybox/2025-November/091840.html
Bug-Debian: https://bugs.debian.org/1120795
Fixes CVE-2025-60876 malicious URL can be used to inject
HTTP headers in the request.
Signed-off-by: Radoslav Kolev <radoslav.kolev@suse.com>
Reviewed-by: Emmanuel Deloget <logout@free.fr>
Upstream: https://sources.debian.org/data/main/b/busybox/1%3A1.37.0-10/debian/patches/wget-disallow-control-chars-in-URLs-CVE-2025-60876.patch
Upstream: https://lists.busybox.net/pipermail/busybox/2025-November/091840.html
CVE: CVE-2025-60876
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
---
networking/wget.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/networking/wget.c b/networking/wget.c
index ec3767793..fa555427b 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -536,6 +536,15 @@ static void parse_url(const char *src_url, struct host_info *h)
{
char *url, *p, *sp;
+ /* Fix for CVE-2025-60876 - don't allow control characters or spaces in the URL */
+ /* otherwise a malicious URL can be used to inject HTTP headers in the request */
+ const unsigned char *u = (void *) src_url;
+ while (*u) {
+ if (*u <= ' ')
+ bb_simple_error_msg_and_die("Unencoded control character found in the URL!");
+ u++;
+ }
+
free(h->allocated);
h->allocated = url = xstrdup(src_url);
--
2.47.3