Skip to content
DoS Disclosed report Intermediate CVE-2024-27983

Assertion failed in node::http2::Http2Session::~Http2Session() leads to HTTP/2 server crash

A race condition in Node.js HTTP/2 session teardown can leave header data in nghttp2 memory when a client sends CONTINUATION frames and then abruptly closes the TCP connection. An attacker could crash the HTTP/2 server with a small number of frames, making it unavailable.

bart Follow

Originally disclosed on HackerOne

Bounty$3,645 High 7.5 View original
  • Triaged in 24 hours
  • Fixed in 21 days
  • Paid in 21 days
  • Disclosed after 21 days

Summary by the program

Assertion failed in node::http2::Http2Session::~Http2Session() leads to HTTP/2 server crash (CVE-2024-27983) - (High) An attacker can make the Node.js HTTP/2 server completely unavailable by sending a small amount of HTTP/2 frames packets with a few HTTP/2 frames inside. It is possible to leave some data in nghttp2 memory after reset when headers with HTTP/2 CONTINUATION frame are sent to the server and then a TCP connection is abruptly closed by the client triggering the Http2Session destructor while header frames are still being processed (and stored in memory) causing a race condition.

Impacts:

This vulnerability affects all users in all active release lines: 18.x, 20.x and, 21.x.

Thank you, to bart for reporting this vulnerability and Anna Henningsen for fixing it.

Full Security Advisory: https://nodejs.org/en/blog/vulnerability/april-2024-security-releases

The report

An attacker can make the Node.js HTTP/2 server completely unavailable by sending a small amount of HTTP/2 frames packets with a few HTTP/2 frames inside. It is possible to leave some data in nghttp2 memory after reset when headers with HTTP/2 CONTINUATION frame are sent to the server and then a TCP connection is abruptly closed by the client triggering the Http2Session destructor while header frames are still being processed (and stored in memory) causing a race condition.

Impact

Server crashes instantly after sending a few HTTP/2 frames.

The original report as published on HackerOne, by bart. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a race between processing HTTP/2 header frames and destroying the session when the TCP connection closes, leaving data in nghttp2 memory that the destructor does not expect.

Impact

The HTTP/2 server crashes instantly, making it completely unavailable to all users.

What the attacker needed

Target runs Node.js 18.x, 20.x or 21.x; target exposes an HTTP/2 server; attacker can send TCP packets to it

The fix

A fix was credited to Anna Henningsen, with an April 2024 security advisory.

How it was found

  1. Send HTTP/2 headers that include a CONTINUATION frame to the server.
  2. Abruptly close the TCP connection from the client.
  3. The server's Http2Session destructor runs while header frames are still being processed, causing a crash.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

HTTP/2 is a newer version of the protocol web servers use to talk to browsers. A race condition means two things happen at almost the same time and the program handles them in the wrong order. Here, if a client sends part of a request and then disconnects suddenly, the server can crash while cleaning up, so other users cannot reach it.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

More by bart

View all

5 more disclosed reports, best first.

More from Internet Bug Bounty

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.