cve.bz

CVE-2019-7164 SQL Injection

9.8 criticalExploit referenceEPSS 3.5%Fix available

Critical (9.8). EPSS 3.5% estimated probability of exploitation activity in the next 30 days. Fixed in sqlalchemy 1.3.0b3.

On this page
SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.

Severity

CVSS 3.1

9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.5% (unchanged from 3.5% a week ago; 3.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 89th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2019-7164 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2019-7164?via=ask-ai-copy and https://cve.bz/cve/CVE-2019-7164?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2019-7164 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
sqlalchemy:sqlalchemythrough 1.2.17
sqlalchemy:sqlalchemy1.3.0:beta1
sqlalchemy:sqlalchemy1.3.0:beta2
debian:debian_linux8.0
debian:debian_linux9.0
opensuse:backports_sle15.0
opensuse:leap15.0
opensuse:leap15.1
redhat:enterprise_linux8.0
redhat:enterprise_linux_eus8.1
redhat:enterprise_linux_eus8.2
redhat:enterprise_linux_eus8.4
redhat:enterprise_linux_server_aus8.2
redhat:enterprise_linux_server_aus8.4
redhat:enterprise_linux_server_tus8.2
redhat:enterprise_linux_server_tus8.4
oracle:communications_operations_monitor4.2
oracle:communications_operations_monitor4.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-887w-45rq-vxgfPyPIsqlalchemy<1.3.0b31.3.0b3
PYSEC-2019-123PyPIsqlalchemy<1.3.0b31.3.0b3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian8sqlalchemy0.9.8+dfsg-0.1+deb8u1DLA-1718-1
Debian9sqlalchemy1.0.15+ds1-1+deb9u1DLA-2811-1
Debian12, 13, 14sqlalchemy1.2.18+ds1-2DEBIAN-CVE-2019-7164
Ubuntu16.04:LTS, 18.04:LTSsqlalchemyno fix listedUBUNTU-CVE-2019-7164
Red Hatenterprise_linux:8::appstreamCython, python2-Cython, python2-Cython-debuginfo0:0.28.1-7.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreamPyYAML, python2-pyyaml, python2-pyyaml-debuginfo0:3.12-16.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreambabel, python2-babel0:2.5.1-9.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreamnumpy, python2-numpy, python2-numpy-doc and 2 more1:1.14.2-10.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampytest, python2-pytest0:3.4.2-13.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python2-PyMySQL0:0.8.0-10.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python3-PyMySQL0:0.8.0-10.module+el8.0.0+2966+d39a1df3RHSA-2019:0984
Red Hatenterprise_linux:8::appstreampython-attrs, python2-attrs0:17.4.0-10.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-backports, python2-backports0:1.0-15.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-backports-ssl_match_hostname, python2-backports-ssl_match_hostname0:3.5.0.1-11.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-chardet, python2-chardet0:3.0.4-10.module+el8.0.0+2961+596d0223RHSA-2019:0981
Red Hatenterprise_linux:8::appstreampython-coverage, python2-coverage, python2-coverage-debuginfo0:4.5.1-4.module+el8.0.0+2961+596d0223RHSA-2019:0981
41 more for Red Hat in the JSON and on Red Hat's page.
SUSEEnterprise Storage 4, OpenStack Cloud 7python-SQLAlchemy1.0.14-4.3.1SUSE-SU-2019:2350-1
SUSEHPE Helion OpenStack 8, OpenStack Cloud 8, OpenStack Cloud Crowbar 8python-SQLAlchemy1.1.12-3.5.1SUSE-SU-2019:2261-1
SUSELinux Enterprise Module for Basesystem 15 SP1python-SQLAlchemy1.2.14-6.3.1SUSE-SU-2019:2253-1
SUSELinux Enterprise Module for Package Hub 15 SP1python-SQLAlchemy1.2.14-6.3.1SUSE-SU-2019:2253-2
SUSEOpenStack Cloud 9ardana-ansible9.0+git.1566374020.301191f-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-barbican9.0+git.1566251498.be02ca4-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-cinder9.0+git.1565678764.c3a9b9f-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-cluster9.0+git.1559333871.40508f7-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-cobbler9.0+git.1566336494.93967dd-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-db9.0+git.1564409964.b7e4fc3-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-designate9.0+git.1565680593.df7a432-3.7.2SUSE-SU-2019:2267-1
SUSEOpenStack Cloud 9ardana-extensions-nsx9.0+git.1566213657.69862ab-8.1SUSE-SU-2019:2267-1
77 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.0python-SQLAlchemy1.2.7-lp150.2.3.1openSUSE-SU-2019:2039-1
openSUSELeap 15.1python-SQLAlchemy1.2.14-lp151.2.3.1openSUSE-SU-2019:2064-1
openSUSETumbleweedpython-SQLAlchemy1.4.22-1.2openSUSE-SU-2024:11211-1
openSUSETumbleweedpython-SQLAlchemy1.4.46-2.1openSUSE-SU-2024:12915-1
AlmaLinux8python2-Cython0.28.1-7.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-PyMySQL0.8.0-10.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-attrs17.4.0-10.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-chardet3.0.4-10.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-coverage4.5.1-4.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-docutils0.14-12.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-funcsigs1.0.2-13.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-idna2.5-7.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-ipaddress1.0.18-6.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-markupsafe0.23-19.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-mock2.0.0-13.module_el8.6.0+2781+fed64c13ALSA-2019:0981
AlmaLinux8python2-pluggy0.6.0-8.module_el8.6.0+2781+fed64c13ALSA-2019:0981
13 more for AlmaLinux in the JSON.
Rocky Linux8Cython0:0.28.1-7.module+el8.4.0+403+9ae17a31RLSA-2019:0981
Rocky Linux8Cython0:0.28.1-7.module+el8.5.0+706+735ec4b3RLSA-2019:0981
Rocky Linux8PyYAML0:3.12-16.module+el8.4.0+403+9ae17a31RLSA-2019:0981
Rocky Linux8PyYAML0:3.12-16.module+el8.5.0+706+735ec4b3RLSA-2019:0981
Rocky Linux8babel0:2.5.1-9.module+el8.4.0+403+9ae17a31RLSA-2019:0981
Rocky Linux8pytest0:3.4.2-13.module+el8.4.0+403+9ae17a31RLSA-2019:0981
Rocky Linux8pytest0:3.4.2-13.module+el8.5.0+706+735ec4b3RLSA-2019:0981
Rocky Linux8python-PyMySQL0:0.8.0-10.module+el8.3.0+120+426d8bafRLSA-2019:0981 RLSA-2019:0984
Rocky Linux8python-PyMySQL0:0.8.0-10.module+el8.5.0+706+735ec4b3RLSA-2019:0981 RLSA-2019:0984
Rocky Linux8python-attrs0:17.4.0-10.module+el8.4.0+403+9ae17a31RLSA-2019:0981
Rocky Linux8python-attrs0:17.4.0-10.module+el8.5.0+706+735ec4b3RLSA-2019:0981
Rocky Linux8python-chardet0:3.0.4-10.module+el8.4.0+403+9ae17a31RLSA-2019:0981
32 more for Rocky Linux in the JSON.

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This issue affects the version of python-sqlalchemy(bundled with calamari-server) shipped with Red Hat Ceph Storage 2, as it can be abused by SQL Injection.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python27:2.7-8000020190410132513.c0efe978Fixed 2019-05-07RHSA-2019:0981
Red Hat Enterprise Linux 8python36:3.6-8000020190410133122.593c47b3Fixed 2019-05-07RHSA-2019:0984
Red Hat Ceph Storage 2calamari-serverWill not fix
Red Hat Enterprise Linux 6python-sqlalchemyWill not fix
Red Hat Enterprise Linux 7python-sqlalchemyWill not fix
Red Hat OpenStack Platform 10 (Newton)python-sqlalchemyAffected
Red Hat OpenStack Platform 13 (Queens)python-sqlalchemyAffected
Red Hat OpenStack Platform 14 (Rocky)python-sqlalchemyAffected
Red Hat OpenStack Platform 15 (Stein)python-sqlalchemyAffected
Red Hat OpenStack Platform 8 (Liberty)python-sqlalchemyWill not fix
Red Hat OpenStack Platform 9 (Mitaka)python-sqlalchemyWill not fix
Red Hat Software Collectionspython27-python-sqlalchemyWill not fix
Red Hat Software Collectionsrh-python35-python-sqlalchemyWill not fix
Red Hat Software Collectionsrh-python36-python-sqlalchemyWill not fix

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2019-7164.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON