Skip to content
RCE Write-up Advanced

CVE-2019–11043: PHP-FPM Nginx Remote Code Execution Vulnerabili

PHP-FPM had a buffer overflow when parsing FastCGI parameters from Nginx, allowing an attacker to send a crafted HTTP request and execute code on the server. Successful exploitation could lead to full system compromise, including remote command execution and data theft.

Mansipathak Follow

Published on medium.com

The impact is significant: when successful exploitation can result in full system compromise which enables the attackers to: Execute commands remotely, Leak identification data such as logs, accounts, user data, etc, and, Exploit the compromised server for subsequent attacks on an organization such as DDoS attacks or…

Mansipathak, on medium.com

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

How it worked

Root cause

Likely improper input validation and missing boundary checks in PHP-FPM's parsing of FastCGI parameters, leading to a buffer overflow.

Impact

Successful exploitation could result in full system compromise, allowing remote command execution, data leakage, and use of the server for further attacks.

What the attacker needed

Nginx with PHP-FPM misconfiguration; Network access to the server

The fix

Input validation and proper boundary checks should be implemented in PHP-FPM to prevent oversized FastCGI parameters from overflowing buffers.

How it was found

  1. Craft an HTTP request to the Nginx server that overflows a buffer in PHP-FPM.
  2. Send the request so PHP-FPM processes it and triggers a memory overflow.
  3. Use the resulting control to execute commands and gain a shell on the system.

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

PHP-FPM is a program that runs PHP code for web servers like Nginx. A buffer overflow happens when a program receives more data than it expects and writes it past the end of a reserved memory area, which can let an attacker take control. Here, a specially crafted web request could overflow that memory and let the attacker run their own commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.