-
Notifications
You must be signed in to change notification settings - Fork 685
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Windows service: unquoted service path can allow for privilege escalation #289
Comments
see #290 |
Hello? |
@trespassing-potato Could it be that you got fooled by your security scanner? Because if you step into the m.CreateService(... call at line 256, you will see that the path is already being escaped by a call to syscall.EscapeArg() (see https://docs.microsoft.com/en-us/previous-versions/ms880421(v=msdn.10)?redirectedfrom=MSDN). Note: I copied the comment from the pull request #290 - just in case someone stumbles upon this issue. |
Yes, I believe so. I should have looked into it further before raising this issue, my apologies! (I tried to reproduce the issue discovered by our scanner, but the installed service in question (telegraf) has a quoted path). Also sent an email to MITRE regarding the CVE I requested, and asked them to mark it as invalid. |
@trespassing-potato This vulnerability CVE-2022-29583 still shows up in scans. And its still not marked as invalid. Can you please help ? |
Hello!
We use Telegraf (which depend on this library) and our vulnerability scanner notifies us of the following vulnerability with the telegraf service: Windows Unquoted Search Path or Element can allow local privilege escalation
I did some brief digging around and I think the problem boils down to this line:
service/service_windows.go
Line 226 in 36c9bf8
Here you take the path to the executing program (if I understood correctly) and later use it when you install the service. Doing this without adding quotes to the path means that the unquoted service path issue comes into effect.
You should be able to simply add quotes to the path, and in doing to solve the issue at hand.
The text was updated successfully, but these errors were encountered: