Vulnerabilities > CVE-2010-0404 - SQL Injection vulnerability in PHPgroupware

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
phpgroupware
CWE-89
nessus

Summary

Multiple SQL injection vulnerabilities in phpGroupWare (phpgw) before 0.9.16.016 allow remote attackers to execute arbitrary SQL commands via unspecified parameters to (1) class.sessions_db.inc.php, (2) class.translation_sql.inc.php, or (3) class.auth_sql.inc.php in phpgwapi/inc/.

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:

Nessus

NASL familyDebian Local Security Checks
NASL idDEBIAN_DSA-2046.NASL
descriptionSeveral remote vulnerabilities have been discovered in phpgroupware, a Web-based groupware system written in PHP. The Common Vulnerabilities and Exposures project identifies the following problems : - CVE-2010-0403 A local file inclusion vulnerability allows remote attackers to execute arbitrary PHP code and include arbitrary local files. - CVE-2010-0404 Multiple SQL injection vulnerabilities allows remote attackers to execute arbitrary SQL commands.
last seen2020-06-01
modified2020-06-02
plugin id46346
published2010-05-17
reporterThis script is Copyright (C) 2010-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/46346
titleDebian DSA-2046-1 : phpgroupware - several vulnerabilities

Seebug

bulletinFamilyexploit
descriptionBUGTRAQ ID: 40168 CVE ID: CVE-2010-0404 phpGroupWare是一个用PHP编写的多用户的网络组件,为开发其他程序提供了一个API。 phpGroupWare phpgwapi/inc/目录下的多个脚本没有正确的过滤用户所提交参数,远程攻击者可以通过提交恶意查询请求执行SQL注入攻击。 1) 没有正确地过滤提交给多个脚本的sessionid参数便在phpgwapi/inc/class.sessions_db.inc.php的SQL查询中使用。 2) 没有正确地过滤多个URL参数便在phpgwapi/inc/class.sessions_db.inc.php的SQL查询中使用。 3) 在更新偏好时没有正确的过滤提交给preferences/preferences.php的user[lang]参数便在phpgwapi/inc /class.translation_sql.inc.php的SQL查询中使用。 4) 在设置了sessionid和kp3的情况下,没有正确地过滤提交给preferences/preferences.php的appname参数便在 phpgwapi/inc/class.translation_sql.inc.php的SQL查询中使用。 5) 没有正确地过滤提交给login.php的login参数便在phpgwapi/inc/class.auth_sql.inc.php的SQL查询中使用。 PHPGroupWare < 0.9.16.016 厂商补丁: Debian ------ Debian已经为此发布了一个安全公告(DSA-2046-1)以及相应补丁: DSA-2046-1:phpgroupware: Multiple vulnerabilities 链接:http://www.debian.org/security/2010/dsa-2046 补丁下载: Source archives: http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware_0.9.16.012+dfsg.orig.tar.gz Size/MD5 checksum: 19383160 bbfcfa12aca69b4032d7b4d38aeba85f http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware_0.9.16.012+dfsg-8+lenny2.dsc Size/MD5 checksum: 1662 1a1ff2d6badf454ba2b948ee1268e57b http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware_0.9.16.012+dfsg-8+lenny2.diff.gz Size/MD5 checksum: 74293 9ba66bc79bc0f5bb6454a3372bc2bfd8 Architecture independent packages: http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-filemanager_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 91562 51f6a2473368c6c21d19b8fd6349635f http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-phpgwapi-doc_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 7985242 c19ed260050702c356c4d14db87e3f0d http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 20158 c09431d20a4d833841340ea79e03854d http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-setup_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 281402 2fc54aa2367098332f67b846b17d8c7a http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-core-base_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 48876 41cc095cbbc3bd97ae36754405df60b9 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-email_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 1167580 4b63e0460fb590082a29391d26331b1e http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-phpgwapi_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 1529004 52216c8fa04c49ebf2d5d12aa6a8013a http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 22522 783f747d25f32fe4024db807a0727261 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-core_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 4726 0a3140a4bdc80c8b421ef865c1f730d3 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-doc_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 130240 dc11591ae411a496bc5828d88eaed65d http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-todo_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 50810 b632b74158236fea55b5014830c26369 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-preferences_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 60432 8355e743ea535fbb8b5afef5bcb196bb http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-manual_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 93564 f44dbd8f6b2902d4980c4ec23d955d02 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-news-admin_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 41194 9ed410fd27d8e0c7430a90fa2eaabb70 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-calendar_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 270288 ffa447f1b07658090d9acdec93ef31a5 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-admin_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 188302 84057847fe79ad066a751a0b5f1abef7 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-addressbook_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 176400 0294b85b1e34e7879edbc4ee832dfa43 http://security.debian.org/pool/updates/main/p/phpgroupware/phpgroupware-0.9.16-notes_0.9.16.012+dfsg-8+lenny2_all.deb Size/MD5 checksum: 33074 95aff5b1efc3ba4eeb3a5756549ae070 补丁安装方法: 1. 手工安装补丁包: 首先,使用下面的命令来下载补丁软件: # wget url (url是补丁下载链接地址) 然后,使用下面的命令来安装补丁: # dpkg -i file.deb (file是相应的补丁名) 2. 使用apt-get自动安装补丁包: 首先,使用下面的命令更新内部数据库: # apt-get update 然后,使用下面的命令安装更新软件包: # apt-get upgrade PHPGroupWare ------------ 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://prdownloads.sourceforge.net/phpgroupware/phpgroupware-0.9.16.016.tar.bz2
idSSV:19667
last seen2017-11-19
modified2010-05-21
published2010-05-21
reporterRoot
titlePHPGroupWare <= 0.9.16.016 phpgwapi/inc/多个SQL注入漏洞