Vulnerabilities > CVE-2012-0805 - SQL Injection vulnerability in Sqlalchemy
Attack vector
NETWORK Attack complexity
LOW Privileges required
NONE Confidentiality impact
PARTIAL Integrity impact
PARTIAL Availability impact
PARTIAL Summary
Multiple SQL injection vulnerabilities in SQLAlchemy before 0.7.0b4, as used in Keystone, allow remote attackers to execute arbitrary SQL commands via the (1) limit or (2) offset keyword to the select function, or unspecified vectors to the (3) select.limit or (4) select.offset function.
Vulnerable Configurations
Part | Description | Count |
---|---|---|
Application | 14 |
Common Weakness Enumeration (CWE)
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 family Fedora Local Security Checks NASL id FEDORA_2012-3414.NASL description - Fix the sqlalchemy0.5 backwards and forwards compat packages for a security problem with limit. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-04-02 plugin id 58543 published 2012-04-02 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58543 title Fedora 15 : python-sqlalchemy0.5-0.5.8-9.fc15 (2012-3414) NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-201209-16.NASL description The remote host is affected by the vulnerability described in GLSA-201209-16 (SQLAlchemy: SQL injection) SQLAlchemy does not properly sanitize input passed from the “limit” and “offset” keywords to the select() function before using it in an SQL query. Impact : A remote attacker could exploit this vulnerability to execute arbitrary SQL statements. Workaround : There is no known workaround at this time. last seen 2020-06-01 modified 2020-06-02 plugin id 62345 published 2012-09-27 reporter This script is Copyright (C) 2012-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/62345 title GLSA-201209-16 : SQLAlchemy: SQL injection NASL family Oracle Linux Local Security Checks NASL id ORACLELINUX_ELSA-2012-0369.NASL description From Red Hat Security Advisory 2012:0369 : An updated python-sqlalchemy package that fixes one security issue is now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. It was discovered that SQLAlchemy did not sanitize values for the limit and offset keywords for SQL select statements. If an application using SQLAlchemy accepted values for these keywords, and did not filter or sanitize them before passing them to SQLAlchemy, it could allow an attacker to perform a SQL injection attack against the application. (CVE-2012-0805) All users of python-sqlalchemy are advised to upgrade to this updated package, which contains a patch to correct this issue. All running applications using SQLAlchemy must be restarted for this update to take effect. last seen 2020-06-01 modified 2020-06-02 plugin id 68492 published 2013-07-12 reporter This script is Copyright (C) 2013-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/68492 title Oracle Linux 6 : python-sqlalchemy (ELSA-2012-0369) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2012-0369.NASL description An updated python-sqlalchemy package that fixes one security issue is now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. It was discovered that SQLAlchemy did not sanitize values for the limit and offset keywords for SQL select statements. If an application using SQLAlchemy accepted values for these keywords, and did not filter or sanitize them before passing them to SQLAlchemy, it could allow an attacker to perform a SQL injection attack against the application. (CVE-2012-0805) All users of python-sqlalchemy are advised to upgrade to this updated package, which contains a patch to correct this issue. All running applications using SQLAlchemy must be restarted for this update to take effect. last seen 2020-04-16 modified 2012-03-08 plugin id 58284 published 2012-03-08 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58284 title RHEL 6 : python-sqlalchemy (RHSA-2012:0369) NASL family Scientific Linux Local Security Checks NASL id SL_20120307_PYTHON_SQLALCHEMY_ON_SL6.NASL description SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. It was discovered that SQLAlchemy did not sanitize values for the limit and offset keywords for SQL select statements. If an application using SQLAlchemy accepted values for these keywords, and did not filter or sanitize them before passing them to SQLAlchemy, it could allow an attacker to perform a SQL injection attack against the application. (CVE-2012-0805) All users of python-sqlalchemy are advised to upgrade to this updated package, which contains a patch to correct this issue. All running applications using SQLAlchemy must be restarted for this update to take effect. last seen 2020-03-18 modified 2012-08-01 plugin id 61278 published 2012-08-01 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/61278 title Scientific Linux Security Update : python-sqlalchemy on SL6.x (20120307) NASL family Fedora Local Security Checks NASL id FEDORA_2012-3412.NASL description - Fix the sqlalchemy0.5 backwards and forwards compat packages for a security problem with limit. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-04-02 plugin id 58542 published 2012-04-02 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58542 title Fedora 16 : python-sqlalchemy0.5-0.5.8-9.fc16 (2012-3412) NASL family Fedora Local Security Checks NASL id FEDORA_2012-3373.NASL description - Fix the sqlalchemy0.5 backwards and forwards compat packages for a security problem with limit. Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues. last seen 2020-03-17 modified 2012-04-12 plugin id 58687 published 2012-04-12 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58687 title Fedora 17 : python-sqlalchemy0.5-0.5.8-9.fc17 (2012-3373) NASL family Mandriva Local Security Checks NASL id MANDRIVA_MDVSA-2012-059.NASL description It was discovered that SQLAlchemy did not sanitize values for the limit and offset keywords for SQL select statements. If an application using SQLAlchemy accepted values for these keywords, and did not filter or sanitize them before passing them to SQLAlchemy, it could allow an attacker to perform a SQL injection attack against the application (CVE-2012-0805). The updated packages have been patched to correct this issue. last seen 2020-06-01 modified 2020-06-02 plugin id 61949 published 2012-09-06 reporter This script is Copyright (C) 2012-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/61949 title Mandriva Linux Security Advisory : python-sqlalchemy (MDVSA-2012:059) NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2012-0369.NASL description An updated python-sqlalchemy package that fixes one security issue is now available for Red Hat Enterprise Linux 6. The Red Hat Security Response Team has rated this update as having moderate security impact. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available from the CVE link in the References section. SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. It was discovered that SQLAlchemy did not sanitize values for the limit and offset keywords for SQL select statements. If an application using SQLAlchemy accepted values for these keywords, and did not filter or sanitize them before passing them to SQLAlchemy, it could allow an attacker to perform a SQL injection attack against the application. (CVE-2012-0805) All users of python-sqlalchemy are advised to upgrade to this updated package, which contains a patch to correct this issue. All running applications using SQLAlchemy must be restarted for this update to take effect. last seen 2020-06-01 modified 2020-06-02 plugin id 58276 published 2012-03-08 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58276 title CentOS 6 : python-sqlalchemy (CESA-2012:0369) NASL family Debian Local Security Checks NASL id DEBIAN_DSA-2449.NASL description It was discovered that SQLAlchemy, a SQL toolkit and object relational mapper for Python, is not sanitizing input passed to the limit/offset keywords to select() as well as the value passed to select.limit()/offset(). This allows an attacker to perform SQL injection attacks against applications using SQLAlchemy that do not implement their own filtering. last seen 2020-03-17 modified 2012-04-13 plugin id 58728 published 2012-04-13 reporter This script is Copyright (C) 2012-2020 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/58728 title Debian DSA-2449-1 : sqlalchemy - missing input sanitization
Redhat
advisories |
| ||||||||||||||||||||||||||||||||||||||
rpms | python-sqlalchemy-0:0.5.5-3.el6_2 |
Seebug
bulletinFamily | exploit |
description | Bugtraq ID: 52330 CVE ID: CVE-2012-0805 SQLAlchemy是一个Python的SQL工具包以及数据库对象映射框架 通过"limit"和"offset"关键词传递给"select()"函数的输入在用于SQL查询之前缺少过滤,攻击者可以利用漏洞进行SQL注入攻击,可获得敏感信息或操作数据库 0 SQLAlchemy 0.7.0 SQLAlchemy 0.6.8 SQLAlchemy 0.6.7 厂商解决方案 SQLAlchemy 0.7.0b已经修复此漏洞,建议用户下载使用: http://www.sqlalchemy.org/ |
id | SSV:30184 |
last seen | 2017-11-19 |
modified | 2012-03-10 |
published | 2012-03-10 |
reporter | Root |
title | SQLAlchemy 'limit'和'offset'参数SQL注入漏洞 |
References
- http://rhn.redhat.com/errata/RHSA-2012-0369.html
- http://secunia.com/advisories/48327
- http://secunia.com/advisories/48328
- http://secunia.com/advisories/48771
- http://www.debian.org/security/2012/dsa-2449
- http://www.mandriva.com/security/advisories?name=MDVSA-2012:059
- http://www.sqlalchemy.org/changelog/CHANGES_0_7_0
- http://www.sqlalchemy.org/trac/changeset/852b6a1a87e7/
- https://bugs.launchpad.net/keystone/+bug/918608
- https://exchange.xforce.ibmcloud.com/vulnerabilities/73756