FastCGI Integer Overflow Vulnerability Leading to Heap-Based Buffer Overflow

Vulnerability

A vulnerability in FastCGI versions 2.x through 2.4.4 has been identified, involving an integer overflow that results in a heap-based buffer overflow. This issue arises in the ReadParams function within fcgiapp.c, where crafted nameLen or valueLen values in data sent to the IPC socket are not properly validated. The vulnerability can be exploited, particularly in environments without robust system protections, potentially leading to remote code execution.

Impact

Exploitation of this vulnerability causes a heap-based buffer overflow, which can be leveraged to execute arbitrary code.

Reproduction

The vulnerability can be reproduced by sending crafted data to the FastCGI IPC socket that includes manipulated nameLen or valueLen values. This can be done through a web application that uses FastCGI and is misconfigured to expose the FastCGI socket, or by exploiting another vulnerability, such as server-side request forgery, to send the malicious data.

Remediation

Users are advised to upgrade to FastCGI version 2.4.5, which addresses this vulnerability. Additionally, limiting remote access to the FastCGI socket by using UNIX sockets can help mitigate the risk.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
6.8
impact
2.5
exploitability
9.1
remediation
7.9
relevance
0.0
threat
6.4
urgency
2.9
incentive
10.0

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.