{"answers":{"affected":"2 open source packages ship an affected version, including flood.","exploited":"There is no known exploitation of GHSA-r587-7jh2-4qr3 in the wild and no public exploit code.","fix":"Upgrade flood to 3.0.0 or later.","what":"GHSA-r587-7jh2-4qr3 is a vulnerability in flood, published on 26 Aug 2020. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-r587-7jh2-4qr3 and fix it if it is affected.\n\nWhat it is: GHSA-r587-7jh2-4qr3 is a vulnerability in flood, published on 26 Aug 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-r587-7jh2-4qr3 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- flood (npm): affected from 2.0.0; fixed in 3.0.0\n- flood (npm): affected from 2.0.0; fixed in 3.0.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-r587-7jh2-4qr3/ (Markdown: https://insights.sbomify.com/GHSA-r587-7jh2-4qr3/index.md)","id":"GHSA-r587-7jh2-4qr3","markdown":"https://insights.sbomify.com/GHSA-r587-7jh2-4qr3/index.md","name":"GHSA-r587-7jh2-4qr3","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["privilege_escalation","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Torrent web UI","requires_auth":"none","summary":"Exposure of JWT signing secret in static assets allows attackers to bypass authentication and execute arbitrary code via rTorrent interface.","user_interaction":"not_required","vuln_class":"hardcoded_credentials"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\nServer JWT signing secret was included in static assets and served to clients.\n\nThis 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**. \n\n### Background\nCommit 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`.\n\nIntruders can use `secret` to sign authentication tokens themselves to bypass builtin access control of Flood.\n\n### Patches\nCommit 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.\n\nCommit 103f53c8 provided a general mitigation to this kind of problem by searching static assets to ensure `secret` is not included before starting server (backend). \n\n### Workarounds\nUsers shall upgrade if they use Flood's builtin authentication system.\n\nWhile 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. \n\n\u003e 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.\n\nUsers are advised to check out the [wiki](https://github.com/jesec/flood/wiki) for more information on security precautions.\n\n### References\n[Wiki - Security precautions](https://github.com/jesec/flood/wiki/Security-precautions)\n\n[Introduction to JSON Web Tokens](https://jwt.io/introduction/)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [issue tracker](https://github.com/jesec/flood/issues)\n* Email us at [jc@linux.com](mailto:jc@linux.com)","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Server secret was included in static assets and served to clients","id":"GHSA-r587-7jh2-4qr3","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"hardcoded_credentials","year":"2020"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["3.0.0"],"introduced":["2.0.0"],"last_affected":[],"package":"flood","purl":null,"source":"GHSA-r587-7jh2-4qr3"},{"ecosystem":"npm","fixed":["3.0.0"],"introduced":["2.0.0"],"last_affected":[],"package":"flood","purl":"pkg:npm/flood","source":"GHSA-r587-7jh2-4qr3"}],"products":null,"published":"2020-08-26","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Exposure of JWT signing secret in static assets allows attackers to bypass authentication and execute arbitrary code via rTorrent interface.","url":"https://insights.sbomify.com/GHSA-r587-7jh2-4qr3/"}