CVE-2008-0599

The init_request_info function in sapi/cgi/cgi_main.c in PHP before 5.2.6 does not properly consider operator precedence when calculating the length of…

published May 5, 2008

CVSS
—
EPSS
11%
Percentile
95.9
In the wild
Unconfirmed
What it is

⚠️ A crafty URI is all it takes to exploit this flaw! The init_request_info function in PHP before version 5.2.6 miscalculates PATH_TRANSLATED length, opening a door for remote attackers to execute arbitrary code. 🔥 Think of it like a restaurant order where the chef misreads the ticket due to a misplaced decimal — instead of a single steak, they whip up a banquet for anyone who walks in, creating chaos! An attacker could take advantage of this miscalculation and run any code they wish on the server, potentially leading to unauthorized access, data breaches, or even complete server takeover. It's like giving someone a master key to your entire restaurant!

Put simply

Think of it like a restaurant order where the chef misreads the ticket due to a misplaced decimal — instead of a single steak, they whip up a banquet for anyone who walks in, creating chaos! This vulnerability arises from the init_request_info function not properly handling operator precedence in PHP, allowing a crafted input URI to manipulate the length of the PATH_TRANSLATED variable, which could lead to arbitrary code execution.

What to do

An attacker could take advantage of this miscalculation and run any code they wish on the server, potentially leading to unauthorized access, data breaches, or even complete server takeover. It's like giving someone a master key to your entire restaurant! To secure your environment, upgrade PHP to version 5.2.6 or higher immediately. Additionally, review your current PHP configurations and ensure that any custom URIs are rigorously validated to avoid similar issues in the future. You've got this! Patch up and lock it down, and you'll keep your server safe and sound! 🛡️

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.10918 · 95.9th percentile
Published
2008-05-05T17:00Z
EPSS history
Timeline
  • 05 MAY 17:00Z
    The init_request_info function in sapi/cgi/cgi_main.c in PHP before 5.2.6 does not properly consider operator precedence when calculating the length of…
    cvelistv5