VYPR
Unrated severityNVD Advisory· Published Nov 1, 2005· Updated Jun 16, 2026

CVE-2005-3415

CVE-2005-3415

Description

phpBB 2.0.17 and earlier allows remote attackers to bypass protection mechanisms that deregister global variables by setting both a GET/POST/COOKIE (GPC) variable and a GLOBALS[] variable with the same name, which causes phpBB to unset the GLOBALS[] variable but not the GPC variable.

AI Insight

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

Affected products

28
  • PhpBB/phpBB28 versions
    cpe:2.3:a:phpbb_group:phpbb:2.0.0:*:*:*:*:*:*:*+ 27 more
    • cpe:2.3:a:phpbb_group:phpbb:2.0.0:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.1:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.10:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.11:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.12:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.13:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.14:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.15:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.16:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.17:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.2:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.3:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.4:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.5:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.6:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.6c:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.6d:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.7:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.7a:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.8:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.8a:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0.9:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0_beta1:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0_rc1:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0_rc2:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0_rc3:*:*:*:*:*:*:*
    • cpe:2.3:a:phpbb_group:phpbb:2.0_rc4:*:*:*:*:*:*:*
    • (no CPE)range: <=2.0.17

Patches

Vulnerability mechanics

Root cause

"The globals deregistration loop unsets `$GLOBALS` instead of the attacker-controlled variable when a `GLOBALS[]` parameter is supplied, leaving the GPC variable registered as a global."

Attack vector

An attacker can bypass the globals deregistration protection by supplying both a normal GPC variable (e.g., `foobar`) and a `GLOBALS[]` variable (e.g., `GLOBALS[foobar]`) in the same request. When phpBB's deregistration code iterates over the merged input, it encounters the key `GLOBALS` and attempts to unset `$GLOBALS` instead of `$foobar`, leaving the attacker's GPC variable `$foobar` intact as a global [ref_id=1]. This allows the attacker to control uninitialized variables in scripts such as `usercp_register.php`, `login.php`, and `search.php`, leading to XSS, SQL injection, or remote code execution via `preg_replace()` with an injected `e` modifier [ref_id=1].

Affected code

The vulnerability lies in phpBB's global variable deregistration code, which uses `array_merge()` on `$HTTP_GET_VARS`, `$HTTP_POST_VARS`, `$HTTP_COOKIE_VARS`, and other superglobal arrays, then unsets each variable found in the merged result. The code is present in phpBB 2.0.17 and earlier [ref_id=1].

What the fix does

The advisory recommends upgrading to the new phpBB release, which the vendor published on 30 October 2005 [ref_id=1]. No patch diff is included in the bundle. The fix addresses the three bypass methods: the `GLOBALS[]` variable trick (bypass [1]), the ability to set `HTTP_SESSION_VARS` to a non-array to break `array_merge()` (bypass [2]), and the failure when `register_long_arrays` is off (bypass [3]) [ref_id=1]. Additionally, the vendor corrected the uninitialized variables in `usercp_register.php`, `login.php`, and `search.php` that could be exploited once the globals protection was bypassed [ref_id=1].

Preconditions

  • configphpBB 2.0.17 or earlier must be installed
  • configPHP's register_globals directive must be enabled
  • networkAttacker must be able to send HTTP GET, POST, or COOKIE parameters

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

References

10

News mentions

0

No linked articles in our index yet.