OpenC3 COSMOS: Arbitrary write to plugins directory via path-traversed config filenames
OpenC3 cosmos
OpenC3 cosmos
OpenC3 COSMOS provides the functionality needed to send commands to and receive data from one or more embedded systems. Prior to versions 6.10.5 and 7.0.0-rc3, OpenC3 COSMOS contains a design flaw in the save_tool_config() function that allows saving tool configuration files at arbitrary locations inside the shared /plugins directory tree by supplying crafted configuration filenames. Although the implementation sufficiently mitigates standard path traversal attacks, by canonicalizing filename to an absolute path, all plugins share this same root directory. That enables users to create arbitrary file structures and overwrite existing configuration files within the shared /plugins directory. This issue has been patched in versions 6.10.5 and 7.0.0-rc3.
From the CVE record · GitHub_M
OpenC3 COSMOS allows crafted configuration filenames in save_tool_config() to place files anywhere within the shared /plugins directory. A user able to save tool configurations can create arbitrary file structures and overwrite existing configuration files there. The input does not specify whether access is local or over a network.
Check OpenC3 COSMOS installations using the RubyGems openc3 package before 6.10.5 or from 7.0.0.pre.rc1 to before 7.0.0-rc3, or the PyPI openc3 package before 6.10.5.