You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In both r2modman and TMM there is an issue in the "Website" button on a mod card that doesn't properly check if the URL is valid, and allows executing arbitrary commands and executables. This is because the website parameter is directly passed to electron.shell.openExternal (and thereby passed to ShellExecuteW without any sanitation), which allows the use of protocols like file to execute dangerous commands. This includes executing programs hosted on remote SMB shares (which at that point is basically an RCE).
To Reproduce
Steps to reproduce the behavior:
Create a modpack in r2modman (any game, any profile, any mods)
Modify the mods.yml file and change the websiteUrl parameter to a malicious payload (e.g. file://C:/Windows/System32/calc.exe)
Export the profile as code
Share code with unsuspecting victim
Coerce them into clicking the "Website" button on the mod that was modified in the mods.yml
The payload gets triggered
Expected behavior
The launcher should only allow trusted protocols (http, https) to be used, which preferably would be filtered by the LinkImpl class.
Just checked on this, both versions of the Thunderstore Mod Upload Handler check that the website_url is valid - So this issue only exists for local mods. It is still an issue of course.
Describe the bug
In both r2modman and TMM there is an issue in the "Website" button on a mod card that doesn't properly check if the URL is valid, and allows executing arbitrary commands and executables. This is because the website parameter is directly passed to
electron.shell.openExternal
(and thereby passed toShellExecuteW
without any sanitation), which allows the use of protocols likefile
to execute dangerous commands. This includes executing programs hosted on remote SMB shares (which at that point is basically an RCE).To Reproduce
Steps to reproduce the behavior:
mods.yml
file and change thewebsiteUrl
parameter to a malicious payload (e.g.file://C:/Windows/System32/calc.exe
)mods.yml
Expected behavior
The launcher should only allow trusted protocols (http, https) to be used, which preferably would be filtered by the
LinkImpl
class.r2modmanPlus/src/r2mm/component_override/LinkImpl.ts
Lines 6 to 8 in 4cd8d14
Video
uhoh.mp4
The text was updated successfully, but these errors were encountered: