cbcvebase.
CVE-2023-6038
published 2023-11-16

CVE-2023-6038: 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…

PriorityP178high7.5CVSS 3.1
AVNACLPRNUINSUCHINAN
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
4.34%
90.0th percentile
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.

Affected

1 ranges
VendorProductVersion rangeFixed in
h2oaih2oai_h2o-3unspecified – latest

Detection & IOCsextracted from sources · hover to see the quote

urlGET /3/ImportFiles?path=%2Fetc%2Fpasswd HTTP/1.1
urlPOST /3/ParseSetup HTTP/1.1
path/3/ImportFiles
path/3/ParseSetup
commandsource_frames=%5B%22nfs%3A%2F%2Fetc%2Fpasswd%22%5D
yara
rule CVE_2023_6038_H2O_LFI { strings: $req1 = "/3/ImportFiles?path=" $req2 = "/3/ParseSetup" $payload1 = "%2Fetc%2Fpasswd" $payload2 = "nfs%3A%2F%2Fetc%2Fpasswd" $resp = "ImportFilesV3" condition: ($req1 and $payload1) or ($req2 and $payload2) or $resp }
  • Detect exploitation attempts via GET requests to /3/ImportFiles with a 'path' parameter containing URL-encoded file paths (e.g., %2Fetc%2Fpasswd). No authentication is required, so any such unauthenticated request is suspicious.
  • Detect exploitation attempts via POST requests to /3/ParseSetup with a body containing 'source_frames' referencing local paths via the nfs:// scheme (e.g., nfs%3A%2F%2Fetc%2Fpasswd).
  • Successful exploitation of the ImportFiles endpoint returns a response body containing 'ImportFilesV3'. Monitor HTTP responses for this string in conjunction with path traversal indicators.
  • Successful exploitation of the ParseSetup endpoint returns a response body matching the pattern 'root:.*:0:0:' (i.e., /etc/passwd content). Monitor HTTP responses for this regex pattern.
  • Use Shodan/FOFA/Google dorks to identify exposed H2O Flow dashboards that may be vulnerable: Shodan 'title:"H2O Flow"', FOFA 'title="h2o flow"', Google 'intitle:"h2o flow"'.
  • ·The vulnerability affects the default installation of h2o-3 and does not require authentication or user interaction, meaning any exposed H2O Flow instance is at risk without additional network controls.
  • ·Files are read with the OS-level permissions of the user running the h2o-3 process. If running as root or a privileged user, all files on the system are accessible to an attacker.
  • ·The vulnerability was specifically identified in version 3.40.0.4 of h2o-3; detections and mitigations should be scoped to this and potentially earlier versions.

CVSS provenance

nvdv3.17.5HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv3.09.3CRITICALCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
vulncheck7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.