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

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
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