CVE-2005-4461
Description
SQL injection vulnerability in index.php in Beehive Forum 0.6.2 and earlier allows remote attackers to execute arbitrary SQL commands via the user_sess parameter.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1- Range: <=0.6.2
Patches
Vulnerability mechanics
Root cause
"Unsanitized user input supplied via the `user_sess` parameter overrides the `$user_sess` variable when `register_globals` is enabled, leading to SQL injection."
Attack vector
An unauthenticated remote attacker sends an HTTP GET request to `index.php` with a malicious `user_sess` parameter, e.g., `http://example.com/beehive/index.php?user_sess=k`. When PHP's `register_globals` is enabled, this overrides the `$user_sess` variable that was set by `bh_session_check()`. The unsanitized value is then interpolated into a SQL query, allowing arbitrary SQL commands to be executed [ref_id=1]. No authentication is required and the attack complexity is low [ref_id=1].
Affected code
The vulnerability is in `index.php` of Beehive Forum 0.6.2 and earlier. The `$user_sess` variable is set via `bh_session_check(false)` but when `register_globals` is enabled, an attacker can override it by supplying `user_sess` as a query parameter. The unsanitized value is then used directly in a SQL query, as shown in the error message: `USER_FORUM.UID = k` where `k` is the injected value [ref_id=1].
What the fix does
No vendor-supplied patch was available at the time of disclosure [ref_id=1]. The advisory recommends that users disable `register_globals` in PHP configuration as a mitigation, since the vulnerability is only exploitable when that setting is enabled. A proper fix would involve initializing `$user_sess` before any user input can override it, or using input validation/sanitization on the parameter before it is used in SQL queries.
Preconditions
- configPHP register_globals must be enabled on the server
- authNo authentication required
- networkAttacker must be able to send HTTP GET requests to the server
- inputAttacker supplies the user_sess parameter in the query string
Reproduction
Visit `http://example.com/beehive/index.php?user_sess=k` with a browser. The server will return an SQL error indicating the injected value `k` was used in the query clause `USER_FORUM.UID = k` [ref_id=1]. For SQL injection, replace `k` with a crafted SQL payload such as `1+MYFORUM` or a UNION-based injection [ref_id=1].
Generated on Jun 17, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6News mentions
0No linked articles in our index yet.