GitHub Advisoryadvisory · RubyGems
GHSA-xmgj-5fh3-xjmm Path traversal when MessageBus::Diagnostics is enabled
MEDIUM
Official page ↗
- Aliases
- CVE-2021-43840
- Ecosystem
- RubyGems
- Packages
- message_bus
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:N/A:N
- Weaknesses
- CWE-22
- Reviewed
- 2021-12-17
Affected packages
• RubyGems message_bus: < 3.3.7 → fixed in 3.3.7
Description
Impact
Users who deployed message bus with diagnostics features enabled (default off) were 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.
Patches
Patched in 3.3.7.
Workarounds
Disable MessageBus::Diagnostics in production like environments.
Related
Alias · CVE (1)
- CVE-2021-43840 message_bus is a messaging bus for Ruby processes and web clients. vulnerability
Weakness · CWE (1)
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness
References
- https://github.com/discourse/message_bus/security/advisories/GHSA-xmgj-5fh3-xjmm web
- https://nvd.nist.gov/vuln/detail/CVE-2021-43840 advisory
- https://github.com/discourse/message_bus/commit/9b6deee01ed474c7e9b5ff65a06bb0447b4db2ba web
- https://github.com/discourse/message_bus package
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/message_bus/CVE-2021-43840.yml web