CVE-2026-55368: h2o: buffer overflow when using the %{error}x log directive
h2o is an HTTP server with support for HTTP/1.x, HTTP/2 and HTTP/3. Prior to commit 48b7ae12107fd2b118e4641da49599e9aac8edd8, H2O's access-log formatter could write past its log-line buffer when an affected custom access-log format was configured. The allocation errors affected %{error}x, %q when the query string was empty, and numeric elements whose temporary terminating NUL reached the end of the buffer. A matching request could crash the server, while the effect of the one-byte NUL overwrite beyond a crash was not established. This vulnerability is fixed with commit 48b7ae12107fd2b118e4641da49599e9aac8edd8.
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
h2oto a version that resolves this vulnerability.Patch 48b7ae12107fd2b118e4641da49599e9aac8edd8
Event History
Frequently Asked Questions
Which H2O deployments should be investigated first?
Investigate deployments using a custom access-log format that includes %{error}x, %q, or numeric elements. The %q case is affected when the request has an empty query string; numeric elements are affected when their temporary terminating NUL reaches the end of the log-line buffer.
What does an attacker need to exploit this issue?
An attacker needs network access to the H2O server and must send a request that matches an affected logging condition. The supplied vector indicates no authentication or user interaction is required, although attack complexity is high.
What is the available remediation?
Update to a version containing commit 48b7ae12107fd2b118e4641da49599e9aac8edd8. If updating cannot be done immediately, review custom access-log formats and avoid the identified affected directives where operationally feasible.