CVE-2003-0486
Description
SQL injection vulnerability in viewtopic.php for phpBB 2.0.5 and earlier allows remote attackers to steal password hashes via the topic_id parameter.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
2Patches
Vulnerability mechanics
Root cause
"The `viewtopic.php` script improperly sanitizes the `topic_id` parameter before using it in a SQL query."
Attack vector
An attacker can exploit this vulnerability by sending a crafted GET request to `viewtopic.php` with a modified `topic_id` parameter. This parameter is directly incorporated into a SQL query without sufficient sanitization, allowing for SQL injection. The attacker can then use a UNION-based SQL query to extract sensitive information, such as user password hashes, from the `phpbb_users` table [ref_id=1].
Affected code
The vulnerability resides in the `viewtopic.php` script, specifically in how the `topic_id` variable is handled. The script retrieves the `topic_id` from GET parameters and passes it directly into a SQL query without adequate sanitization, as shown in the provided exploit details [ref_id=1].
What the fix does
The advisory indicates that the fix involves modifying the `viewtopic.php` script to properly sanitize the `topic_id` parameter. While a specific patch diff is not provided, the general recommendation is to ensure that user-supplied input used in SQL queries is validated and escaped to prevent injection attacks [ref_id=1].
Preconditions
- inputThe `topic_id` parameter must be controllable by the attacker.
- networkThe attacker must be able to send HTTP requests to the vulnerable server.
Reproduction
The provided reference [ref_id=1] includes a Perl script that demonstrates how to exploit this vulnerability by sending crafted HTTP requests to extract password hashes. The script iterates through characters of the password hash, constructing a UNION query for each character position.
Generated on Jun 3, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- www.phpbb.com/phpBB/viewtopic.phpnvdPatchVendor Advisory
- www.securityfocus.com/bid/7979nvdExploitPatchVendor Advisory
- marc.infonvd
- exchange.xforce.ibmcloud.com/vulnerabilities/12366nvd
News mentions
0No linked articles in our index yet.