# CVE-2026-23886: Swift W3C TraceContext has malformed HTTP header that can cause a crash

> A remote attacker can crash the service by sending a malformed HTTP header, affecting applications using Swift W3C TraceContext or Swift OTel.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jan 2026
- **Updated:** 21 Jan 2026
- **Also known as:** GHSA-mvpq-2v8x-ww6g

## What is CVE-2026-23886?

CVE-2026-23886 is a medium-severity denial of service vulnerability in swift-otel swift-w3c-trace-context, published on 19 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Swift W3C TraceContext is a Swift implementation of the W3C Trace Context standard, and Swift OTel is an OpenTelemetry Protocol (OTLP) backend for Swift Log, Swift Metrics, and Swift Distributed Tracing. Prior to Swift W3C TraceContext version 1.0.0-beta.5 and Swift OTel version 1.0.4, a denial-of-service vulnerability due to improper input validation allows a remote attacker to crash the service via a malformed HTTP header. This allows crashing the process with data coming from the network when used with, for example, an HTTP server. Most common way of using Swift W3C Trace Context is through Swift OTel. Version 1.0.0-beta.5 of Swift W3C TraceContext and version 1.0.4 of Swift OTel contain a patch for this issue. As a workaround, disable either Swift OTel or the code that extracts the trace information from an incoming header (such as a `TracingMiddleware`).

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2026-23886?

4 open source packages ship an affected version, including github.com/swift-otel/swift-w3c-trace-context and github.com/swift-otel/swift-otel.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/swift-otel/swift-w3c-trace-context` | SwiftURL | All versions | 1.0.0-beta.5 |
| `github.com/swift-otel/swift-w3c-trace-context` | SwiftURL | All versions | 1.0.0-beta.5 |
| `github.com/swift-otel/swift-otel` | SwiftURL | All versions | 1.0.4 |
| `github.com/swift-otel/swift-otel` | SwiftURL | All versions | 1.0.4 |

## How do I fix CVE-2026-23886?

Upgrade github.com/swift-otel/swift-w3c-trace-context to 1.0.0-beta.5 or later.

## Is CVE-2026-23886 being exploited?

There is no known exploitation of CVE-2026-23886 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-23886 and fix it if it is affected.

What it is: CVE-2026-23886 is a medium-severity denial of service vulnerability in swift-otel swift-w3c-trace-context, published on 19 Jan 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-23886 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/swift-otel/swift-w3c-trace-context (SwiftURL): affected all versions; fixed in 1.0.0-beta.5
- github.com/swift-otel/swift-w3c-trace-context (SwiftURL): affected all versions; fixed in 1.0.0-beta.5
- github.com/swift-otel/swift-otel (SwiftURL): affected all versions; fixed in 1.0.4
- github.com/swift-otel/swift-otel (SwiftURL): affected all versions; fixed in 1.0.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-23886/ (Markdown: https://insights.sbomify.com/CVE-2026-23886/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-23886
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-23886
- OSV: https://osv.dev/vulnerability/CVE-2026-23886

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-23886/
Summaries are generated and may contain mistakes; the official description above is the record.
