Skip to content

🐞 Loop enables external commands to be ran#1023

Merged
SenpaiHunters merged 1 commit into
mrkai77:developfrom
aaaAlexanderaaa:security/remove-shell-applescript
Jan 25, 2026
Merged

🐞 Loop enables external commands to be ran#1023
SenpaiHunters merged 1 commit into
mrkai77:developfrom
aaaAlexanderaaa:security/remove-shell-applescript

Conversation

@aaaAlexanderaaa
Copy link
Copy Markdown
Contributor

I noticed the following 2 actions are effectively local RCE interfaces if any other app (or a clicked link) triggers the URL.
They’re used only if something opens a loop://shell/... or loop://applescript/... URL; there’s no other codepath in the repo that calls them.

You can verify the risk by loop://shell/open%20-a%20Calculator or loop://applescript/display%20dialog%20%22Loop%20PoC%22

 3. Shell Commands:
    Format: loop://shell/<command>
    Examples:
    - loop://shell/open%20-a%20Loop    (Activate Loop app)
    - loop://shell/osascript%20-e%20%22tell%20application%20%5C%22Loop%5C%22%20to%20activate%22
    Note: Commands must be URL encoded

 4. AppleScript Commands:
    Format: loop://applescript/<script>
    Examples:
    - loop://applescript/tell%20application%20%22Loop%22%20to%20activate
    Note: Scripts must be URL encoded

@SenpaiHunters SenpaiHunters changed the title Security/remove action shell and applescript 🐞 Loop enables external commands to be ran Jan 25, 2026
Copy link
Copy Markdown
Collaborator

@SenpaiHunters SenpaiHunters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, what a very good catch! I initially added them for entire support and was going to add security and other things to it, but I never got around to it and ended up forgetting. Because I was running inside a terminal, I never noticed it, but you need to have a different encoding.

open "loop://shell/open%20-a%20Calculator"
open "loop://applescript/display%20dialog%20%22Loop%20PoC%22"

Thank you for bringing this to our attention! The only change I request is to remove the extra information added to the README; it is not needed, as we already have https://github.com/MrKai77/Loop/blob/develop/CONTRIBUTING.md.

@aaaAlexanderaaa aaaAlexanderaaa force-pushed the security/remove-shell-applescript branch from 6a86f2c to ebdc911 Compare January 25, 2026 12:36
@aaaAlexanderaaa
Copy link
Copy Markdown
Contributor Author

Okey, I was planning to push a documentation update to my own fork, but I accidentally synced it to the upstream PR. I sincerely apologize for the trouble caused by my inexperience. It has now been reverted to a clean commit.

@SenpaiHunters
Copy link
Copy Markdown
Collaborator

No worries, thank you for bringing this up! I'm shocked; I've never actually looked at or realized this when coding it that long ago.

@SenpaiHunters SenpaiHunters merged commit c82452a into mrkai77:develop Jan 25, 2026
1 check passed
@aaaAlexanderaaa
Copy link
Copy Markdown
Contributor Author

Hmm, it thanks to Codex. I'm a loyal user of Loop, and it has always worked perfectly on my computer.

However, I recently received an update notification.
Before updating, I had it check for any security issues, and it found this for me.

@SenpaiHunters
Copy link
Copy Markdown
Collaborator

I noticed you used AI due to your README addition. As it was only a removal, it wasn't an extensive review. Although we don't disagree with AI use in coding, we may soon require all commits to declare AI use in all PRs. However, I still thank you for bring it up.

@aaaAlexanderaaa
Copy link
Copy Markdown
Contributor Author

hmm, and I noticed the project currently does not have a PR template configured, covering aspects such as whether AI was used or if the build succeeded locally or passed tests.

You can refer to Creating a pull request template for your repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants