ID CVE-2019-7548
Summary SQLAlchemy 1.2.17 has SQL Injection when the group_by parameter can be controlled.
References
Vulnerable Configurations
  • cpe:2.3:a:sqlalchemy:sqlalchemy:1.2.17:*:*:*:*:*:*:*
    cpe:2.3:a:sqlalchemy:sqlalchemy:1.2.17:*:*:*:*:*:*:*
  • cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:8.0:*:*:*:*:*:*:*
  • cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
    cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
  • cpe:2.3:a:opensuse:backports_sle:15.0:-:*:*:*:*:*:*
    cpe:2.3:a:opensuse:backports_sle:15.0:-:*:*:*:*:*:*
  • cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*
    cpe:2.3:o:opensuse:leap:15.0:*:*:*:*:*:*:*
  • cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
    cpe:2.3:o:opensuse:leap:15.1:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:-:*:*:*
    cpe:2.3:o:redhat:enterprise_linux:8.0:*:*:*:-:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_eus:8.1:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:8.2:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_eus:8.2:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_eus:8.4:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_eus:8.4:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_server_aus:8.2:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_server_aus:8.2:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_server_aus:8.4:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_server_aus:8.4:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_server_tus:8.2:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_server_tus:8.2:*:*:*:*:*:*:*
  • cpe:2.3:o:redhat:enterprise_linux_server_tus:8.4:*:*:*:*:*:*:*
    cpe:2.3:o:redhat:enterprise_linux_server_tus:8.4:*:*:*:*:*:*:*
  • cpe:2.3:a:oracle:communications_operations_monitor:4.2:*:*:*:*:*:*:*
    cpe:2.3:a:oracle:communications_operations_monitor:4.2:*:*:*:*:*:*:*
  • cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:*
    cpe:2.3:a:oracle:communications_operations_monitor:4.3:*:*:*:*:*:*:*
CVSS
Base: 6.8 (as of 30-11-2021 - 19:52)
Impact:
Exploitability:
CWE CWE-89
CAPEC
  • Blind SQL Injection
    Blind SQL Injection results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. Blind SQL Injection is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the adversary constructs input strings that probe the target through simple Boolean SQL expressions. The adversary can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the adversary determines how and where the target is vulnerable to SQL Injection.
  • 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.
  • 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:
  • 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.
  • 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.
Access
VectorComplexityAuthentication
NETWORK MEDIUM NONE
Impact
ConfidentialityIntegrityAvailability
PARTIAL PARTIAL PARTIAL
cvss-vector via4 AV:N/AC:M/Au:N/C:P/I:P/A:P
redhat via4
advisories
  • bugzilla
    id 1678520
    title CVE-2019-7164 python-sqlalchemy: SQL Injection when the order_by parameter can be controlled
    oval
    OR
    • comment Red Hat Enterprise Linux must be installed
      oval oval:com.redhat.rhba:tst:20070304026
    • AND
      • comment Red Hat Enterprise Linux 8 is installed
        oval oval:com.redhat.rhba:tst:20193384074
      • comment Module python36:3.6 is enabled
        oval oval:com.redhat.rhsa:tst:20190984041
      • OR
        • AND
          • comment python-nose-docs is earlier than 0:1.3.7-30.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984001
          • comment python-nose-docs is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190981004
        • AND
          • comment python-pymongo-doc is earlier than 0:3.6.1-9.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984003
          • comment python-pymongo-doc is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984004
        • AND
          • comment python-sqlalchemy-doc is earlier than 0:1.3.2-1.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984005
          • comment python-sqlalchemy-doc is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190981008
        • AND
          • comment python-virtualenv-doc is earlier than 0:15.1.0-18.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984007
          • comment python-virtualenv-doc is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984008
        • AND
          • comment python3-PyMySQL is earlier than 0:0.8.0-10.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984009
          • comment python3-PyMySQL is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984010
        • AND
          • comment python3-bson is earlier than 0:3.6.1-9.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984011
          • comment python3-bson is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984012
        • AND
          • comment python3-docs is earlier than 0:3.6.7-2.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984013
          • comment python3-docs is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984014
        • AND
          • comment python3-docutils is earlier than 0:0.14-12.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984015
          • comment python3-docutils is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984016
        • AND
          • comment python3-nose is earlier than 0:1.3.7-30.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984017
          • comment python3-nose is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984018
        • AND
          • comment python3-pygments is earlier than 0:2.2.0-20.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984019
          • comment python3-pygments is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984020
        • AND
          • comment python3-pymongo is earlier than 0:3.6.1-9.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984021
          • comment python3-pymongo is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984022
        • AND
          • comment python3-pymongo-gridfs is earlier than 0:3.6.1-9.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984023
          • comment python3-pymongo-gridfs is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984024
        • AND
          • comment python3-scipy is earlier than 0:1.0.0-19.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984025
          • comment python3-scipy is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984026
        • AND
          • comment python3-sqlalchemy is earlier than 0:1.3.2-1.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984027
          • comment python3-sqlalchemy is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984028
        • AND
          • comment python3-virtualenv is earlier than 0:15.1.0-18.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984029
          • comment python3-virtualenv is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984030
        • AND
          • comment python3-wheel is earlier than 1:0.30.0-13.module+el8.0.0+2966+d39a1df3
            oval oval:com.redhat.rhsa:tst:20190984031
          • comment python3-wheel is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984032
        • AND
          • comment python36 is earlier than 0:3.6.8-2.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984033
          • comment python36 is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984034
        • AND
          • comment python36-debug is earlier than 0:3.6.8-2.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984035
          • comment python36-debug is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984036
        • AND
          • comment python36-devel is earlier than 0:3.6.8-2.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984037
          • comment python36-devel is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984038
        • AND
          • comment python36-rpm-macros is earlier than 0:3.6.8-2.module+el8.0.0+2975+e0f02136
            oval oval:com.redhat.rhsa:tst:20190984039
          • comment python36-rpm-macros is signed with Red Hat redhatrelease2 key
            oval oval:com.redhat.rhsa:tst:20190984040
    rhsa
    id RHSA-2019:0984
    released 2019-05-07
    severity Moderate
    title RHSA-2019:0984: python36:3.6 security update (Moderate)
  • rhsa
    id RHSA-2019:0981
