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

Single quotes and other chars are not escaped; LUA injection vuln #7

Open
J0w03L opened this issue Mar 2, 2024 · 4 comments · Fixed by #8
Open

Single quotes and other chars are not escaped; LUA injection vuln #7

J0w03L opened this issue Mar 2, 2024 · 4 comments · Fixed by #8

Comments

@J0w03L
Copy link

J0w03L commented Mar 2, 2024

Just like the title says, when awesome-appmenu generates the appmenu.lua file and encounters an app with a ' character in its name, awesome-appmenu will not escape that character.

One such example of a popular application that causes this is the game Garry's Mod.

This bug can be exploited to inject arbitrary LUA code that will always run at awesome's startup.

A malicious .desktop file could have the name foo', os.exit() }, -- and this would immediately kick the user out of their X session.

@zen0bit
Copy link
Contributor

zen0bit commented Apr 23, 2024

or
Don't starve together

@J0w03L
Copy link
Author

J0w03L commented Apr 24, 2024

Merged commit doesn't quite fix the vulnerability; the escape can itself be escaped. For example: foo\', os.exit() }, --

@zen0bit
Copy link
Contributor

zen0bit commented Apr 24, 2024

Yes I am not solved that

Up to someone else...

I just made menu with ' actually working

@montagdude
Copy link
Owner

montagdude commented Apr 25, 2024

If anyone has a candidate fix, feel free to submit a pull request. I haven't used awesome for a number of years and am kind of surprised that this appmenu seems to be getting some interest now.

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

Successfully merging a pull request may close this issue.

3 participants