Skip to content
Memory corruption Write-up Advanced

orbi hunting 0x1: crashes in soap-api

The SOAP handler on a Netgear Orbi router passes the attacker-controlled SOAP method string into a fixed-size stack buffer via sscanf without a length check, and also passes a possibly NULL pointer from a failed strstr lookup into a second sscanf. A long method string crashes the soap-api process, but the author found no security impact because a new process is spawned per request.

hyper Follow

Published on blog.coffinsec.com

The Orbi provides a SOAP server which seems to primarily be used by the Netgear mobile application, reachable at http://<ROUTER>/soap/serversa. I had originally discovered this endpoint early on when I started looking at this router but it wasn’t until I had connected over serial that I realized it was incredibly easy…

hyper, on blog.coffinsec.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the code copies the SOAP method into a 64-byte stack buffer with an unbounded sscanf conversion, and separately passes the unchecked result of a strstr lookup into another sscanf.

Impact

The process crashes, but this is not a usable denial of service because a fresh process is started for each request, and the author reports no security impact.

What the attacker needed

Network access to the router's SOAP endpoint

How it was found

  1. Send a request to the SOAP endpoint with a valid SOAPAction header.
  2. Make the method portion of the header 248 characters or longer.
  3. Observe the server still returns a 200 response while a crash dump is printed to the console.

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 write-up has not been written yet. The Original tab links to the source.

A router runs a small program that answers SOAP requests, a way for apps to call functions on it. The program copies part of the request into a small fixed-size box in memory without checking how much it is copying, so a long value spills over into neighbouring memory. The author also found a second flaw where a missing piece of text makes the program read from an empty pointer, which crashes it.

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 hyper

View all

7 more disclosed reports, best first.

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.