CVE-2023-7148: Shifu ShifuML Shifu Code Injection Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-5fpq-3c9p-3r3w
CVSS 5.0
CWE-94
Published
Advisory Summary

CVE-2023-7148 is a MODERATE (CVSS 5.0) shifuml shifu code injection vulnerability vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Shifu libraries in the Maven ecosystem. The issue involves shifuml shifu code injection vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2023-7148 at a Glance

CVE Identifier CVE-2023-7148
GHSA Identifier GHSA-5fpq-3c9p-3r3w
Severity MODERATE
CVSS v3.1 Base Score 5.0
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Shifu
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2023-7148

To remediate this vulnerability, upgrade all affected Shifu dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ml.shifu:shifu fixed: Latest secure release
<dependency>
    <groupId>ml.shifu</groupId>
    <artifactId>shifu</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=ml.shifu

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2023-7148, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=ml.shifu

Analyze the terminal output to locate any version of Shifu in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The mvn dependency:tree -Dincludes=ml.shifu command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Shifu, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability has been found in ShifuML shifu 0.12.0 and classified as critical. Affected by this vulnerability is an unknown functionality of the file src/main/java/ml/shifu/shifu/core/DataPurifier.java of the component Java Expression Language Handler. The manipulation of the argument FilterExpression leads to code injection. The attack can be launched remotely. The complexity of an attack is rather high. The exploitation appears to be difficult. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-249151.

CVE-2023-7148 Affected Shifu Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ml.shifu:shifu
Maven
≤ 0.12.0

References

Frequently Asked Questions

What is CVE-2023-7148?
CVE-2023-7148 is a security vulnerability in Shifu involving ShifuML shifu code injection vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Shifu versions are affected?
Affected versions include releases prior to current release patches across affected packages: ml.shifu:shifu.
What version fixes CVE-2023-7148?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is shifu affected?
Yes, ml.shifu:shifu is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2023-7148?
CVE-2023-7148 has a CVSS v3.1 base score of 5.0 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L.
What CWE is associated with CVE-2023-7148?
CVE-2023-7148 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2023-7148?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ml.shifu'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-5fpq-3c9p-3r3w",
  "modified" : "2024-01-02T20:02:21Z",
  "published" : "2023-12-29T03:30:29Z",
  "aliases" : [ "CVE-2023-7148" ],
  "summary" : "ShifuML shifu code injection vulnerability",
  "details" : "A vulnerability has been found in ShifuML shifu 0.12.0 and classified as critical. Affected by this vulnerability is an unknown functionality of the file src/main/java/ml/shifu/shifu/core/DataPurifier.java of the component Java Expression Language Handler. The manipulation of the argument FilterExpression leads to code injection. The attack can be launched remotely. The complexity of an attack is rather high. The exploitation appears to be difficult. The exploit has been disclosed to the public and may be used. The associated identifier of this vulnerability is VDB-249151.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ml.shifu:shifu"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.12.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-7148"
  }, {
    "type" : "WEB",
    "url" : "https://drive.google.com/file/d/1ST3dD-iwUBgBNZ8tGaBbqVi1zRh5rLND/view"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ShifuML/shifu"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ShifuML/shifu/blob/20f589158adfc011c505664cf7bdf31e36ed62fa/src/main/java/ml/shifu/shifu/core/DataPurifier.java"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.249151"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.249151"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-02T20:02:21Z",
    "nvd_published_at" : "2023-12-29T03:15:12Z"
  }
}