# CVE-2026-86252: h3 SSE event injection via unsanitized carriage return

Source: https://junglewise.ai/threats/cve-2026-86252-h3-sse-event-injection-via-unsanitized-carriage-return  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-06. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-86252 · Severity: medium · CVSS 5.3 · Published 2026-09-06

h3 is a minimal HTTP framework for building web servers. It includes an EventStream class for Server-Sent Events (SSE), a common technique for real-time updates in chat, notifications, and AI applications. The vulnerability allows attackers who can control user input to inject malicious SSE directives via carriage return characters, enabling event spoofing (redirecting data to unintended handlers), message splitting, or UI manipulation. This is especially dangerous in applications that rely on custom event types for application logic.

Technologies: [h3 (npm)](https://junglewise.ai/threats/technologies/h3). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-86252 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-86252 being exploited in the wild.

**How severe is CVE-2026-86252?** Medium severity, with a CVSS score of 5.3, published 6 September 2026.

**Which products and versions are affected?** h3 (npm) SEMVER:introduced=2.0.0-beta.0,fixed=2.0.1-rc.17.

**Is there a fix for CVE-2026-86252?** Yes. h3 (npm): upgrade to 2.0.1-rc.17 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-86252 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-86252?** Check whether you run h3 (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- h3 (npm): upgrade to 2.0.1-rc.17 or later

  ```sh
  npm install h3@2.0.1-rc.17
  ```


## Technical details

The vulnerability is an incomplete fix (CWE-74: Improper Neutralization) in the SSE implementation. The formatEventStreamMessage() and formatEventStreamComment() functions split on \n only (via String.split("\n")), but the SSE RFC specifies that \r and \r\n are also valid line terminators. An attacker who controls data or comment fields can inject \r characters to break the intended SSE framing. For example, "legit\revent: evil" is emitted as a single "data:" line but parsed by the browser as two lines due to the \r terminator, causing injection of a custom "evil" event type. The _sanitizeSingleLine() function exists to strip both \r and \n, but it is only applied to the id and event fields, not to data or comment. The fix requires splitting on the regex /\r\n|\r|\n/ instead of just "\n".

## Affected products

- h3js h3 0 to 1.15.8, 2.0.0-beta.0 to 2.0.1-rc.16

## Identifiers

- CVE-2026-86252
- GHSA-4hxc-9384-m385

## Timeline

- 2026-03-20: disclosed: GHSA-4hxc-9384-m385 published
- 2026-03-20: patched: Fixed in h3 1.15.9 and 2.0.1-rc.17

## References

- [https://github.com/h3js/h3/security/advisories/GHSA-4hxc-9384-m385](https://github.com/h3js/h3/security/advisories/GHSA-4hxc-9384-m385)
- [https://github.com/h3js/h3](https://github.com/h3js/h3)

## Related threats

- [H3 denial of service via unbounded chunked cookie count](https://junglewise.ai/threats/duplicate-advisory-h3-unbounded-chunked-cookie-count-in-session-cleanup-11041bf9)
- [h3 serveStatic path traversal via percent-encoded dot segments](https://junglewise.ai/threats/cve-2026-86253-h3-servestatic-path-traversal-via-percent-encoded-dot-segments)
- [h3 serveStatic path traversal via double-encoded dot segments](https://junglewise.ai/threats/cve-2026-86251-h3-servestatic-path-traversal-via-double-encoded-dot-segments)
- [H3: Unbounded Chunked Cookie Count in Session Cleanup Loop may Lead to Denial of Service](https://junglewise.ai/threats/cve-2026-86250-h3-unbounded-chunked-cookie-denial-of-service)
- [H3 open redirect via protocol-relative path in redirectBack()](https://junglewise.ai/threats/cve-2026-86205-h3-open-redirect-via-protocol-relative-path-in-redirectback)
