Swoole's Repeated HTTP/2 Path Header Leaks Memory
Swoole before 6.1.14 and 6.2.x before 6.2.7 contains a memory leak in its HTTP/2 header callback. CVE-2026-142095 describes repeated :path pseudo-headers that are copied without freeing the earlier value. The issue is rated 7.5 and can lead to denial of service as memory accumulates.
HTTP/2 header processing happens before an application route executes. A remote client can send a stream with repeated pseudo-headers and cause the server process to retain memory even when the request is eventually rejected or handled as an error.
Upgrade the runtime
Upgrade to 6.1.14, 6.2.7 or a later fixed release. Container images and PHP extensions can hide the actual Swoole build from application metadata. Check the extension version loaded by the PHP runtime, then rebuild and redeploy every image that serves HTTP/2.
After the update, test normal HTTP/2 requests, repeated pseudo-headers and malformed header frames in an isolated environment. Monitor resident memory over repeated requests rather than relying on a single successful response.
Evidence to review
Look for HTTP/2 traffic with repeated :path values, connection churn and gradual process memory growth near a restart. A memory graph can show impact but does not prove intentional exploitation. Correlate network records with the affected worker process and the deployment version.
If the fixed extension cannot be installed immediately, disable HTTP/2 at the front proxy or server for that workload. HTTP/1.1 may reduce this specific path while still requiring normal request limits and monitoring.
Root-cause lesson
The callback must replace or free the previous path value on every header occurrence. A parser that assumes one :path per request leaves a durable object attached to connection state. Bounded parsing and a regression test with repeated pseudo-headers prevent the defect from returning.