{"answers":{"affected":"2 open source packages ship an affected version, including message_bus. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-43840 in the wild and no public exploit code.","fix":"Upgrade message_bus to 3.3.7 or later.","what":"CVE-2021-43840 is a medium-severity path traversal vulnerability in discourse message_bus, published on 17 Dec 2021. An attacker needs administrator access to exploit it, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-43840 and fix it if it is affected.\n\nWhat it is: CVE-2021-43840 is a medium-severity path traversal vulnerability in discourse message_bus, published on 17 Dec 2021. An attacker needs administrator access to exploit it, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-43840 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- message_bus (RubyGems): affected all versions; fixed in 3.3.7\n- message_bus (RubyGems): affected all versions; fixed in 3.3.7\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/CVE-2021-43840/ (Markdown: https://insights.sbomify.com/CVE-2021-43840/index.md)","id":"CVE-2021-43840","markdown":"https://insights.sbomify.com/CVE-2021-43840/index.md","name":"CVE-2021-43840","record":{"aliases":["GHSA-xmgj-5fh3-xjmm"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":true,"product_category":"Ruby messaging library","requires_auth":"high_privilege","summary":"Attackers can read secret files via path traversal if diagnostics are enabled, requiring upgrade or disabling diagnostics.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"message_bus","vendor":"discourse"}],"cvss":{"score":4.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"message_bus is a messaging bus for Ruby processes and web clients. In versions prior to 3.3.7 users who deployed message bus with diagnostics features enabled (default off) are vulnerable to a path traversal bug, which could lead to disclosure of secret information on a machine if an unintended user were to gain access to the diagnostic route. The impact is also greater if there is no proxy for your web application as the number of steps up the directories is not bounded. For deployments which uses a proxy, the impact varies. For example, If a request goes through a proxy like Nginx with `merge_slashes` enabled, the number of steps up the directories that can be read is limited to 3 levels. This issue has been patched in version 3.3.7. Users unable to upgrade should ensure that MessageBus::Diagnostics is disabled.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Path traversal in message_bus","id":"CVE-2021-43840","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":2,"n_references":2,"next":{"headline":"XSS by SVG upload in xwiki-platform","id":"CVE-2021-43841"},"packages":[{"ecosystem":"RubyGems","fixed":["3.3.7"],"introduced":["0"],"last_affected":[],"package":"message_bus","purl":null,"source":"GHSA-xmgj-5fh3-xjmm"},{"ecosystem":"RubyGems","fixed":["3.3.7"],"introduced":["0"],"last_affected":[],"package":"message_bus","purl":"pkg:gem/message_bus","source":"GHSA-xmgj-5fh3-xjmm"}],"prev":{"headline":"Drainage of FeeCollector's Block Transaction Fees","id":"CVE-2021-43839"},"products":["message_bus"],"published":"2021-12-17","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["discourse"]},"summary":"Attackers can read secret files via path traversal if diagnostics are enabled, requiring upgrade or disabling diagnostics.","url":"https://insights.sbomify.com/CVE-2021-43840/"}