CVE-2023-41337

h2o vulnerable to TLS session resumption misdirection

6.1 medium EPSS 0.22%

Published 12 Dec 2023 Updated 2 Aug 2024 CNA: GitHub_M

Check your servers for CVE-2023-41337

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-41337 affects h2o, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

h2o is an HTTP server with support for HTTP/1.x, HTTP/2 and HTTP/3. In version 2.3.0-beta2 and prior, when h2o is configured to listen to multiple addresses or ports with each of them using different backend servers managed by multiple entities, a malicious backend entity that also has the opportunity to observe or inject packets exchanged between the client and h2o may misdirect HTTPS requests going to other backends and observe the contents of that HTTPS request being sent.

The attack involves a victim client trying to resume a TLS connection and an attacker redirecting the packets to a different address or port than that intended by the client. The attacker must already have been configured by the administrator of h2o to act as a backend to one of the addresses or ports that the h2o instance listens to. Session IDs and tickets generated by h2o are not bound to information specific to the server address, port, or the X.509 certificate, and therefore it is possible for an attacker to force the victim connection to wrongfully resume against a different server address or port on which the same h2o instance is listening.

Once a TLS session is misdirected to resume to a server address / port that is configured to use an attacker-controlled server as the backend, depending on the configuration, HTTPS requests from the victim client may be forwarded to the attacker's server.

An H2O instance is vulnerable to this attack only if the instance is configured to listen to different addresses or ports using the listen directive at the host level and the instance is configured to connect to backend servers managed by multiple entities.

A patch is available at commit 35760540337a47e5150da0f4a66a609fad2ef0ab. As a workaround, one may stop using using host-level listen directives in favor of global-level ones.

Severity (CVSS)

6.1 medium CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:A/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
Attack vector
adjacent: the attacker has to be on the same local network or link
Attack complexity
high: an attack depends on conditions outside the control of the attacker, such as a race
Privileges required
low: the attacker needs an ordinary user account
User interaction
required: a user has to do something, such as open a link or a file
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 6.92% of all scored CVEs. Scores of 29 Nov 2026.

Weakness

  • CWE-347 Improper Verification of Cryptographic Signature

Affected products

As the CNA lists them.

ProductVersions
h2o
affected <= 2.3.0-beta2

Is my server affected?

Find the installed version of h2o and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i h2o
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2023-41337 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2023-41337

RHEL, Rocky, Alma, Fedora

rpm -q h2o
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2023-41337

Alpine

apk list --installed | grep -i h2o

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2023-41337
trivy image --scanners vuln IMAGE | grep CVE-2023-41337

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Advisories

Other references

Source: the record CVE-2023-41337 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.