GHSL-2024-127_GHSL-2024-129: Remote Code Execution (RCE) via Cross-Site Scripting (XSS) in OpenC3 COSMOS - CVE-2024-43795, CVE-2024-46977, CVE-2024-47529
OpenC3 COSMOS contained a path traversal allowing authenticated users to download arbitrary .txt files, a reflected XSS in the login redirect parameter, and clear-text storage of passwords in localStorage. An attacker could use the XSS to execute JavaScript in a victim's session and potentially achieve remote code execution on the server.
Several vulnerabilities were found in OpenC3 COSMOS, a web application that is used to control satellites and test equipment. They can lead up to Remote Code Execution (RCE) via cross-site scripting (XSS).
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The login component passed the user-controlled redirect parameter directly to window.location without validation, and the login function stored the password in localStorage in clear text.
Impact
This issue may lead up to Remote Code Execution (RCE).
What the attacker needed
Victim clicks a link; victim logs in; attacker can reach the COSMOS instance
The fix
The vulnerabilities were fixed in OpenC3 COSMOS v5.19.0.
How it was found
- Craft a login URL with a redirect parameter containing a JavaScript URL.
- Send the link to a victim who can reach the COSMOS instance.
- The victim logs in, and the JavaScript executes in their session.
- Use the JavaScript to create and run a script on the server, leading to command execution.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
OpenC3 COSMOS is a web app for controlling satellites. The login page took a 'redirect' address from the URL and sent the browser there without checking it, so an attacker could make it run their own JavaScript after login. Separately, the app saved the user's password in the browser's local storage in plain text, which is easy to steal.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.