GHSA-mmwx-rj87-vfgr: Dnsjava Remote Code Execution Vulnerability

HIGH
CVSS 6.5
CWE-400
Published
Advisory Summary

GHSA-mmwx-rj87-vfgr is a HIGH (CVSS 6.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Dnsjava libraries in the Maven ecosystem. The issue involves dnsjava affected by keytrap - nsec3 closest encloser proof can exhaust cpu resources. Remediation is available by upgrading affected packages to version 3.6.0.

GHSA-mmwx-rj87-vfgr at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mmwx-rj87-vfgr
Severity HIGH
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Dnsjava
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix GHSA-mmwx-rj87-vfgr

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

dnsjava:dnsjava fixed: 3.6.0
<dependency>
    <groupId>dnsjava</groupId>
    <artifactId>dnsjava</artifactId>
    <version>3.6.0</version>
</dependency>
org.jitsi:dnssecjava fixed: Latest secure release
<dependency>
    <groupId>org.jitsi</groupId>
    <artifactId>dnssecjava</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=dnsjava

How to Check if You Are Affected

To determine whether your Java application is affected by GHSA-mmwx-rj87-vfgr, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=dnsjava

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

Note: The mvn dependency:tree -Dincludes=dnsjava 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Dnsjava, 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

### Impact Users using the `ValidatingResolver` for DNSSEC validation can run into CPU exhaustion with specially crafted DNSSEC-signed zones. ### Patches Users should upgrade to dnsjava v3.6.0 ### Workarounds Although not recommended, only using a non-validating resolver, will remove the vulnerability. ### References https://www.athene-center.de/en/keytrap

GHSA-mmwx-rj87-vfgr Affected Dnsjava Versions

2 component(s)
Fixed Versions:
3.6.0
Product / Package Ecosystem Affected Versions Fixed Version
dnsjava:dnsjava
Maven
≥ 3.5.0
< 3.6.0
3.6.0
org.jitsi:dnssecjava
Maven
≤ 2.0.0

References

Frequently Asked Questions

What is GHSA-mmwx-rj87-vfgr?
GHSA-mmwx-rj87-vfgr is a security vulnerability in Dnsjava involving DNSJava affected by KeyTrap - NSEC3 closest encloser proof can exhaust CPU resources under CWE-400: Uncontrolled Resource Consumption.
Which Dnsjava versions are affected?
Affected versions include releases prior to 3.6.0 across affected packages: dnsjava:dnsjava, org.jitsi:dnssecjava.
What version fixes GHSA-mmwx-rj87-vfgr?
Upgrading to 3.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is dnsjava affected?
Yes, dnsjava:dnsjava is affected in releases prior to 3.6.0. Upgrade your dependency to 3.6.0 or later.
Is dnssecjava affected?
Yes, org.jitsi:dnssecjava is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-mmwx-rj87-vfgr?
GHSA-mmwx-rj87-vfgr has a CVSS v3.1 base score of 6.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with GHSA-mmwx-rj87-vfgr?
GHSA-mmwx-rj87-vfgr is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for GHSA-mmwx-rj87-vfgr?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=dnsjava'. 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-mmwx-rj87-vfgr",
  "modified" : "2024-11-18T16:26:54Z",
  "published" : "2024-07-22T14:46:59Z",
  "aliases" : [ ],
  "summary" : "DNSJava affected by KeyTrap - NSEC3 closest encloser proof can exhaust CPU resources",
  "details" : "### Impact\nUsers using the `ValidatingResolver` for DNSSEC validation can run into CPU exhaustion with specially crafted DNSSEC-signed zones.\n\n### Patches\nUsers should upgrade to dnsjava v3.6.0\n\n### Workarounds\nAlthough not recommended, only using a non-validating resolver, will remove the vulnerability.\n\n### References\nhttps://www.athene-center.de/en/keytrap\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "dnsjava:dnsjava"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.6.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.jitsi:dnssecjava"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "2.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dnsjava/dnsjava/security/advisories/GHSA-mmwx-rj87-vfgr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50868"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/dnsjava/dnsjava/commit/711af79be3214f52daa5c846b95766dc0a075116"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-pv4h-p8jr-6cv2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/dnsjava/dnsjava"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-22T14:46:59Z",
    "nvd_published_at" : null
  }
}