Summary
Server secret was included in static assets and served to clients
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.
Workarounds
Users shall upgrade if they use Flood's builtin authentication system.
While maintainers will do their best to support it, Flood cannot guarantee its in-house access control system can stand against determined attackers in high-stake environments.
Use HTTP Basic Auth or other battle-hardened authentication methods instead of Flood's in-house one. You can use disableUsersAndAuth to avoid duplicate authentication.
Users are advised to check out the wiki for more information on security precautions.
References
Introduction to JSON Web Tokens
For more information
If you have any questions or comments about this advisory:
- Open an issue in issue tracker
- Email us at [email protected]
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.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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) components.
Commit 103f53c8 provided a general mitigation to this kind of problem by searching static assets to ensure secret is not included before starting server (backend).
Frequently Asked Questions
- What is GHSA-R587-7JH2-4QR3? GHSA-R587-7JH2-4QR3 is a critical-severity security vulnerability in flood (npm), affecting versions >= 2.0.0, < 3.0.0. It is fixed in 3.0.0.
- Which versions of flood are affected by GHSA-R587-7JH2-4QR3? flood (npm) versions >= 2.0.0, < 3.0.0 is affected.
- Is there a fix for GHSA-R587-7JH2-4QR3? Yes. GHSA-R587-7JH2-4QR3 is fixed in 3.0.0. Upgrade to this version or later.
- Is GHSA-R587-7JH2-4QR3 exploitable, and should I be worried? Whether GHSA-R587-7JH2-4QR3 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-R587-7JH2-4QR3 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-R587-7JH2-4QR3? Upgrade
floodto 3.0.0 or later.