Arbitrary Code Injection Affecting github.com/gen2brain/dlgs package, versions <0.0.0-20210609125024-bf6c92aaa984


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

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 Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-GOLANG-GITHUBCOMGEN2BRAINDLGS-1303089
  • published1 Sept 2021
  • disclosed10 Jun 2021
  • creditEthan P.

Introduced: 10 Jun 2021

CVE NOT AVAILABLE CWE-94  (opens in a new tab)

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.

CVSS Scores

version 3.1