Arbitrary Code Injection Affecting github.com/gen2brain/dlgs package, versions <0.0.0-20210609125024-bf6c92aaa984
Snyk CVSS
Attack Complexity
High
Threat Intelligence
Exploit Maturity
Proof of concept
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-GOLANG-GITHUBCOMGEN2BRAINDLGS-1303089
- published 1 Sep 2021
- disclosed 10 Jun 2021
- credit Ethan P.
How to fix?
Upgrade github.com/gen2brain/dlgs
to version 0.0.0-20210609125024-bf6c92aaa984 or higher.
Overview
github.com/gen2brain/dlgs is a cross-platform library for displaying dialogs and input boxes.
Affected versions of this package are vulnerable to Arbitrary Code Injection. The current MacOS implementation of dlgs
is vulnerable to code injection through unescaped text being sent to the osascript
command.
PoC by Ethan P.
Info("Proof of Concept\" buttons {\"OK\"} \n tell application \"Calculator\" to activate \n--", "Hello, Calculator.app!")
// ^ ^- Open Calculator.app ^
// |- Break out of the title string. |- Comment out the rest of the original AppleScript.