UnratednpmAmendedPublished
Server secret was included in static assets and served to clients
GHSA-r587-7jh2-4qr3
- Affected
- npm flood >= 2.0.0, < 3.0.0
- Fixed in
- 3.0.0· Vendor fix available
- Issue
- Impact Server JWT signing secret was included in static assets and served to clients. This ALLOWS Flood's builtin authentication to be bypassed. Given Flood is granted access to rTorrent's SCGI interface (which is unprotected and ALLOWS arbitrary code execution) and usually wide-ranging privileges to files, along with Flood's lack of security controls against authenticated users, the severity of this vulnerability is CRITICAL. Background Commit 8d11640b imported config.js to client (frontend) components to get disableUsersAndAuth configuration variable. Subsequently contents of config.js are compiled into static assets and served to users. Unfortunately config.js also includes secret. Intruders can use secret to sign authentication tokens themselves to bypass builtin access control of Flood. Patches Commit 042cb4ce removed imports of config.js from client (frontend) components. Additionally an eslint rule was added to prevent config.js from being imported to client (frontend)…
Recommended action: Upgrade to 3.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.