Skip to content

Insufficient input filtering of "package name" allows command execution in the device with shell privileges

Moderate
skylot published GHSA-3pp3-hg2q-9gpm Apr 22, 2024

Package

jadx-gui

Affected versions

<=1.4.7

Patched versions

1.5.0

Description

Summary

Package name is not filtered before concatenation. This can be exploited to inject arbitrary code into the package name.

String cmd = "am start -D -n " + fullAppName;
res = ADB.execShellCommandRaw(info.getSerial(), cmd, socket.getOutputStream(), socket.getInputStream());

PoC

  • Create an app with package name of "com.example | svc power shutdown | echo".
  • Open apk in jadx.
  • Verify package name
image
  • In the debug menu, click on "Launch App" button
  • Verify that phone is shutting down

Impact

User would expect app to run with untrusted app privileges and may have set his environment accordingly. But this vulnerability allows attacker to execute command with shell privileges.

Severity

Moderate
6.1
/ 10

CVSS base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:H

CVE ID

CVE-2024-32653

Weaknesses

Credits