Vulnerabilities > CVE-2009-3703 - SQL Injection vulnerability in Fahlstad Wp-Forum

047910
CVSS 0.0 - NONE
Attack vector
UNKNOWN
Attack complexity
UNKNOWN
Privileges required
UNKNOWN
Confidentiality impact
UNKNOWN
Integrity impact
UNKNOWN
Availability impact
UNKNOWN
fahlstad
CWE-89
exploit available

Summary

Multiple SQL injection vulnerabilities in the WP-Forum plugin before 2.4 for WordPress allow remote attackers to execute arbitrary SQL commands via (1) the search_max parameter in a search action to the default URI, related to wpf.class.php; (2) the forum parameter to an unspecified component, related to wpf.class.php; (3) the topic parameter in a viewforum action to the default URI, related to the remove_topic function in wpf.class.php; or the id parameter in a (4) editpost or (5) viewtopic action to the default URI, related to wpf-post.php.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.
  • Object Relational Mapping Injection
    An attacker leverages a weakness present in the database access layer code generated with an Object Relational Mapping (ORM) tool or a weakness in the way that a developer used a persistence framework to inject his or her own SQL commands to be executed against the underlying database. The attack here is similar to plain SQL injection, except that the application does not use JDBC to directly talk to the database, but instead it uses a data access layer generated by an ORM tool or framework (e.g. Hibernate). While most of the time code generated by an ORM tool contains safe access methods that are immune to SQL injection, sometimes either due to some weakness in the generated code or due to the fact that the developer failed to use the generated access methods properly, SQL injection is still possible.
  • SQL Injection through SOAP Parameter Tampering
    An attacker modifies the parameters of the SOAP message that is sent from the service consumer to the service provider to initiate a SQL injection attack. On the service provider side, the SOAP message is parsed and parameters are not properly validated before being used to access a database in a way that does not use parameter binding, thus enabling the attacker to control the structure of the executed SQL query. This pattern describes a SQL injection attack with the delivery mechanism being a SOAP message.
  • Expanding Control over the Operating System from the Database
    An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dropping into a command shell, creating user defined functions that can call system level libraries present on the host machine, stored procedures, etc.
  • SQL Injection
    This attack exploits target software that constructs SQL statements based on user input. An attacker crafts input strings so that when the target software constructs SQL statements based on the input, the resulting SQL statement performs actions other than those the application intended. SQL Injection results from failure of the application to appropriately validate input. When specially crafted user-controlled input consisting of SQL syntax is used without proper validation as part of SQL queries, it is possible to glean information from the database in ways not envisaged during application design. Depending upon the database and the design of the application, it may also be possible to leverage injection to have the database execute system-related commands of the attackers' choice. SQL Injection enables an attacker to talk directly to the database, thus bypassing the application completely. Successful injection can cause information disclosure as well as ability to add or modify data in the database. In order to successfully inject SQL and retrieve information from a database, an attacker:

Exploit-Db

descriptionWP-Forum. CVE-2009-3703. Webapps exploit for php platform
idEDB-ID:10488
last seen2016-02-01
modified2009-12-16
published2009-12-16
reporterJuan Galiana Lara
sourcehttps://www.exploit-db.com/download/10488/
titleWP-Forum <= 2.3 - SQL Injection & Blind SQL Injection vulnerabilities

Packetstorm

data sourcehttps://packetstormsecurity.com/files/download/83915/wpforum23-sql.txt
idPACKETSTORM:83915
last seen2016-12-05
published2009-12-16
reporterJuan Galiana Lara
sourcehttps://packetstormsecurity.com/files/83915/WP-Forum-2.3-SQL-Injection.html
titleWP-Forum 2.3 SQL Injection

