CVE-2021-27568: Json smart Improper Check For Unusual Or Vulnerability

MODERATE
Advisory Identifier: GHSA-v528-7hrm-frqp
CVSS 5.9
CWE-754
Published
Advisory Summary

CVE-2021-27568 is a MODERATE (CVSS 5.9) improper check for unusual or vulnerability (CWE-754: Improper Check for Unusual or Exceptional Conditions) affecting Json smart libraries in the Maven ecosystem. The issue involves improper check for unusual or exceptional conditions in json-smart. Remediation is available by upgrading affected packages to version 1.3.2, 2.4.1, 2.3.1.

CVE-2021-27568 at a Glance

CVE Identifier CVE-2021-27568
GHSA Identifier GHSA-v528-7hrm-frqp
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-754: Improper Check for Unusual or Exceptional Conditions
Affected Product Json smart
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

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:N/S:U/C:N/I:N/A:H).

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

How to Fix CVE-2021-27568

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

net.minidev:json-smart fixed: 1.3.2
<dependency>
    <groupId>net.minidev</groupId>
    <artifactId>json-smart</artifactId>
    <version>1.3.2</version>
</dependency>
net.minidev:json-smart fixed: 2.4.1
<dependency>
    <groupId>net.minidev</groupId>
    <artifactId>json-smart</artifactId>
    <version>2.4.1</version>
</dependency>
net.minidev:json-smart-mini fixed: 1.3.2
<dependency>
    <groupId>net.minidev</groupId>
    <artifactId>json-smart-mini</artifactId>
    <version>1.3.2</version>
</dependency>
net.minidev:json-smart fixed: 2.3.1
<dependency>
    <groupId>net.minidev</groupId>
    <artifactId>json-smart</artifactId>
    <version>2.3.1</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=net.minidev

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=net.minidev

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

Note: The mvn dependency:tree -Dincludes=net.minidev 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-754: Improper Check for Unusual or Exceptional Conditions, where the product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product. In Json smart, 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

An issue was discovered in netplex json-smart-v1 through 2015-10-23 and json-smart-v2 through 2.4. An exception is thrown from a function, but it is not caught, as demonstrated by NumberFormatException. When it is not caught, it may cause programs using the library to crash or expose sensitive information.

CVE-2021-27568 Affected Json smart Versions

4 component(s)
Fixed Versions:
1.3.22.4.12.3.1
Product / Package Ecosystem Affected Versions Fixed Version
net.minidev:json-smart
Maven
< 1.3.2
1.3.2
net.minidev:json-smart
Maven
≥ 2.4.0
< 2.4.1
2.4.1
net.minidev:json-smart-mini
Maven
< 1.3.2
1.3.2
net.minidev:json-smart
Maven
≥ 2.0.0
< 2.3.1
2.3.1

References

Frequently Asked Questions

What is CVE-2021-27568?
CVE-2021-27568 is a security vulnerability in Json smart involving Improper Check for Unusual or Exceptional Conditions in json-smart under CWE-754: Improper Check for Unusual or Exceptional Conditions.
Which Json smart versions are affected?
Affected versions include releases prior to 1.3.2, 2.4.1, 2.3.1 across affected packages: net.minidev:json-smart, net.minidev:json-smart-mini.
What version fixes CVE-2021-27568?
Upgrading to 1.3.2, 2.4.1, 2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is json-smart affected?
Yes, net.minidev:json-smart is affected in releases prior to 1.3.2, 2.4.1, 2.3.1. Upgrade your dependency to 1.3.2, 2.4.1, 2.3.1 or later.
Is json-smart-mini affected?
Yes, net.minidev:json-smart-mini is affected in releases prior to 1.3.2. Upgrade your dependency to 1.3.2 or later.
What is the CVSS score of CVE-2021-27568?
CVE-2021-27568 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-27568?
CVE-2021-27568 is classified under CWE-754: Improper Check for Unusual or Exceptional Conditions (The product does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the product.).
How can I check Maven dependencies for CVE-2021-27568?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=net.minidev'. 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-v528-7hrm-frqp",
  "modified" : "2023-02-15T18:39:26Z",
  "published" : "2021-06-16T18:03:47Z",
  "aliases" : [ "CVE-2021-27568" ],
  "summary" : "Improper Check for Unusual or Exceptional Conditions in json-smart",
  "details" : "An issue was discovered in netplex json-smart-v1 through 2015-10-23 and json-smart-v2 through 2.4. An exception is thrown from a function, but it is not caught, as demonstrated by NumberFormatException. When it is not caught, it may cause programs using the library to crash or expose sensitive information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "net.minidev:json-smart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "net.minidev:json-smart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.4.0"
      }, {
        "fixed" : "2.4.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "net.minidev:json-smart-mini"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "net.minidev:json-smart"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-27568"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/netplex/json-smart-v1/issues/7"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/netplex/json-smart-v2/issues/60"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/netplex/json-smart-v2/issues/62"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/netplex/json-smart-v2/pull/72"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/netplex/json-smart-v1/commit/768db58ee0e3e344fcdb574b7629765308a1d0af"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/netplex/json-smart-v2"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rb6287f5aa628c8d9af52b5401ec6cc51b6fc28ab20d318943453e396@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/re237267da268c690df5e1c6ea6a38a7fc11617725e8049490f58a6fa@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf70210b4d63191c0bfb2a0d5745e104484e71703bf5ad9cb01c980c6@%3Ccommits.druid.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com//security-alerts/cpujul2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujan2022.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-754" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-18T22:30:13Z",
    "nvd_published_at" : "2021-02-23T02:15:00Z"
  }
}