CVE-2005-2556 in Mantisinfo

Summary

by MITRE

core/database_api.php in Mantis 0.19.0a1 through 1.0.0a3, with register_globals enabled, allows remote attackers to connect to internal databases by modifying the g_db_type variable and monitoring the speed of responses, as identified by bug#0005956.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 06/08/2019

The vulnerability described in CVE-2005-2556 represents a critical security flaw in the Mantis bug tracking system version 0.19.0a1 through 1.0.0a3. This issue specifically targets the core/database_api.php file and exploits a dangerous configuration weakness that occurs when the PHP register_globals directive is enabled. The vulnerability enables remote attackers to bypass normal database connection mechanisms and directly access internal database systems through a sophisticated timing-based attack vector.

The technical implementation of this vulnerability relies on the manipulation of the g_db_type variable through user-controllable input parameters. When register_globals is enabled, PHP automatically creates global variables from request data, including GET and POST parameters. Attackers can exploit this behavior by crafting malicious requests that modify the g_db_type variable to point to internal database connections rather than the intended external ones. The attack methodology involves monitoring response times to determine successful database connections, leveraging timing differences between valid and invalid database access attempts to infer the presence of internal database systems.

This vulnerability falls under CWE-200 - Information Exposure and CWE-94 - Improper Control of Generation of Code, as it allows unauthorized access to internal systems through improper input validation and variable manipulation. The operational impact is severe as it enables attackers to potentially access sensitive database information, perform unauthorized queries, and potentially execute malicious operations against internal database systems. The timing-based reconnaissance technique used in this attack aligns with ATT&CK technique T1046 - Network Service Scanning and T1071.004 - Application Layer Protocol: DNS, as attackers can map internal network resources through response time analysis.

The vulnerability's exploitation requires the specific combination of Mantis versions mentioned and the presence of register_globals enabled on the web server. This configuration weakness represents a fundamental security misconfiguration that has been largely deprecated in modern PHP versions due to its inherent dangers. The attack demonstrates how legacy PHP configurations can create dangerous attack surfaces that allow remote adversaries to bypass normal network segmentation and access internal systems. Organizations using vulnerable versions of Mantis should immediately implement mitigations including disabling register_globals, upgrading to patched versions, and implementing proper input validation and parameter sanitization measures to prevent similar exploitation vectors.

The broader implications of this vulnerability highlight the importance of proper input validation and the dangers of legacy PHP configurations. Modern security practices emphasize the principle of least privilege and proper parameter handling, which would have prevented this vulnerability from being exploitable. The timing-based attack methodology also demonstrates how seemingly innocuous response differences can leak critical information about internal system configurations. This vulnerability serves as a historical example of how insecure default configurations and inadequate input validation can create severe security risks that persist across multiple versions of vulnerable software.

Reservation

08/16/2005

Disclosure

08/24/2005

Moderation

accepted

Entry

VDB-26147

CPE

ready

EPSS

0.01625

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!