Seebug

  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:15104
    last seen2017-11-19
    modified2009-12-17
    published2009-12-17
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-15104
    titleWP-Forum &lt;= 2.3 SQL Injection
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:18553
    last seen2017-11-19
    modified2009-12-16
    published2009-12-16
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-18553
    titleWP-Forum &lt;= 2.3 SQL Injection &amp; Blind SQL Injection vulnerabilities
  • bulletinFamilyexploit
    descriptionBUGTRAQ ID: 37357 CVE ID: CVE-2009-3703 WP-Forum是一款基于PHP的WordPress插件。 WP-Forum的wpf.class.php页面没有正确地过滤用户所提交的forum、topic和search_max参数,以及在 editpost或viewtopic操作中所提交的id参数,远程攻击者可以通过提交恶意参数请求执行SQL注入攻击。以下是有漏洞的代码段: wpf.class文件 1836 $option_max_days = $_POST['search_max']; // &lt;- this line is not being sanitized 1837 $option_forums = $_POST['forum']; 1838 if(!$option_max_days) 1839 $option_max_days = 9999; 1840 $op .= &quot; AND $this-&gt;t_posts.`date` &gt; SUBDATE(CURDATE(), INTERVAL $option_max_days DAY) &quot;; 1841 ... 1850 foreach((array)$option_forums as $f) 1851 $a .= $f.&quot;,&quot;; // &lt;- &lt;- this lines is not being sanitized 1852 1853 $a = substr($a, 0, strlen($a)-1 ); 1854 if(!$a) 1855 $w = &quot;&quot;; 1856 else 1857 $w = &quot;IN($a)&quot;; 1858 1859 $sql = &quot;SELECT $this-&gt;t_threads.parent_id as pt, $this-&gt;t_posts.id, text, $this-&gt;t_posts.subject, $this-&gt;t_posts.parent_id, $this-&gt;t_posts.`date`, MATCH ($what) AGAINST ('$search_string') AS score 1860 FROM $this-&gt;t_posts inner join $this-&gt;t_threads on $this-&gt;t_posts.parent_id = $this-&gt;t_threads.id 1861 WHERE $this-&gt;t_threads.parent_id $w 1862 AND MATCH (text) AGAINST ('$search_string') $op&quot;; 在wpf-post.php文件中: 57 $id = $_GET['id']; // &lt;- $_GET['id'] is directly assigned 58 $thread = $this-&gt;check_parms($_GET['t']); 59 60 $out .= $this-&gt;header(); 61 62 $post = $wpdb-&gt;get_row(&quot;SELECT * FROM $wpforum-&gt;t_posts WHERE id = $id&quot;); // &lt;- id is used without clean up 其他示例: 1490 function remove_post(){ 1491 global $user_level, $user_ID, $wpdb; 1492 $id = $_GET['id']; // &lt;- $_GET['id'] is directly assigned 1493 $author = $wpdb-&gt;get_var(&quot;SELECT author_id from $this-&gt;t_posts where id = $id&quot;); // id is used without clean up ... 1503 if($del == &quot;ok&quot;){ 1504 $wpdb-&gt;query(&quot;DELETE FROM $this-&gt;t_posts WHERE id = $id&quot;); &lt;- // id is used without clean up 1505 $this-&gt;o .= &quot;&lt;div class='updated'&gt;&quot;.__(&quot;Post deleted&quot;, &quot;wpforum&quot;).&quot;&lt;/div&gt;&quot;; 1506 } 1507 else 1508 wp_die(__(&quot;Cheating, are we?&quot;, &quot;wpforum&quot;)); 1509 1510 } 此外由于没有正确的过滤$_GET['topic'],还可以清除$this-&gt;t_posts和$this-&gt;t_threads表格中的所有记录: 1479 function remove_topic(){ 1480 global $user_level, $user_ID, $wpdb; 1481 $topic = $_GET['topic']; 1482 if($this-&gt;is_moderator($user_ID, $this-&gt;current_forum)){ 1483 $wpdb-&gt;query(&quot;DELETE FROM $this-&gt;t_posts WHERE parent_id = $topic&quot;); 1484 $wpdb-&gt;query(&quot;DELETE FROM $this-&gt;t_threads WHERE id = $topic&quot;); 1485 } 1486 else 1487 wp_die(__(&quot;Cheating, are we?&quot;, &quot;wpforum&quot;)); 1488 1489 } Fredrik Fahlstad WP-Forum &lt;= 2.3 厂商补丁: Fredrik Fahlstad ---------------- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://www.fahlstad.se/wp-plugins/wp-forum/
    idSSV:15131
    last seen2017-11-19
    modified2009-12-23
    published2009-12-23
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-15131
    titleWordPress WP-Forum插件多个SQL注入漏洞
  • bulletinFamilyexploit
    descriptionNo description provided by source.
    idSSV:67199
    last seen2017-11-19
    modified2014-07-01
    published2014-07-01
    reporterRoot
    sourcehttps://www.seebug.org/vuldb/ssvid-67199
    titleWP-Forum <= 2.3 - SQL Injection & Blind SQL Injection vulnerabilities