VYPR
Unrated severityNVD Advisory· Published Oct 23, 2005· Updated Jun 16, 2026

CVE-2005-3300

CVE-2005-3300

Description

The register_globals emulation layer in grab_globals.php for phpMyAdmin before 2.6.4-pl3 does not perform safety checks on values in the _FILES array for uploaded files, which allows remote attackers to include arbitrary files by using direct requests to library scripts that do not use grab_globals.php, then modifying certain configuration values for the theme.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Affected products

1

Patches

Vulnerability mechanics

Root cause

"Missing safety checks on the _FILES array during register_globals emulation allows overwriting configuration values, enabling arbitrary local file inclusion."

Attack vector

An attacker sends a crafted multipart/form-data request containing a file upload field whose name is `cfg`. Because the `_FILES` array is not protected against keys named `cfg`, the emulation layer overwrites `$cfg['ThemePath']` with an empty value and sets `$cfg['ThemeManager']` to a truthy value [ref_id=1]. The attacker also supplies a cookie (or other user-controlled input) that sets the global `theme` variable to an absolute path to a target file. When phpMyAdmin later executes `@include($cfg['ThemePath'].'/'.$GLOBALS['theme'].'/info.inc.php')`, the empty `ThemePath` prefix means the attacker-controlled absolute path is used directly, allowing inclusion of arbitrary local files [ref_id=1]. This can lead to remote code execution if the included file contains attacker-controlled content (e.g., log files).

Affected code

The vulnerability resides in `grab_globals.php`, which implements a register_globals emulation layer. When the `_FILES` array is merged into the global namespace, it lacks the safety checks applied to `_GET` and `_POST` variables. Additionally, files such as `db_details_db_info.php` include `libraries/common.lib.php` (which loads `$cfg`) before `grab_globals.php` is reached via `select_lang.lib.php`, allowing configuration values to be overwritten after they are set [ref_id=1].

What the fix does

The advisory recommends upgrading to phpMyAdmin 2.6.4-pl3 or later [ref_id=1]. No patch diff is included in the bundle, but the fix addresses the design flaw by ensuring that the `_FILES` array receives the same safety checks as `_GET` and `_POST` during the register_globals emulation, preventing overwrite of sensitive configuration keys like `cfg`. The vendor release resolves the inclusion ordering issue so that `grab_globals.php` is always included before configuration arrays are populated.

Preconditions

  • configphpMyAdmin version <= 2.6.4-pl2
  • configPHP register_globals must be off (the emulation layer is active)
  • networkAttacker must be able to send HTTP requests to the phpMyAdmin instance
  • configFor %00 truncation: magic_quotes_gpc must be off
  • configFor realpath() truncation: a malfunctional realpath() implementation (e.g., older OpenBSD)

Generated on May 26, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

15

News mentions

0

No linked articles in our index yet.