Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unescaped arbitrary bot output using eval #57

Open
gustavwilliam opened this issue Nov 12, 2022 · 1 comment
Open

Unescaped arbitrary bot output using eval #57

gustavwilliam opened this issue Nov 12, 2022 · 1 comment

Comments

@gustavwilliam
Copy link

When making the bot print triple backpacks (```) using the eval command, the output code block will be escaped, letting the user output arbitrary output outside of a code block after the backticks.

For the Rust Server's mods, report 114 contains my initial findings about this issue.

Severity

The severity of this security vulnerability is greatly reduced because the bot can't ping @everyone, @here or any roles that aren't pingable by the average user, but it's still worth keeping track of. Arbitrary user output is never a good thing.

It's also a warning to not give the bot these ping permissions in the future.

Example

Here's an example where I made the bot ping myself, after letting it error out. The ping for myself could easily be replaced with any number of users, or roles.

Screenshot 2022-11-12 at 14 37 25

@kangalio
Copy link
Owner

The bot framework actually sets Allowed Mentions. By default, role pings and everyone pings are filtered (so even if the bot were given role/everyone ping permissions, those pings wouldn't have an effect).

But due to the fact that this concern comes up a lot, I should probably filter triple backticks just for the peace of mind of users..

conradludgate pushed a commit to conradludgate/rustbot that referenced this issue Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants