Skip to content
Memory corruption Disclosed report Advanced

Out of order TLS handshake / application data messages lead to segmentation fault

Sending TLS handshake messages out of order or after the handshake has completed causes a segmentation fault in the Node.js process. An attacker could crash the server, leading to denial of service.

jzebor Follow

Originally disclosed on HackerOne

High 7.5 View original
  • Disclosed after 22 months

Summary: IMPORTANT NOTE: I have already been working with the NodeJS core security team on this issue and have provided core files, POC and many other pieces of information. I was told by James Snell to report via Hackerone to make it official however all the relevant details on this issue have already been provided to NodeJS team. This report will be minimal since all details are already with the team which needs them.

Description: Sending interleaved handshake messages in the TLS handshake OR sending TLS handshake messages AFTER the handshake has completed (after finished msg) causes a segmentation fault of the NodeJS process. This is present in v9 and v10, using TLS module. The issue can be exposed with servers which use TLS in normal "server authentication" mode AND servers which require mutual authentication (client certificates).

Steps To Reproduce:

  1. Setup TLS server with node.
  2. Perform a normal handshake but insert a Client Key Exchange message AFTER the TLS handshake finished message.
  3. Observe segmentation fault of node process.

Stacktrace, core file and reproduction script(s) have all been provided to Anna Henningsen on the NodeJS core team.

Impact: Denial of service, seg fault leads to the node instance inability to service additional clients.

Supporting Material/References: All of this has already been provided to Core NodeJS security team.

  • List any additional material (e.g. screenshots, logs, references, commits, code examples, etc.).

Impact

Segmentation fault of the process leads to denial of service.

The original report as published on HackerOne, by jzebor. 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 the TLS implementation does not properly validate the order or timing of handshake messages, leading to a memory access error.

Impact

A segmentation fault crashes the Node.js process, causing denial of service as the server cannot handle additional clients.

What the attacker needed

Node.js TLS server; Ability to send crafted TLS messages

How it was found

  1. Set up a TLS server with Node.js.
  2. Perform a normal handshake but insert a Client Key Exchange message after the TLS handshake finished message.
  3. Observe segmentation fault of the Node.js process.

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.

TLS is the protocol that secures connections (like HTTPS). The handshake is the initial negotiation between client and server. If a client sends certain handshake messages at the wrong time, the Node.js server crashes instead of handling the error gracefully.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

More by jzebor

View all

3 more disclosed reports, best first.

More from Node.js

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.