High priorityDisclosed

Advisory · CVE-2026-142097

Swoole out-of-bounds read leaks Authorization and Cookie headers from other connections

Swoole before 6.1.14 and 6.2.x before 6.2.7 mishandles requests prefixed with CRLFCRLF in the coroutine HTTP server, letting a remote unauthenticated attacker read up to 64 KB of heap memory, including other connections' Authorization and Cookie headers, or crash the server. Scored CVSS 3.1 9.1 and CVSS 4.0 8.8. Fixed in 6.1.14 and 6.2.7.

Vendor
Swoole
Product
Swoole
Identifier / CWE
CVE-2026-142097
CWE-125
Action timing
Immediate
ELI5

Explain it like I’m five

Swoole's web server reads a request that starts with a blank line, and instead of stopping at the end of that request it keeps reading into the pile of other people's mail on the desk. An attacker who sends that blank-line request gets back up to 64 KB of server memory that can contain other users' login tokens, or knocks the server over.

SIMPLIFIED_ATTACK_PATH05 STEPS
  1. 01Crafted request

    A remote unauthenticated attacker sends an HTTP request prefixed with CRLFCRLF to a Swoole coroutine HTTP server.

  2. 02Mishandled read

    onAccept() in swoole_http_server_coro.cc mishandles the prefixed request and reads past the intended buffer.

  3. 03Heap memory returned

    getContent() returns up to 64 KB of heap memory from the server process.

  4. 04Credentials leak

    The returned memory can contain other connections' Authorization and Cookie headers.

  5. 05Crash

    The same malformed request can crash the server instead of leaking data.

What happened

Swoole before 6.1.14 and 6.2.x before 6.2.7 contains an out-of-bounds read in onAccept() of the coroutine HTTP server. A request prefixed with CRLFCRLF is mishandled, so getContent() returns up to 64 KB of heap memory to the attacker. That memory can hold other connections’ Authorization and Cookie headers, and the malformed request can also crash the server.

Swoole rates the flaw CVSS 3.1 9.1 and CVSS 4.0 8.8. It affects Swoole before 6.1.14 and 6.2.x before 6.2.7, and is fixed in 6.1.14 and 6.2.7.

What to do

  1. Inventory PHP services running Swoole and check the installed version.
  2. Upgrade affected services to Swoole 6.1.14 or 6.2.7, matching the installed release line.
  3. Rotate Authorization tokens, session cookies, and API credentials that passed through affected servers, since leaked headers cannot be ruled out.
  4. Review server logs and crash reports for requests with leading CRLF sequences.
  5. Until upgraded, restrict network access to Swoole HTTP servers to trusted clients where practical.

Management note

This is a memory disclosure in a server that sits in front of user sessions: the leaked material is the credential itself, not a hint about it. The upgrade is the fix, but the credential rotation matters just as much, because a header read once stays usable until it is revoked.