Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. message_bus
  4. ›
  5. CVE-2021-43840

CVE-2021-43840: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

December 17, 2021 (updated December 29, 2021)

message_bus is a messaging bus for Ruby processes and web clients. users who deployed message bus with diagnostics features enabled (default off) is 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 Users unable to upgrade should ensure that MessageBus::Diagnostics is disabled.

References

  • github.com/discourse/message_bus/commit/9b6deee01ed474c7e9b5ff65a06bb0447b4db2ba
  • github.com/discourse/message_bus/security/advisories/GHSA-xmgj-5fh3-xjmm
  • nvd.nist.gov/vuln/detail/CVE-2021-43840

Code Behaviors & Features

Detect and mitigate CVE-2021-43840 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.3.7

Fixed versions

  • 3.3.7

Solution

Upgrade to version 3.3.7 or above.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

gem/message_bus/CVE-2021-43840.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:42 +0000.