Version in base suite: 1.5-1 Base version: weborf_1.5-1 Target version: weborf_1.5-1+deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/w/weborf/weborf_1.5-1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/w/weborf/weborf_1.5-1+deb13u1.dsc changelog | 6 + patches/0001-Prevent-injecting-r-n-sequences-into-the-URL.patch | 45 ++++++++++ patches/0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch | 29 ++++++ patches/0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch | 29 ++++++ patches/series | 3 5 files changed, 112 insertions(+) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp5i00zwqa/weborf_1.5-1.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp5i00zwqa/weborf_1.5-1+deb13u1.dsc: no acceptable signature found diff -Nru weborf-1.5/debian/changelog weborf-1.5/debian/changelog --- weborf-1.5/debian/changelog 2025-02-18 21:26:41.000000000 +0000 +++ weborf-1.5/debian/changelog 2026-11-21 15:24:16.000000000 +0000 @@ -1,3 +1,9 @@ +weborf (1.5-1+deb13u1) trixie; urgency=medium + + * Fix security issues (https://johnjean.io/advisories/weborf-unauthenticated-remote-code-execution/) + + -- Salvo 'LtWorf' Tomaselli Sat, 21 Nov 2026 16:24:16 +0100 + weborf (1.5-1) unstable; urgency=low * Bump standards version diff -Nru weborf-1.5/debian/patches/0001-Prevent-injecting-r-n-sequences-into-the-URL.patch weborf-1.5/debian/patches/0001-Prevent-injecting-r-n-sequences-into-the-URL.patch --- weborf-1.5/debian/patches/0001-Prevent-injecting-r-n-sequences-into-the-URL.patch 1970-01-01 00:00:00.000000000 +0000 +++ weborf-1.5/debian/patches/0001-Prevent-injecting-r-n-sequences-into-the-URL.patch 2026-11-16 23:52:52.000000000 +0000 @@ -0,0 +1,45 @@ +From de943f29af565ba820340d14dd5c9d5d4815679d Mon Sep 17 00:00:00 2001 +From: Salvo 'LtWorf' Tomaselli +Date: Tue, 17 Nov 2026 00:40:09 +0100 +Subject: [PATCH 1/3] Prevent injecting \r\n sequences into the URL + +--- + auth.c | 2 +- + instance.c | 8 ++++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/auth.c b/auth.c +index fc1eb2d..1eea0da 100644 +--- a/auth.c ++++ b/auth.c +@@ -1,6 +1,6 @@ + /* + Weborf +-Copyright (C) 2010 Salvo "LtWorf" Tomaselli ++Copyright (C) 2010, 2026 Salvo "LtWorf" Tomaselli + + Weborf is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +diff --git a/instance.c b/instance.c +index 0e1da98..86cc56f 100644 +--- a/instance.c ++++ b/instance.c +@@ -104,9 +104,13 @@ The url will never be longer than the original one. + static inline void modURL(char* url, bool params) { + replaceEscape(url); + +- //Prevents the use of .. to access the whole filesystem +- if (!params) ++ if (!params) { ++ //Prevents the use of .. to access the whole filesystem + strReplace(url,"../",'\0'); ++ //Prevents new lines to do header fuckery ++ strReplace(url, "\r", '\0'); ++ strReplace(url, "\n", '\0'); ++ } + //TODO AbsoluteURI: Check if the url uses absolute url, and in that case remove the 1st part + } + +-- +2.55.0 + diff -Nru weborf-1.5/debian/patches/0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch weborf-1.5/debian/patches/0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch --- weborf-1.5/debian/patches/0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch 1970-01-01 00:00:00.000000000 +0000 +++ weborf-1.5/debian/patches/0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch 2026-11-16 23:52:52.000000000 +0000 @@ -0,0 +1,29 @@ +From 59e5a4ad23597d53ed62ce9bfc4068fd14e3fd3b Mon Sep 17 00:00:00 2001 +From: Salvo 'LtWorf' Tomaselli +Date: Tue, 17 Nov 2026 00:41:43 +0100 +Subject: [PATCH 2/3] Disallow COPY, MOVE methods unless authentication is + enabled + +--- + webdav.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/webdav.c b/webdav.c +index 959e188..8097181 100644 +--- a/webdav.c ++++ b/webdav.c +@@ -459,6 +459,11 @@ int mkcol(connection_t* connection_prop) { + Webdav method copy. + */ + int copy_move(connection_t* connection_prop) { ++ ++ if (weborf_conf.authsock==NULL) { ++ return ERR_FORBIDDEN; ++ } ++ + struct stat f_prop; //File's property + bool check_exists=false; + int retval=0; +-- +2.55.0 + diff -Nru weborf-1.5/debian/patches/0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch weborf-1.5/debian/patches/0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch --- weborf-1.5/debian/patches/0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch 1970-01-01 00:00:00.000000000 +0000 +++ weborf-1.5/debian/patches/0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch 2026-11-16 23:52:52.000000000 +0000 @@ -0,0 +1,29 @@ +From b96b39a080fe7adf465148285b243294854db2ab Mon Sep 17 00:00:00 2001 +From: Salvo 'LtWorf' Tomaselli +Date: Tue, 17 Nov 2026 00:44:20 +0100 +Subject: [PATCH 3/3] Disallow relative destination path for COPY and MOVE + +--- + webdav.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/webdav.c b/webdav.c +index 8097181..c8fbbde 100644 +--- a/webdav.c ++++ b/webdav.c +@@ -499,6 +499,12 @@ int copy_move(connection_t* connection_prop) { + check_exists=(overwrite[0]!='F'); + } + ++ // Disallow relative paths in destination ++ if (strstr(dest, "/../")) { ++ retval = ERR_FORBIDDEN; ++ goto escape; ++ } ++ + //Destination might be like http://localhost/destination or just /destination + if (dest[0] != '/') { + dest=strstr(dest, host); +-- +2.55.0 + diff -Nru weborf-1.5/debian/patches/series weborf-1.5/debian/patches/series --- weborf-1.5/debian/patches/series 2025-02-18 21:26:41.000000000 +0000 +++ weborf-1.5/debian/patches/series 2026-11-21 11:34:02.000000000 +0000 @@ -0,0 +1,3 @@ +0001-Prevent-injecting-r-n-sequences-into-the-URL.patch +0002-Disallow-COPY-MOVE-methods-unless-authentication-is-.patch +0003-Disallow-relative-destination-path-for-COPY-and-MOVE.patch