Exposed, outdated nginx server (v1.4.6) potentially vulnerable to heap-based buffer overflow & RCE
An outdated nginx server (version 1.4.6) was found publicly exposed, which falls within the range affected by CVE-2014-0133, a heap-based buffer overflow in the SPDY module that could allow remote code execution. The reporter could not confirm whether the vulnerable module was enabled, so exploitation is only potential.
- Fixed in 5 hours
- Paid in 5 hours
- Disclosed after 30 days
Summary
During my reconnaissance for your bug bounty program, I discovered an instance of nginx version 1.4.6 running at the IP address https://54.153.101.52. To locate it, I search for IRCCloud-related certificated and found the self-signed certificate for this server (https://censys.io/ipv4/54.153.101.52). This version is in the range of nginx versions affected by the CVE, CVE-2014-0133. There is a known exploit for this CVE. According to MITRE, this "heap-based buffer overflow in the SPDY implementation in nginx 1.3.15 before 1.4.7 and 1.5.x before 1.5.12 allows remote attackers to execute arbitrary code via a crafted request."

However, to succeed, I believe that the exploit requires the ngx_http_spdy_module module (which is not compiled by default) and it requires no --with-debug configure option, if the "spdy" option of the "listen" directive is used in a configuration file. Because I am unable to check the configuration of your server, I wanted to inform you of this outdated version.
Checking for Vulnerability Steps
- Log into server located at 54.153.101.52
- Check the nginx configuration file. This should provide you with information as to whether or not it is vulnerable.
Mitigation
Regardless, this is a very outdated version of nginx that should likely be updated to the most recent version if you intend to keep if publicly-exposed. This would correct the vulnerability (if it is vulnerable). Alternatively, if you only want to correct the vulnerability, you can use the patch below:
--- src/http/ngx_http_spdy.c
+++ src/http/ngx_http_spdy.c
@@ -1849,7 +1849,7 @@ static u_char *
ngx_http_spdy_state_save(ngx_http_spdy_connection_t *sc,
u_char *pos, u_char *end, ngx_http_spdy_handler_pt handler)
{
-#if (NGX_DEBUG)
+#if 1
if (end - pos > NGX_SPDY_STATE_BUFFER_SIZE) {
ngx_log_error(NGX_LOG_ALERT, sc->connection->log, 0,
"spdy state buffer overflow: "
Source: https://nginx.org/download/patch.2014.spdy2.txt
Best, @n0rb3r7
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 server runs an outdated version of nginx (1.4.6) that contains a heap-based buffer overflow in the SPDY module, but the text does not confirm the module is enabled.
Impact
If the SPDY module is enabled, a remote attacker could potentially execute arbitrary code, but the reporter could not verify the configuration so the impact is uncertain.
What the attacker needed
Nginx version 1.4.6; SPDY module enabled; no --with-debug option
The fix
The server should be updated to the most recent version of nginx, or the provided patch should be applied if only the vulnerability needs to be corrected.
How it was found
- Search for IRCCloud-related certificates to find servers.
- Identify the server at the given IP address with a self-signed certificate.
- Note the nginx version as 1.4.6.
- Log into the server to check the nginx configuration file for the SPDY module.
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.
The report is about an old web server program called nginx that has a known security flaw. If a certain optional feature (SPDY) is turned on, an attacker might be able to send a specially crafted request to crash the server or run their own code. The person reporting could not check if that feature was enabled, so they just warned the owner to update.
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.