NGINX HTTP Dav Module Alias Directive Integer Underflow Remote Code Execution Vulnerability
The NGINX HTTP DAV module mishandles user-supplied data when parsing WebDAV requests, causing an integer underflow before a memory write. A remote unauthenticated attacker could exploit this to execute arbitrary code as the service account.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of NGINX. Authentication is not required to exploit this vulnerability.
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 DAV module fails to validate the length of user-supplied data before using it in a size calculation, allowing an integer underflow that leads to an out-of-bounds memory write.
Impact
A remote, unauthenticated attacker could execute arbitrary code in the context of the service account, though the text gives no proof-of-concept or exploitation details.
What the attacker needed
Network access to the NGINX server; WebDAV module enabled
The fix
It was fixed in version 1.29.7.
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.
WebDAV is a set of extensions to the web protocol that lets clients edit and manage files on a server. NGINX is a widely used web server, and its DAV module handles those file-editing requests. A flaw in how it checks the size of incoming data can make an internal counter wrap around to a huge value, and the server then writes past the end of a memory buffer. Because this happens before any login check, anyone who can reach the server could potentially run their own code on 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.