CVE-2018-21234: Jodd json Deserialization Of Untrusted Data Vulnerability

CRITICAL
Advisory Identifier: GHSA-jrg3-qq99-35g7
CVSS 9.8
CWE-502
Published
Advisory Summary

CVE-2018-21234 is a CRITICAL (CVSS 9.8) deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Jodd json libraries in the Maven ecosystem. The issue involves deserialization of untrusted data in jodd. Remediation is available by upgrading affected packages to version 5.0.4.

CVE-2018-21234 at a Glance

CVE Identifier CVE-2018-21234
GHSA Identifier GHSA-jrg3-qq99-35g7
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Jodd json
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2018-21234

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

org.jodd:jodd-json fixed: 5.0.4
<dependency>
    <groupId>org.jodd</groupId>
    <artifactId>jodd-json</artifactId>
    <version>5.0.4</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=org.jodd

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.jodd

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

Note: The mvn dependency:tree -Dincludes=org.jodd 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Jodd json, 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

Jodd before 5.0.4 performs Deserialization of Untrusted JSON Data when setClassMetadataName is set.

CVE-2018-21234 Affected Jodd json Versions

1 component(s)
Fixed Versions:
5.0.4
Product / Package Ecosystem Affected Versions Fixed Version
org.jodd:jodd-json
Maven
< 5.0.4
5.0.4

References

NVD — CVE-2018-21234 NVD
https://nvd.nist.gov/vuln/detail/CVE-2018-21234
Jodd json Source Repository REPOSITORY
https://github.com/oblac/jodd/issues/628
Security Fix Commit FIX COMMIT
https://github.com/oblac/jodd/commit/9bffc3913aeb8472c11bb543243004b4b4376f16
Jodd json Source Repository REPOSITORY
https://github.com/oblac/jodd
Jodd json Source Repository REPOSITORY
https://github.com/oblac/jodd/compare/v5.0.3...v5.0.4
lists.apache.org/thread.html/r0bacc7... WEB
https://lists.apache.org/thread.html/r0bacc701ab7105500a0ab2769270d18f332cb379e6a62ec7553f3327@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r157d01... WEB
https://lists.apache.org/thread.html/r157d01c96a2c10e7ceb3e005f42c52cfe87b11dd018935e1c4277433@%3Cgitbox.hive.apache.org%3E
lists.apache.org/thread.html/r317aec... WEB
https://lists.apache.org/thread.html/r317aec95c436848233047af7ecb3ce04ce446eb6031f981aef50df0d@%3Cdev.drill.apache.org%3E
lists.apache.org/thread.html/r729bc1... WEB
https://lists.apache.org/thread.html/r729bc1e0f367fe8a857ac8a14641dba284ac4cf5131edf483022cf59@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/r965503... WEB
https://lists.apache.org/thread.html/r965503b27d67a2d934e34fc1d088c9547d51d927c43b8b9bd9b7e695@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/rc23200... WEB
https://lists.apache.org/thread.html/rc23200043872384e0fc48a4a4502f4c6b4b5ddc79ba4076414150d59@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/rc85b65... WEB
https://lists.apache.org/thread.html/rc85b650b4ad2c77d7c39c69824488e40dce6d0ebbb4204777d094375@%3Cgitbox.hive.apache.org%3E
lists.apache.org/thread.html/rd575d9... WEB
https://lists.apache.org/thread.html/rd575d9877424a2d8776f5c2ff33bf3dc3382cd83f031d483f29c11ab@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/rdbb99b... WEB
https://lists.apache.org/thread.html/rdbb99b43334b59d3d3478d360c87e3235ba22edb1de7d39019194347@%3Cissues.hive.apache.org%3E
lists.apache.org/thread.html/rdce006... WEB
https://lists.apache.org/thread.html/rdce006b282e56c5cc73cdf452c51c5097154d0503396d62f48abbeae@%3Cgitbox.hive.apache.org%3E
lists.apache.org/thread.html/rf45868... WEB
https://lists.apache.org/thread.html/rf458683390d6650b26a2c8ba8ad396e038e520ad1cc3f3f1e20514d9@%3Cdev.hive.apache.org%3E

Frequently Asked Questions

What is CVE-2018-21234?
CVE-2018-21234 is a security vulnerability in Jodd json involving Deserialization of Untrusted Data in Jodd under CWE-502: Deserialization of Untrusted Data.
Which Jodd json versions are affected?
Affected versions include releases prior to 5.0.4 across affected packages: org.jodd:jodd-json.
What version fixes CVE-2018-21234?
Upgrading to 5.0.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jodd-json affected?
Yes, org.jodd:jodd-json is affected in releases prior to 5.0.4. Upgrade your dependency to 5.0.4 or later.
What is the CVSS score of CVE-2018-21234?
CVE-2018-21234 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-21234?
CVE-2018-21234 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2018-21234?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.jodd'. 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-jrg3-qq99-35g7",
  "modified" : "2022-04-26T17:59:29Z",
  "published" : "2022-02-10T23:03:26Z",
  "aliases" : [ "CVE-2018-21234" ],
  "summary" : "Deserialization of Untrusted Data in Jodd",
  "details" : "Jodd before 5.0.4 performs Deserialization of Untrusted JSON Data when setClassMetadataName is set.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jodd:jodd-json"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-21234"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oblac/jodd/issues/628"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oblac/jodd/commit/9bffc3913aeb8472c11bb543243004b4b4376f16"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/oblac/jodd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/oblac/jodd/compare/v5.0.3...v5.0.4"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r0bacc701ab7105500a0ab2769270d18f332cb379e6a62ec7553f3327@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r157d01c96a2c10e7ceb3e005f42c52cfe87b11dd018935e1c4277433@%3Cgitbox.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r317aec95c436848233047af7ecb3ce04ce446eb6031f981aef50df0d@%3Cdev.drill.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r729bc1e0f367fe8a857ac8a14641dba284ac4cf5131edf483022cf59@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r965503b27d67a2d934e34fc1d088c9547d51d927c43b8b9bd9b7e695@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rc23200043872384e0fc48a4a4502f4c6b4b5ddc79ba4076414150d59@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rc85b650b4ad2c77d7c39c69824488e40dce6d0ebbb4204777d094375@%3Cgitbox.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rd575d9877424a2d8776f5c2ff33bf3dc3382cd83f031d483f29c11ab@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rdbb99b43334b59d3d3478d360c87e3235ba22edb1de7d39019194347@%3Cissues.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rdce006b282e56c5cc73cdf452c51c5097154d0503396d62f48abbeae@%3Cgitbox.hive.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rf458683390d6650b26a2c8ba8ad396e038e520ad1cc3f3f1e20514d9@%3Cdev.hive.apache.org%3E"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-14T21:24:02Z",
    "nvd_published_at" : "2020-05-21T23:15:00Z"
  }
}