[bugs:#2389] SciTE automatic untrusted code execution via Lua
Status: open
Group: Bug
Labels: SciTE security
Created: Wed Jun 14, 2023 11:42 PM UTC by F8 is great
Last Updated: Wed Jun 14, 2023 11:42 PM UTC
Owner: nobody
Attachments:
Hello.
I would like to raise what I believe to be another a security issue, regarding SciTE execution of arbitrary code based on malicious local properties files.
By setting "ext.lua.startup.script" in a local properties file, I have been successfully able to:
* Read and write arbitrary files
* Run arbitrary commands
... when files are opened in SciTE.
This is unsafe in scenarios where a folder contains content that the user did not themselves create, such as:
Proof of concept
Pleased see attached file "proof_of_concept_scite_lua_startup_win_v1.zip" which demonstrates this issue, although please note I accept no liability for any damage or loss resulting from this code.
This windows-oriented example demonstrates both file creation and command execution, by creating text files with a "bad_" prefix as a record of the automatic command execution.
Notes regarding this proof-of-concept
I have been able to trigger this issue when both:
* Property "ext.lua.reset=1" is also defined in the local properties file.
* SciTE is registered as the default text file editor, and a file is double-clicked.
I suspect other scenarios may be possible, but I have not confirmed this.
Suggested fixes
I suspect there are many possible ways to address these issues, such as:
If extension hooks remain active in the codebase to some degree, I would ideally suggest implementing as several protections, for maximum user safety against this and similar issues yet to be discovered.
Visibility
I would suggest that this issue should remain private until a fixed build is made available, in order to minimize the risk to users, but this is of course at the discretion of the project maintainers.
See also
Thanks
Once again, thank you very much for your time and efforts.
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
Please stop using the private or priority settings.
This is an open source project and issues should generally be published. The priority indicates implementation priority which is only relevant to maintainers with 1 meaning extreme low priority that will never be progressed.
Allowing per-directory scripts is a deliberate feature that should be enabled by default. Its possible that there could be an option in user properties to allow users to disable scripting if they want.
Please accept my apologies regarding the priority and visibility.
My intention is not to be annoying; allow me to explain.
These kinds of code execution issues can be extremely serious.
Because code execution flaws allows attackers full access to that machine as the logged-in user, the potential for extremely nasty outcomes is very significant, including:
I would recommend that every user of an unpatched build of SciTE should be extremely cautious, and may need to stop using the app until updated builds can be installed.
This is why the usual approach would be to treat code execution security issues as a higher priority class than other defects, and should not generally be disclosed to the public at large until fixes are made available.
This is why I do not feel comfortable reporting security issues as initially public - I am aiming for "responsible disclosure", rather than "zero-day", and so giving the project maintainers control.
However, I do respect that ultimately this is your project, and you are free to take any approach you deem appropriate.
I hope this explains why I am submitting tickets the way that I have, and I would urge you to re-consider.
[bugs:#2389] SciTE automatic untrusted code execution via Lua
Status: open
Group: Bug
Labels: SciTE security
Created: Wed Jun 14, 2023 11:42 PM UTC by F8 is great
Last Updated: Thu Jun 15, 2023 01:50 AM UTC
Owner: nobody
Attachments:
SciTE is implemented by a community, not just an individual. There are 446 credited authors. A private bug is visible to only 7 people, most of whom will not be interested in any particular issue. I didn't implement scripting and use only basic scripting features.
Changes made here may cause failures in currently working techniques and should be disclosed to impacted users before being made. That allows negotiations to minimize problems. The best way to communicate with many (but not a majority of) users is to write to the mailing list.
https://groups.google.com/g/scite-interest
[bugs:#2389] SciTE automatic untrusted code execution via Lua
Status: open
Group: Bug
Labels: SciTE security
Created: Wed Jun 14, 2023 11:42 PM UTC by F8 is great
Last Updated: Thu Jun 15, 2023 09:43 AM UTC
Owner: nobody
Attachments:
Fixed with [fdc77a].
[bugs:#2389] SciTE automatic untrusted code execution via Lua
Status: open
Group: Bug
Labels: SciTE security
Created: Wed Jun 14, 2023 11:42 PM UTC by F8 is great
Last Updated: Sat Jun 17, 2023 11:46 AM UTC
Owner: nobody
Attachments:
Hello.
I would like to raise what I believe to be another a security issue, regarding SciTE execution of arbitrary code based on malicious local properties files.
By setting "ext.lua.startup.script" in a local properties file, I have been successfully able to:
This is unsafe in scenarios where a folder contains content that the user did not themselves create, such as:
Proof of concept
Pleased see attached file "proof_of_concept_scite_lua_startup_win_v1.zip" which demonstrates this issue, although please note I accept no liability for any damage or loss resulting from this code.
This windows-oriented example demonstrates both file creation and command execution, by creating text files with a "bad_" prefix as a record of the automatic command execution.
Notes regarding this proof-of-concept
I have been able to trigger this issue when both:
[bugs:#2389] SciTE automatic untrusted code execution via Lua
Status: closed-fixed
Group: Bug
Labels: SciTE security
Created: Wed Jun 14, 2023 11:42 PM UTC by F8 is great
Last Updated: Mon Jul 06, 2026 01:43 AM UTC
Owner: nobody
Attachments:
Hello.
I would like to raise what I believe to be another a security issue, regarding SciTE execution of arbitrary code based on malicious local properties files.
By setting "ext.lua.startup.script" in a local properties file, I have been successfully able to:
This is unsafe in scenarios where a folder contains content that the user did not themselves create, such as:
Proof of concept
Pleased see attached file "proof_of_concept_scite_lua_startup_win_v1.zip" which demonstrates this issue, although please note I accept no liability for any damage or loss resulting from this code.
This windows-oriented example demonstrates both file creation and command execution, by creating text files with a "bad_" prefix as a record of the automatic command execution.
Notes regarding this proof-of-concept
I have been able to trigger this issue when both: