CVE-2008-5940: SQL Injection

Published Jan 22, 2009
·
Updated

SQL injection vulnerability in index.php in MODx 0.9.6.2 and earlier, when magicquotesgpc is disabled, allows remote attackers to execute arbitrary SQL commands via the searchid parameter. NOTE: some of these details are obtained from third party information.

Affected Software

7 affected components
Modxcms Modxcms=0.9.2.1
Modxcms Modxcms=0.9.0
Modxcms Modxcms=0.9.6
Modxcms Modxcms=0.9.1
Modxcms Modxcms<=0.9.6.2
Modxcms Modxcms=0.9.6.1
Modxcms Modxcms=0.9.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Enable magic_quotes_gpc by setting magic_quotes_gpc = On in your php.ini to ensure incoming GET/POST/COOKIE data is escaped; this mitigates the SQL injection in MODx index.php that occurs when magic_quotes_gpc is disabled.

    PHP (php.ini) magic_quotes_gpc = On
  2. Configuration

    Modify index.php to validate and sanitize the 'searchid' parameter before using it in SQL (for example, cast/force it to an integer or apply strict validation and use parameterized queries) to prevent SQL injection via the searchid parameter.

    MODx (index.php) searchid input handling = validate as integer / sanitize
  3. Compensating control

    Configure a web application firewall or request filtering to block or normalize requests containing malicious input in the 'searchid' parameter (for example, enforce numeric-only values for 'searchid' or block SQL metacharacters) to mitigate exploitation of the SQL injection vulnerability in MODx index.php.

Event History

Jan 22, 2009
CVE Published
via MITRE·11:00 AM
Data Sourced
via MITRE·11:00 AM
Description
Data Sourced
via NVD·11:30 AM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2008-5940?

CVE-2008-5940 is considered a high severity SQL injection vulnerability that can lead to arbitrary SQL command execution.

2

How do I fix CVE-2008-5940?

To fix CVE-2008-5940, update to MODx version 0.9.6.3 or later.

3

What versions of MODx are affected by CVE-2008-5940?

CVE-2008-5940 affects MODx versions 0.9.6.2 and earlier.

4

Can CVE-2008-5940 be exploited remotely?

Yes, CVE-2008-5940 can be exploited remotely by attackers via the searchid parameter.

5

Is magic_quotes_gpc related to CVE-2008-5940?

Yes, CVE-2008-5940 can be exploited when the magic_quotes_gpc feature is disabled.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203