Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXI1ODctN2poMi00cXIz
Server secret was included in static assets and served to clients
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) 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).
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 usedisableUsersAndAuth
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]
JSON: https://advisories.ecosyste.ms/api/v1/advisories/MDE2OlNlY3VyaXR5QWR2aXNvcnlHSFNBLXI1ODctN2poMi00cXIz
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: over 4 years ago
Updated: about 2 years ago
Identifiers: GHSA-r587-7jh2-4qr3
References:
- https://github.com/jesec/flood/security/advisories/GHSA-r587-7jh2-4qr3
- https://github.com/jesec/flood/commit/103f53c8d2963584e41bcf46ccc6fe0fabf179ca
- https://github.com/jesec/flood/commit/d137107ac908526d43966607149fbaf00cfcedf0
- https://github.com/advisories/GHSA-r587-7jh2-4qr3
Blast Radius: 0.0
Affected Packages
npm:flood
Dependent packages: 2Dependent repositories: 3
Downloads: 1,586 last month
Affected Version Ranges: >= 2.0.0, < 3.0.0
Fixed in: 3.0.0
All affected versions:
All unaffected versions: 3.0.0, 3.1.0, 4.0.0, 4.0.1, 4.0.2, 4.1.0, 4.1.1, 4.1.2, 4.2.0, 4.3.0, 4.3.1, 4.4.0, 4.4.1, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.5.4, 4.6.0, 4.6.1, 4.7.0, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 4.8.4, 4.8.5, 4.9.0, 4.9.1, 4.9.2