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.
Originally disclosed on Cisco Talos
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.
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
- Send an HTTP request with the Transfer-Encoding: chunked header.
- Include a chunk of size 1 followed by a long string of characters without a newline.
- 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.