rpms
  • babel-0:2.5.1-9.module+el8.0.0+2961+596d0223
  • python-nose-docs-0:1.3.7-30.module+el8.0.0+2961+596d0223
  • python-psycopg2-doc-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python-sqlalchemy-doc-0:1.3.2-1.module+el8.0.0+2974+76d21d2e
  • python2-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-Cython-0:0.28.1-7.module+el8.0.0+2961+596d0223
  • python2-Cython-debuginfo-0:0.28.1-7.module+el8.0.0+2961+596d0223
  • python2-PyMySQL-0:0.8.0-10.module+el8.0.0+2961+596d0223
  • python2-attrs-0:17.4.0-10.module+el8.0.0+2961+596d0223
  • python2-babel-0:2.5.1-9.module+el8.0.0+2961+596d0223
  • python2-backports-0:1.0-15.module+el8.0.0+2961+596d0223
  • python2-backports-ssl_match_hostname-0:3.5.0.1-11.module+el8.0.0+2961+596d0223
  • python2-bson-0:3.6.1-9.module+el8.0.0+2961+596d0223
  • python2-bson-debuginfo-0:3.6.1-9.module+el8.0.0+2961+596d0223
  • python2-chardet-0:3.0.4-10.module+el8.0.0+2961+596d0223
  • python2-coverage-0:4.5.1-4.module+el8.0.0+2961+596d0223
  • python2-coverage-debuginfo-0:4.5.1-4.module+el8.0.0+2961+596d0223
  • python2-debug-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-debuginfo-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-debugsource-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-devel-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-dns-0:1.15.0-9.module+el8.0.0+2961+596d0223
  • python2-docs-0:2.7.15-4.module+el8.0.0+2961+596d0223
  • python2-docs-info-0:2.7.15-4.module+el8.0.0+2961+596d0223
  • python2-docutils-0:0.14-12.module+el8.0.0+2961+596d0223
  • python2-funcsigs-0:1.0.2-13.module+el8.0.0+2961+596d0223
  • python2-idna-0:2.5-7.module+el8.0.0+2961+596d0223
  • python2-ipaddress-0:1.0.18-6.module+el8.0.0+2961+596d0223
  • python2-jinja2-0:2.10-8.module+el8.0.0+2961+596d0223
  • python2-libs-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-lxml-0:4.2.3-3.module+el8.0.0+2961+596d0223
  • python2-lxml-debuginfo-0:4.2.3-3.module+el8.0.0+2961+596d0223
  • python2-markupsafe-0:0.23-19.module+el8.0.0+2961+596d0223
  • python2-mock-0:2.0.0-13.module+el8.0.0+2961+596d0223
  • python2-nose-0:1.3.7-30.module+el8.0.0+2961+596d0223
  • python2-numpy-1:1.14.2-10.module+el8.0.0+2961+596d0223
  • python2-numpy-debuginfo-1:1.14.2-10.module+el8.0.0+2961+596d0223
  • python2-numpy-doc-1:1.14.2-10.module+el8.0.0+2961+596d0223
  • python2-numpy-f2py-1:1.14.2-10.module+el8.0.0+2961+596d0223
  • python2-pip-0:9.0.3-13.module+el8.0.0+2961+596d0223
  • python2-pluggy-0:0.6.0-8.module+el8.0.0+2961+596d0223
  • python2-psycopg2-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python2-psycopg2-debug-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python2-psycopg2-debug-debuginfo-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python2-psycopg2-debuginfo-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python2-psycopg2-tests-0:2.7.5-7.module+el8.0.0+2961+596d0223
  • python2-py-0:1.5.3-6.module+el8.0.0+2961+596d0223
  • python2-pygments-0:2.2.0-20.module+el8.0.0+2961+596d0223
  • python2-pymongo-0:3.6.1-9.module+el8.0.0+2961+596d0223
  • python2-pymongo-debuginfo-0:3.6.1-9.module+el8.0.0+2961+596d0223
  • python2-pymongo-gridfs-0:3.6.1-9.module+el8.0.0+2961+596d0223
  • python2-pysocks-0:1.6.8-6.module+el8.0.0+2961+596d0223
  • python2-pytest-0:3.4.2-13.module+el8.0.0+2961+596d0223
  • python2-pytest-mock-0:1.9.0-4.module+el8.0.0+2961+596d0223
  • python2-pytz-0:2017.2-12.module+el8.0.0+2961+596d0223
  • python2-pyyaml-0:3.12-16.module+el8.0.0+2961+596d0223
  • python2-pyyaml-debuginfo-0:3.12-16.module+el8.0.0+2961+596d0223
  • python2-requests-0:2.20.0-2.module+el8.0.0+2961+596d0223
  • python2-rpm-macros-0:3-38.module+el8.0.0+2961+596d0223
  • python2-scipy-0:1.0.0-19.module+el8.0.0+2961+596d0223
  • python2-scipy-debuginfo-0:1.0.0-19.module+el8.0.0+2961+596d0223
  • python2-setuptools-0:39.0.1-11.module+el8.0.0+2961+596d0223
  • python2-setuptools_scm-0:1.15.7-6.module+el8.0.0+2961+596d0223
  • python2-six-0:1.11.0-5.module+el8.0.0+2961+596d0223
  • python2-sqlalchemy-0:1.3.2-1.module+el8.0.0+2974+76d21d2e
  • python2-test-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-tkinter-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-tools-0:2.7.15-22.module+el8.0.0+2961+596d0223
  • python2-urllib3-0:1.23-7.module+el8.0.0+2961+596d0223
  • python2-virtualenv-0:15.1.0-18.module+el8.0.0+2961+596d0223
  • python2-wheel-1:0.30.0-13.module+el8.0.0+2961+596d0223
  • python-nose-docs-0:1.3.7-30.module+el8.0.0+2966+d39a1df3
  • python-pymongo-doc-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python-sqlalchemy-doc-0:1.3.2-1.module+el8.0.0+2975+e0f02136
  • python-virtualenv-doc-0:15.1.0-18.module+el8.0.0+2966+d39a1df3
  • python3-PyMySQL-0:0.8.0-10.module+el8.0.0+2966+d39a1df3
  • python3-bson-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python3-bson-debuginfo-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python3-docs-0:3.6.7-2.module+el8.0.0+2966+d39a1df3
  • python3-docutils-0:0.14-12.module+el8.0.0+2966+d39a1df3
  • python3-nose-0:1.3.7-30.module+el8.0.0+2966+d39a1df3
  • python3-pygments-0:2.2.0-20.module+el8.0.0+2966+d39a1df3
  • python3-pymongo-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python3-pymongo-debuginfo-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python3-pymongo-gridfs-0:3.6.1-9.module+el8.0.0+2966+d39a1df3
  • python3-scipy-0:1.0.0-19.module+el8.0.0+2966+d39a1df3
  • python3-scipy-debuginfo-0:1.0.0-19.module+el8.0.0+2966+d39a1df3
  • python3-sqlalchemy-0:1.3.2-1.module+el8.0.0+2975+e0f02136
  • python3-virtualenv-0:15.1.0-18.module+el8.0.0+2966+d39a1df3
  • python3-wheel-1:0.30.0-13.module+el8.0.0+2966+d39a1df3
  • python36-0:3.6.8-2.module+el8.0.0+2975+e0f02136
  • python36-debug-0:3.6.8-2.module+el8.0.0+2975+e0f02136
  • python36-devel-0:3.6.8-2.module+el8.0.0+2975+e0f02136
  • python36-rpm-macros-0:3.6.8-2.module+el8.0.0+2975+e0f02136
refmap via4
misc
mlist [debian-lts-announce] 20190318 [SECURITY] [DLA 1718-1] sqlalchemy security update
suse
  • openSUSE-SU-2019:2039
  • openSUSE-SU-2019:2064
  • openSUSE-SU-2019:2078
Last major update 30-11-2021 - 19:52
Published 06-02-2019 - 21:29
Last modified 30-11-2021 - 19:52
Back to Top