Skip to content
Memory corruption Advisory Advanced CVE-2019-5096

EmbedThis GoAhead web server code execution vulnerability

GoAhead web server mishandles multipart/form-data requests that contain multiple Content-Disposition headers, causing a use-after-free during cleanup of upload structures. An unauthenticated attacker could send a crafted request to corrupt heap memory and potentially achieve code execution.

A member Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

An exploitable code execution vulnerability exists in the processing of multi-part/form-data requests within the base GoAhead web server application in versions v5.0.1, v.4.1.1 and v3.6.5. A specially crafted HTTP request can lead to a use-after-free condition during the processing of this request that can be used to…

a member, 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

Likely the upload cleanup routine frees the same filename pointer more than once and then uses it again, because multiple Content-Disposition headers create overlapping upload structures.

Impact

An unauthenticated attacker could corrupt heap structures and potentially achieve full code execution, though exploitability depends on the target build and route configuration.

What the attacker needed

Network access to the server; upload handler reachable by route; no authentication on the route

The fix

The vendor patched the issue, and builds can also enable the internal allocator option, which catches the basic use-after-free but not all corruption.

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.

A web server keeps track of uploaded files in memory. When a request contains several file-part headers, the server frees the same memory twice and then keeps using it, which can crash the server or let an attacker take control of it. No login is needed to send such a request.

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 A member

View all

110 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.