Vulnerabilities in pkg:maven/com.fasterxml.util/java-merge-sort

PACKAGE
Advisory Identifier: GHSA-qxxc-7mq4-mf79
Advisory Summary

CVE-2022-24913 is a MODERATE (CVSS 5.5) java merge-sort insecure temporary file vulnerability (CWE-668: Exposure of Resource to Wrong Sphere) affecting Java merge sort libraries in the Maven ecosystem. The issue involves java merge-sort insecure temporary file vulnerability. Remediation is available by upgrading affected packages to version 1.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.fasterxml.util/java-merge-sort

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.fasterxml.util/java-merge-sort. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-qxxc-7mq4-mf79 CVE-2022-24913 MODERATE Java Merge-sort Insecure Temporary File vulnerability

CVE-2022-24913 at a Glance

CVE Identifier CVE-2022-24913
GHSA Identifier GHSA-qxxc-7mq4-mf79
Severity MODERATE
CVSS v3.1 Base Score 5.5
CWE Classification CWE-668: Exposure of Resource to Wrong Sphere
Affected Product Java merge sort
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.5

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

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

How to Fix CVE-2022-24913

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

com.fasterxml.util:java-merge-sort fixed: 1.1.0
<dependency>
    <groupId>com.fasterxml.util</groupId>
    <artifactId>java-merge-sort</artifactId>
    <version>1.1.0</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=com.fasterxml.util

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=com.fasterxml.util

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

Note: The mvn dependency:tree -Dincludes=com.fasterxml.util 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-668: Exposure of Resource to Wrong Sphere, where the product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. In Java merge sort, 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

Versions of the package `com.fasterxml.util:java-merge-sort` before 1.1.0 are vulnerable to Insecure Temporary File in the `StdTempFileProvider()` function in `StdTempFileProvider.java`, which uses the permissive `File.createTempFile()` function, exposing temporary file contents.

CVE-2022-24913 Affected Java merge sort Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
com.fasterxml.util:java-merge-sort
Maven
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2022-24913?
CVE-2022-24913 is a security vulnerability in Java merge sort involving Java Merge-sort Insecure Temporary File vulnerability under CWE-668: Exposure of Resource to Wrong Sphere.
Which Java merge sort versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: com.fasterxml.util:java-merge-sort.
What version fixes CVE-2022-24913?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is java-merge-sort affected?
Yes, com.fasterxml.util:java-merge-sort is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2022-24913?
CVE-2022-24913 has a CVSS v3.1 base score of 5.5 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2022-24913?
CVE-2022-24913 is classified under CWE-668: Exposure of Resource to Wrong Sphere (The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.).
How can I check Maven dependencies for CVE-2022-24913?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.fasterxml.util'. 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-qxxc-7mq4-mf79",
  "modified" : "2023-01-20T22:03:35Z",
  "published" : "2023-01-12T06:30:24Z",
  "aliases" : [ "CVE-2022-24913" ],
  "summary" : "Java Merge-sort Insecure Temporary File vulnerability",
  "details" : "Versions of the package `com.fasterxml.util:java-merge-sort` before 1.1.0 are vulnerable to Insecure Temporary File in the `StdTempFileProvider()` function in `StdTempFileProvider.java`, which uses the permissive `File.createTempFile()` function, exposing temporary file contents.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.fasterxml.util:java-merge-sort"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24913"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cowtowncoder/java-merge-sort/pull/21"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cowtowncoder/java-merge-sort/commit/450fdee70b5f181c2afc5d817f293efa1a543902"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cowtowncoder/java-merge-sort"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JAVA-COMFASTERXMLUTIL-3227926"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-377", "CWE-668" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-12T20:55:23Z",
    "nvd_published_at" : "2023-01-12T05:15:00Z"
  }
}