You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Transition Deluge from an apt/pip-installed package to a fully PMSS-managed install with version pinning, following the same pattern used for rtorrent. The immediate driver is Deluge 2.2.0 which fixes critical security vulnerabilities that Debian repos will not ship in time.
Current State
Debian 10 (buster): Deluge 2.0.5 installed from source tarball via pip + python3 setup.py install (global, no virtualenv). Tarball is fetched from ftp.osuosl.org with SHA256 verification. Python dependencies installed system-wide via pip install --upgrade. See scripts/lib/update/apps/deluge.php lines 32-91.
Debian 11/12 (bullseye/bookworm): Deluge installed via apt-get install -y deluged deluge-web. The apt check is idempotent (skips if already installed). Debian 12 ships Deluge 2.0.5 or 2.1.1 depending on the repo. See scripts/lib/update/apps/deluge.php lines 93-104.
No upgrade path exists. Once installed, PMSS never upgrades Deluge beyond what was initially installed. There is no version comparison or upgrade logic for the apt path -- it only checks "is the package installed?" and skips if yes.
Security Motivation
CVE-2025-46564 (Critical): Unauthenticated path traversal in Deluge web UI /js endpoint allows reading arbitrary OS files -- including the plaintext auth file containing daemon passwords. No authentication required. Fixed in Deluge 2.2.0.
Plaintext auth (all versions <= 2.1.1): Deluge daemon auth file stores passwords in plaintext. Deluge 2.2.0 adds scrypt hashing for non-localclient accounts. Combined with CVE-2025-46564, this means an unauthenticated attacker can read daemon credentials from any pre-2.2.0 Deluge instance.
CVE-2017-7178 (High): CSRF leading to malicious plugin upload and RCE. Still exploitable on authenticated instances.
These are not theoretical -- Deluge instances with default/weak passwords are actively exploited for cryptomining in the wild. PMSS runs Deluge facing the internet with per-user daemon ports.
Proposed Approach
Follow the rtorrent model (scripts/lib/update/apps/rtorrent.php):
Version-pinned source install via pip (PyPI) -- pip install deluge==2.2.0 in a virtualenv or system-wide with explicit pinning
SHA256 verification of downloaded packages (pip supports --require-hashes)
Version detection -- compare running version against target, only upgrade when needed (idempotent)
Symlinks to /usr/local/bin/ for deluged and deluge-web (existing pattern, see lines 108-113)
Kill + restart cycle -- after upgrade, kill all running Deluge instances; cron watchdog (checkDelugeInstances.php) will restart them automatically
Template update -- update any Deluge config templates if the new version requires format changes
Alternative: pip install from PyPI
Unlike rtorrent (C++, compiled from source), Deluge is pure Python. The most natural install path is:
This avoids the complexity of compiling from source while still giving full version control. A virtualenv approach (as suggested in GH#125) would be even cleaner but requires updating all paths in cron scripts and user-facing tools.
GH#207: "Add ltconfig plugin and update to current version" -- version update component is subsumed by this issue; ltconfig integration should be done as part of the managed install
GH#212: "Add security doctrine to AGENTS.md" -- this issue is a concrete example of why security doctrine matters; the managed install addresses the CVE exposure gap
Acceptance Criteria
Deluge 2.2.0+ installed on all supported Debian versions (10, 11, 12)
Version pinned with explicit version target per Debian release
SHA256 or hash verification on all downloaded packages
Idempotent: running update.php twice does not reinstall if already at target version
Existing user configs preserved and functional after upgrade
Deluge auth file format handled correctly (plaintext -> scrypt transition)
Watchdog cron (checkDelugeInstances.php) works with new binary paths
deluged --version reports expected version after install
CVE-2025-46564 is confirmed not exploitable on 2.2.0
Summary
Transition Deluge from an apt/pip-installed package to a fully PMSS-managed install with version pinning, following the same pattern used for rtorrent. The immediate driver is Deluge 2.2.0 which fixes critical security vulnerabilities that Debian repos will not ship in time.
Current State
Debian 10 (buster): Deluge 2.0.5 installed from source tarball via
pip+python3 setup.py install(global, no virtualenv). Tarball is fetched fromftp.osuosl.orgwith SHA256 verification. Python dependencies installed system-wide viapip install --upgrade. Seescripts/lib/update/apps/deluge.phplines 32-91.Debian 11/12 (bullseye/bookworm): Deluge installed via
apt-get install -y deluged deluge-web. The apt check is idempotent (skips if already installed). Debian 12 ships Deluge 2.0.5 or 2.1.1 depending on the repo. Seescripts/lib/update/apps/deluge.phplines 93-104.No upgrade path exists. Once installed, PMSS never upgrades Deluge beyond what was initially installed. There is no version comparison or upgrade logic for the apt path -- it only checks "is the package installed?" and skips if yes.
Security Motivation
CVE-2025-46564 (Critical): Unauthenticated path traversal in Deluge web UI
/jsendpoint allows reading arbitrary OS files -- including the plaintext auth file containing daemon passwords. No authentication required. Fixed in Deluge 2.2.0.Plaintext auth (all versions <= 2.1.1): Deluge daemon auth file stores passwords in plaintext. Deluge 2.2.0 adds scrypt hashing for non-localclient accounts. Combined with CVE-2025-46564, this means an unauthenticated attacker can read daemon credentials from any pre-2.2.0 Deluge instance.
CVE-2017-7178 (High): CSRF leading to malicious plugin upload and RCE. Still exploitable on authenticated instances.
These are not theoretical -- Deluge instances with default/weak passwords are actively exploited for cryptomining in the wild. PMSS runs Deluge facing the internet with per-user daemon ports.
Proposed Approach
Follow the rtorrent model (
scripts/lib/update/apps/rtorrent.php):pip install deluge==2.2.0in a virtualenv or system-wide with explicit pinning--require-hashes)/usr/local/bin/fordelugedanddeluge-web(existing pattern, see lines 108-113)checkDelugeInstances.php) will restart them automaticallyAlternative: pip install from PyPI
Unlike rtorrent (C++, compiled from source), Deluge is pure Python. The most natural install path is:
This avoids the complexity of compiling from source while still giving full version control. A virtualenv approach (as suggested in GH#125) would be even cleaner but requires updating all paths in cron scripts and user-facing tools.
Dependencies to Investigate
libtorrent(the Rasterbar library, NOT the rtorrent one). Debian 10 ships 1.1.x, Debian 12 ships 2.0.x. Check Deluge 2.2.0 minimum requirements.deluge-webneedspython3-giand related packages from apt (these cannot be pip-installed).Risks and Mitigations
--force-reinstallFiles Affected
scripts/lib/update/apps/deluge.php-- main installer, needs rewrite for managed approachscripts/lib/user/deluge.php-- user config provisioning (may need auth template updates for scrypt)scripts/cron/checkDelugeInstances.php-- watchdog (binary paths may change)scripts/lib/user/passwords.php-- Deluge password handling (GH#211 interaction)etc/seedbox/config/template.deluge.*-- config templates (format changes?)scripts/lib/lighttpd/delugeWebConf.php-- web config parser (Deluge 2.2.0 may change web.conf format)Relationship to Existing Issues
Acceptance Criteria
checkDelugeInstances.php) works with new binary pathsdeluged --versionreports expected version after install— Vainamoinen