Skip to content
Memory corruption Advisory Advanced CVE-2017-2885

GNOME libsoup HTTP Chunked Encoding Remote Code Execution Vulnerability

A stack-based buffer overflow in GNOME libsoup's handling of chunked HTTP requests allows an attacker to send a specially crafted request that overflows a fixed-size buffer, potentially leading to remote code execution or a crash.

Aleksandar Nikolic Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable stack based buffer overflow vulnerability exists in the GNOME libsoup 2.58. A specially crafted HTTP request can cause a stack overflow resulting in remote code execution.

Aleksandar Nikolic, on Cisco Talos

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

How it worked

Root cause

The function soup_filter_input_stream_read_until does not verify that the destination buffer is large enough before copying data into it, leading to a stack buffer overflow.

Impact

This can be abused to crash the server or achieve remote code execution in the context of the server.

What the attacker needed

Server uses libsoup 2.58; Attacker can send HTTP requests

How it was found

  1. Send an HTTP request with the Transfer-Encoding: chunked header.
  2. Include a chunk of size 1 followed by a long string of characters without a newline.
  3. The parser scans for a newline and copies the overly long string into a 128-byte stack buffer, causing an overflow.

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.

This is a memory corruption bug in a library that handles web requests. When the library reads a chunked HTTP request, it copies data into a small buffer on the stack without checking if the data fits. An attacker can send a request with a very long line to overflow that buffer, which could let them run their own code on the server or crash 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 Aleksandar Nikolic

View all

147 more disclosed reports, best first.

More from Cisco Talos

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.