# GHSA-77VW-RG85-WX5X: Ztunnel panic in TraceParent::try\_from on malformed traceparent header drops HBONE connections

- Database: GitHub
- Severity: CVSS 6.5 (Medium)
- Published: 2026-11-06
- Modified: 2026-11-06

## Affected versions

- istio.io/ztunnel (crates.io): from 1.31.0, fixed in 1.31.4
- istio.io/ztunnel (crates.io): from 1.30.0, fixed in 1.30.8

## Description

### Summary

Ztunnel panics when parsing a malformed traceparent header: a 55-byte value without four dash-separated fields triggers an index-out-of-bounds in `TraceParent::try_from`. The panic terminates the inbound `HBONE` connection task and drops all streams on that connection. Headers with the correct length but the wrong field layout were also accepted instead of rejected.

### Details

`TraceParent::try_from` n `src/proxy.rs` validates only the total length (55 bytes) of a traceparent value. It then indexes the result of split('-') at [0] through [3] . A 55-byte value that does not contain four dash-separated fields causes an index-out-of-bounds panic. For example, `"0".repeat(55)` panics.

Inbound HBONE handling calls this parser through `extract_traceparent`, in the request handler that`h2::server::serve_connection` runs inline in its accept loop, before the per-stream task is spawned. The panic terminates the `HBONE` connection task, so every stream multiplexed on that connection is dropped. The intended behavior is to ignore an invalid header and generate a new trace ID.

Values with the correct total length but the wrong layout, such as five fields or a 3-character version, were also accepted instead of rejected.

Fixes are available in 1.31.4 and 1.30.8.

### Workaround

Follow one of these steps to reduce exposure:

- Restrict who can send traffic. Use L4 `AuthorizationPolicy`, so that only trusted identities can open `HBONE` connections.
- Sanitize the header before it reaches ztunnel. Where a waypoint or ingress gateway forwards traffic from untrusted external clients, that traffic can carry a crafted `traceparent` to ztunnel under the gateway's mesh identity. Strip or overwrite `traceparent` on those routes, for example with an `HTTPRoute` `RequestHeaderModifier` filter. This disables trace propagation for those routes

### Proof of concept

Send an `HBONE` request to a ztunnel inbound listener from a client with a valid mesh identity. The request carries this header:
```
traceparent: 0000000000000000000000000000000000000000000000000000000
```
That is 55 0 characters with no dashes. Ztunnel panics in `src/proxy.rs`, and the `HBONE` connection is dropped. The expected behavior is to ignore the header and generate a new trace ID.

### Impact

A client that can send `HBONE` requests to ztunnel can repeatedly crash connection tasks. This disrupts all concurrent traffic on those connections, including traffic from other workloads that share the connection. It is a data-plane availability issue only. There is no confidentiality or integrity impact. 

Exploitation requires a valid mesh identity. A client without one can only reach ztunnel if a gateway or waypoint forwards its traceparent header unchanged.

### References

- Issue: istio/ztunnel#2233

## References

- https://github.com/istio/istio/security/advisories/GHSA-77vw-rg85-wx5x

Page: https://cve.now/GHSA-77VW-RG85-WX5X

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
