Description Preview
This CVE covers multiple PHP remote file inclusion weaknesses in DBImageGallery version 1.2.2. An attacker can cause arbitrary PHP code execution by supplying a URL in the donsimg_base_path parameter to various scripts located under admin/ (attributes.php, images.php, scan.php) or includes/ (attributes.php, db_utils.php, images.php, utils.php, values.php). The vulnerabilities enable remote inclusion of attacker-controlled PHP files, leading to remote code execution on the affected server. The issues were publicly disclosed in early 2007.
Overview
DBImageGallery 1.2.2 contains several PHP remote file inclusion flaws that permit an attacker to run arbitrary PHP code by passing a URL in the donsimg_base_path parameter to specific scripts in the admin/ and includes/ directories. The vulnerable scripts include admin/attributes.php, admin/images.php, admin/scan.php, as well as includes/attributes.php, includes/db_utils.php, includes/images.php, includes/utils.php, and includes/values.php. This class of vulnerability, remote file inclusion, can be exploited to execute attacker-supplied PHP on the server, potentially taking full control of the affected system.
Remediation
- Upgrade to the latest patched version of DBImageGallery that fixes the remote file inclusion vulnerabilities. If an official patch is not available, consider removing or disabling the affected functionality or migrating to a supported replacement.
- sanitize and validate all inputs used in file inclusion logic. Specifically, avoid using user-supplied URLs for including scripts; enforce strict whitelisting and reject remote paths for any include/require operations.
- Disable PHP features that enable remote file inclusion where not required, by setting in php.ini: allow_url_include = Off and, if possible, allow_url_fopen = Off or restrict its use to trusted contexts.
- Implement additional code hardening: resolve includes using explicit local paths, validate realpath of included files, and avoid constructing paths from untrusted input.
- Deploy a Web Application Firewall (WAF) or IDS/IPS rules to detect and block remote inclusion attempts targeting the affected parameters and scripts.
- Conduct a targeted security review and testing in a staging environment to verify that the remediation is effective and that legitimate functionality is preserved.
- If the project is no longer maintained or patches are unavailable, consider removing the vulnerable plugin/module or replacing it with a supported alternative.
References
- OSVDB 34944: http://osvdb.org/34944
- Exploit-DB 3353: https://www.exploit-db.com/exploits/3353
- ADV-2007-0692 (VUPEN): http://www.vupen.com/english/advisories/2007/0692
- OSVDB 34943: http://osvdb.org/34943
- OSVDB 34940: http://osvdb.org/34940
- 20070305 Re: Remote File Include In DBImageGallery: http://www.securityfocus.com/archive/1/462142/100/0/threaded
- OSVDB 34937: http://osvdb.org/34937
- BID 22657: http://www.securityfocus.com/bid/22657
- DBImageGallery - donsimg file include (32612): https://exchange.xforce.ibmcloud.com/vulnerabilities/32612
- 20070302 Remote File Include In DBImageGallery: http://www.securityfocus.com/archive/1/461741/100/0/threaded
- OSVDB 34942: http://osvdb.org/34942
- OSVDB 34938: http://osvdb.org/34938
- OSVDB 34939: http://osvdb.org/34939
- OSVDB 34941: http://osvdb.org/34941
Industry ExposureMost to leastThis section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
This section illustrates the prevalence of a specific Common Vulnerabilities and Exposures (CVE) across various industries based on customer reports. The ranking displays industries from the most to least affected by this particular vulnerability, offering valuable insight into where this CVE has been most frequently observed. This information can help organizations within these sectors prioritize their security efforts, understand their relative risk exposure compared to their peers, and focus remediation strategies where they are most needed. By understanding the industry-specific impact, organizations can make more informed decisions regarding patching, resource allocation, and overall risk management related to this CVE.
- Accommodation & Food ServicesAccommodation & Food Services: Low
- Administrative, Support, Waste Management & Remediation ServicesAdministrative, Support, Waste Management & Remediation Services: Low
- Agriculture, Forestry Fishing & HuntingAgriculture, Forestry Fishing & Hunting: Low
- Arts, Entertainment & RecreationArts, Entertainment & Recreation: Low
- ConstructionConstruction: Low
- Educational ServicesEducational Services: Low
- Finance and InsuranceFinance and Insurance: Low
- Health Care & Social AssistanceHealth Care & Social Assistance: Low
- InformationInformation: Low
- Management of Companies & EnterprisesManagement of Companies & Enterprises: Low
- ManufacturingManufacturing: Low
- MiningMining: Low
- Other Services (except Public Administration)Other Services (except Public Administration): Low
- Professional, Scientific, & Technical ServicesProfessional, Scientific, & Technical Services: Low
- Public AdministrationPublic Administration: Low
- Real Estate Rental & LeasingReal Estate Rental & Leasing: Low
- Retail TradeRetail Trade: Low
- Transportation & WarehousingTransportation & Warehousing: Low
- UtilitiesUtilities: Low
- Wholesale TradeWholesale Trade: Low

