Java NuProcess 1.2.0+ Cmd Injection via NUL in forkAndExec
CVE-2022-39243 Published on September 26, 2022

NuProcess vulnerable to command-line injection through insertion of NUL character(s)
NuProcess is an external process execution implementation for Java. In all the versions of NuProcess where it forks processes by using the JVM's Java_java_lang_UNIXProcess_forkAndExec method (1.2.0+), attackers can use NUL characters in their strings to perform command line injection. Java's ProcessBuilder isn't vulnerable because of a check in ProcessBuilder.start. NuProcess is missing that check. This vulnerability can only be exploited to inject command line arguments on Linux. Version 2.0.5 contains a patch. As a workaround, users of the library can sanitize command strings to remove NUL characters prior to passing them to NuProcess for execution.

Github Repository NVD

Vulnerability Analysis

CVE-2022-39243 can be exploited with local system access, and does not require authorization privileges or user interaction. This vulnerability is considered to have a low attack complexity. Public availability of a proof of concept (POC) exploit exists for CVE-2022-39243. The potential impact of an exploit of this vulnerability is considered to be very high.

Attack Vector:
LOCAL
Attack Complexity:
LOW
Privileges Required:
NONE
User Interaction:
NONE
Scope:
UNCHANGED
Confidentiality Impact:
HIGH
Integrity Impact:
HIGH
Availability Impact:
HIGH

Weakness Type

What is a Command Injection Vulnerability?

The software constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

CVE-2022-39243 has been classified to as a Command Injection vulnerability or weakness.


Affected Versions

brettwooldridge NuProcess Version >= 1.2.0, < 2.0.5 is affected by CVE-2022-39243

Vulnerable Packages

The following package name and versions may be associated with CVE-2022-39243

Package Manager Vulnerable Package Versions Fixed In
maven com.zaxxer:nuprocess >= 1.2.0, < 2.0.5 2.0.5

Exploit Probability

EPSS
0.73%
Percentile
73.10%

EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.