SQLAlchemy vulnerable to SQL Injection via order_by parameter
SQLAlchemy before 1.3.0b3 allows SQL Injection via the order_by parameter. The fix (commit 30307c4) was applied only to the main branch and was never backported to the 1.2.x release line; all 1.2.x versions remain vulnerable.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | sqlalchemy | < 1.3.0b3 | 1.3.0b3 |
References
- https://github.com/sqlalchemy/sqlalchemy/issues/4481
- https://lists.debian.org/debian-lts-announce/2019/03/msg00020.html
- https://access.redhat.com/errata/RHSA-2019:0984
- https://access.redhat.com/errata/RHSA-2019:0981
- http://lists.opensuse.org/opensuse-security-announce/2019-08/msg00087.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00010.html
- http://lists.opensuse.org/opensuse-security-announce/2019-09/msg00016.html
- https://www.oracle.com/security-alerts/cpujan2021.html
- https://github.com/advisories/GHSA-887w-45rq-vxgf
- https://nvd.nist.gov/vuln/detail/CVE-2019-7164
- https://github.com/sqlalchemy/sqlalchemy/commit/30307c4616ad67c01ddae2e1e8e34fabf6028414
- https://github.com/pypa/advisory-database/tree/main/vulns/sqlalchemy/PYSEC-2019-123.yaml
- https://github.com/sqlalchemy/sqlalchemy
- https://lists.debian.org/debian-lts-announce/2021/11/msg00005.html
- CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-89- Platform
- Python (PyPI)
- Package
sqlalchemy- Disclosed
- 20.02.2019
- Updated
- 11.10.2026 12:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2019-123 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-887w-45rq-vxgf - CC BY 4.0
Vulnerability history: sqlalchemy
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 3
- First → latest
- 06.2012 02.2019
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 3
Disclosures per year
- 2017: 0
- 2018: 0
- 2019: 2
- 2020: 0
- 2021: 0
- 2022: 0
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 0
earlier: 1
-
SQLAlchemy vulnerable to SQL Injection via order_by parameter this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.