CVE-2023-6038: H2o core H2O Local File Inclusion Vulnerability Vulnerability

CRITICAL
Advisory Identifier: GHSA-6mv8-95x5-xcq9
CVSS 9.3
CWE-29 CWE-862
Published
Advisory Summary

CVE-2023-6038 is a CRITICAL (CVSS 9.3) h2o local file inclusion vulnerability vulnerability (CWE-29: Path Traversal: '\..\filename') affecting H2o core libraries in the Maven ecosystem. The issue involves h2o local file inclusion vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2023-6038 at a Glance

CVE Identifier CVE-2023-6038
GHSA Identifier GHSA-6mv8-95x5-xcq9
Severity CRITICAL
CVSS v3.1 Base Score 9.3
CWE Classification CWE-29: Path Traversal: '\..\filename'
Affected Product H2o core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.3

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

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

How to Fix CVE-2023-6038

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

ai.h2o:h2o-core fixed: Latest secure release
<dependency>
    <groupId>ai.h2o</groupId>
    <artifactId>h2o-core</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=ai.h2o

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=ai.h2o

Analyze the terminal output to locate any version of H2o core 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=ai.h2o 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-29: Path Traversal: '\..\filename', where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. In H2o core, 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 Local File Inclusion (LFI) vulnerability exists in the h2o-3 REST API, allowing unauthenticated remote attackers to read arbitrary files on the server with the permissions of the user running the h2o-3 instance. This issue affects the default installation and does not require user interaction. The vulnerability can be exploited by making specific GET or POST requests to the ImportFiles and ParseSetup endpoints, respectively. This issue was identified in version 3.40.0.4 of h2o-3.

CVE-2023-6038 Affected H2o core Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
ai.h2o:h2o-core
Maven
≤ 3.40.0.4

References

Frequently Asked Questions

What is CVE-2023-6038?
CVE-2023-6038 is a security vulnerability in H2o core involving H2O local file inclusion vulnerability under CWE-29: Path Traversal: '\..\filename'.
Which H2o core versions are affected?
Affected versions include releases prior to current release patches across affected packages: ai.h2o:h2o-core.
What version fixes CVE-2023-6038?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is h2o-core affected?
Yes, ai.h2o:h2o-core 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-6038?
CVE-2023-6038 has a CVSS v3.1 base score of 9.3 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2023-6038?
CVE-2023-6038 is classified under CWE-29: Path Traversal: '\..\filename' (The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory.).
How can I check Maven dependencies for CVE-2023-6038?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=ai.h2o'. 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-6mv8-95x5-xcq9",
  "modified" : "2024-04-16T15:47:04Z",
  "published" : "2023-11-16T18:30:31Z",
  "aliases" : [ "CVE-2023-6038" ],
  "summary" : "H2O local file inclusion vulnerability",
  "details" : "A Local File Inclusion (LFI) vulnerability exists in the h2o-3 REST API, allowing unauthenticated remote attackers to read arbitrary files on the server with the permissions of the user running the h2o-3 instance. This issue affects the default installation and does not require user interaction. The vulnerability can be exploited by making specific GET or POST requests to the ImportFiles and ParseSetup endpoints, respectively. This issue was identified in version 3.40.0.4 of h2o-3.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "ai.h2o:h2o-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.40.0.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-6038"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/h2oai/h2o-3"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/380fce33-fec5-49d9-a101-12c972125d8c"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-29", "CWE-862" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-08T18:41:10Z",
    "nvd_published_at" : "2023-11-16T17:15:09Z"
  }
}