LevelBlue Completes Acquisition of Cybereason. Learn more

LevelBlue Completes Acquisition of Cybereason. Learn more

Services
Cyber Advisory
Managed Cloud Security
Data Security
Manage Detection & Response
Email Security
Managed Network Infrastructure Security
Exposure Management
Security Operations Platforms
Incident Readiness & Response
SpiderLabs Threat Intelligence
Solutions
BY TOPIC
Offensive Security
Solutions to maximize your security ROI
Operational Technology
End-to-end OT security
Microsoft Security
Unlock the full power of Microsoft Security
Securing the IoT Landscape
Test, monitor and secure network objects
Why LevelBlue
About Us
Awards and Accolades
LevelBlue SpiderLabs
LevelBlue Security Operations Platforms
Security Colony
Partners
Microsoft
Unlock the full power of Microsoft Security
Technology Alliance Partners
Key alliances who align and support our ecosystem of security offerings

TWSL2012-002: Multiple Vulnerabilities in WordPress

Trustwave SpiderLabs has published a new advisory today for multiple vulnerabilities discovered in the WordPress 'setup-config.php' page. These include PHP code execution/persistent cross site scripting (XSS) vulnerabilities and a MySQL server username/password disclosure weakness. All of these vulnerabilities were discovered by Jonathan Claudius who is a member of the Trustwave SpiderLabs Research team.

The WordPress team has confirmed that an official fix will not be released for these issues based on that the the component in question is an installation script and the attack surface is too small to warrant a fix. We have received the following response from the vendor:

"We give priority to a better user experience at the install process. It is unlikely a user would go to the trouble of installing a copy of WordPress and then not finishing the setup process more-or-less immediately. The window of opportunity for exploiting such a vulnerability is very small."

However, Trustwave SpiderLabs urges caution in situations where the WordPress installation script is provided as part of a default image. This is often done as a convenience on hosting providers, even incases where the client does not use the software. It is a best practice to ensure that no installation scripts are exposed to outsiders, and these vulnerabilities reinforce the importance of this step.

For further protection, SpiderLabs has added rules to the commercial rules feed for ModSecurity to mitigate these issues and our TrustKeeper scanning solution is updated to detect exposed installation scripts. The following are the ModSecurity commercial rules developed to identify these malicious payloads:

PHP Code Execution and Persistent Cross Site Scripting Vulnerabilities via 'setup-config.php' page

SecRule REQUEST_FILENAME "@streq /wp-admin/setup-config.php" "chain,phase:2,t:none,log,block,id:'2100004',msg:'SLR: WordPress is being configured with a remote IP address for the Database.',logdata:'%{matched_var}',tag:'CVE-2011-4899'" SecRule ARGS_GET:step "@streq 2" "chain"  SecRule ARGS_POST:dbhost "^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$" "chain"   SecRule MATCHED_VAR "!@streq %{server_addr}"

PHP Code Execution and Persistent Cross Site Scripting Vulnerabilities via 'setup-config.php' page

SecRule REQUEST_FILENAME "@streq /wp-admin/setup-config.php" "chain,phase:2,t:none,log,block,id:'2100005',msg:'SLR: WordPress is being configured with a remote server name for the Database.',logdata:'%{matched_var}',tag:'SVE-2011-4899'" SecRule ARGS_GET:step "@streq 2" "chain"  SecRule ARGS_POST:dbhost ".*" "chain"   SecRule MATCHED_VAR "!@streq %{server_name}"

MySQL Server Username/Password Disclosure Vulnerability via 'setup-config.php' page

SecRule REQUEST_FILENAME "@streq /wp-admin/setup-config.php" "chain,phase:2,t:none,log,block,id:'2100006',msg:'SLR: Request is missing required parameters.',tag:'CVE-2011-4898'" SecRule ARGS_GET:step "@streq 2" "chain"  SecRule &ARGS_POST:dbhost|&ARGS_POST:dbname|&ARGS_POST:uname|&ARGS_POST:pwd|&ARGS_POST:prefix|&ARGS_POST:submit "!@eq 1" 

Multiple Cross Site Scripting Vulnerabilities in 'setup-config.php' page

SecRule REQUEST_FILENAME "@streq /wp-admin/setup-config.php" "chain,phase:2,t:none,log,block,id:'2100007',msg:'SLR: Multiple Cross Site Scripting Vulnerabilities in \'setup-config.php\' page',logdata:'%{matched_var}',tag:'CVE-2012-0782'"        SecRule ARGS_GET:step "@streq 2" "chain"                SecRule ARGS_POST:dbhost|ARGS_POST:dbname|ARGS_POST:uname "@pm < > \" ( ) : = ;" "ctl:auditLogParts=+E,multiMatch,t:none,t:htmlEntityDecode,t:jsDecode,t:cssDecode"

MySQL Server Username/Password Disclosure Vulnerability via 'setup-config.php' page

SecRule REQUEST_FILENAME "@streq /wp-admin/setup-config.php" "chain,phase:4,t:none,log,block,id:'2100008',msg:'SLR: MySQL Server Username/Password Disclosure Vulnerability via \'setup-config.php\' page.',tag:'CVE-2011-4898'"        SecRule ARGS_GET:step "@streq 2" "chain"                SecRule RESPONSE_BODY "We were able to connect to the database server \(which means your username and password is okay\) but not able to select the database|This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at"

We would also like to give a special thanks to Ryan Barnett for writing the ModSecurity commercial rules and the Research team for developing the detection rules for TrustKeeper.

 

ABOUT LEVELBLUE

LevelBlue is a globally recognized cybersecurity leader that reduces cyber risk and fortifies organizations against disruptive and damaging cyber threats. Our comprehensive offensive and defensive cybersecurity portfolio detects what others cannot, responds with greater speed and effectiveness, optimizes client investment, and improves security resilience. Learn more about us.

Latest Intelligence

Discover how our specialists can tailor a security program to fit the needs of
your organization.

Request a Demo