SQLAlchemy through 1.2.17 and 1.3.x through 1.3.0b2 allows SQL Injection via the order_by parameter.
Noroxi assessment
Priority: Plan (action score 40/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 3.5% (FIRST EPSS); higher than 88.9% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: python-psycopg2-doc (AlmaLinux:8) 2.7.5-7.module_el8.6.0+2781+fed64c13; python2-attrs (AlmaLinux:8) 17.4.0-10.module_el8.6.0+2781+fed64c13; python2-chardet (AlmaLinux:8) 3.0.4-10.module_el8.6.0+2781+fed64c13.
Add it to your regular patch cycle. Upgrade to python-psycopg2-doc (AlmaLinux:8) 2.7.5-7.module_el8.6.0+2781+fed64c13; python2-attrs (AlmaLinux:8) 17.4.0-10.module_el8.6.0+2781+fed64c13; python2-chardet (AlmaLinux:8) 3.0.4-10.module_el8.6.0+2781+fed64c13 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
- BDU:2021-00766
- GHSA-887w-45rq-vxgf
- ALSA-2019:0981
- ALSA-2019:0984
- DLA-1718-1
- DLA-2811-1
- openSUSE-SU-2019:2039-1
- openSUSE-SU-2019:2064-1
- openSUSE-SU-2019:2078-1
- openSUSE-SU-2024:11211-1
- openSUSE-SU-2024:12915-1
- PYSEC-2019-123
- RHSA-2019:0981
- RHSA-2019:0984
- RLSA-2019:0981
- RLSA-2019:0984
- SUSE-SU-2019:2253-1
- SUSE-SU-2019:2253-2
- SUSE-SU-2019:2261-1
- SUSE-SU-2019:2267-1
- Published
- Feb 19, 2019
- Updated
- Jun 16, 2026
- EPSS
- 3.5% · 89th percentile
- CWE
- CWE-89
Report tools
Action score
40
Plan
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 3.5%
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| sqlalchemy | sqlalchemy | cpe:2.3:a:sqlalchemy:sqlalchemy |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
| opensuse | backports sle | cpe:2.3:a:opensuse:backports_sle |
| opensuse | leap | cpe:2.3:o:opensuse:leap |
| redhat | enterprise linux | cpe:2.3:o:redhat:enterprise_linux |
| redhat | enterprise linux eus | cpe:2.3:o:redhat:enterprise_linux_eus |
| redhat | enterprise linux server aus | cpe:2.3:o:redhat:enterprise_linux_server_aus |
| redhat | enterprise linux server tus | cpe:2.3:o:redhat:enterprise_linux_server_tus |
| oracle | communications operations monitor | cpe:2.3:a:oracle:communications_operations_monitor |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux8.0
- debian debian linux9.0
- opensuse backports sle15.0
- opensuse leap15.0
- opensuse leap15.1
- oracle communications operations monitor4.2
- oracle communications operations monitor4.3
- 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
- sqlalchemy sqlalchemyup to 1.2.17 inclusive
- sqlalchemy sqlalchemy1.3.0
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | python-psycopg2-doc | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-attrs | before 17.4.0-10.module_el8.6.0+2781+fed64c13 | 17.4.0-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-chardet | before 3.0.4-10.module_el8.6.0+2781+fed64c13 | 3.0.4-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-coverage | before 4.5.1-4.module_el8.6.0+2781+fed64c13 | 4.5.1-4.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-Cython | before 0.28.1-7.module_el8.6.0+2781+fed64c13 | 0.28.1-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-docutils | before 0.14-12.module_el8.6.0+2781+fed64c13 | 0.14-12.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-funcsigs | before 1.0.2-13.module_el8.6.0+2781+fed64c13 | 1.0.2-13.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-idna | before 2.5-7.module_el8.6.0+2781+fed64c13 | 2.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-ipaddress | before 1.0.18-6.module_el8.6.0+2781+fed64c13 | 1.0.18-6.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-markupsafe | before 0.23-19.module_el8.6.0+2781+fed64c13 | 0.23-19.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-mock | before 2.0.0-13.module_el8.6.0+2781+fed64c13 | 2.0.0-13.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pluggy | before 0.6.0-8.module_el8.6.0+2781+fed64c13 | 0.6.0-8.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-psycopg2 | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-psycopg2-debug | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-psycopg2-tests | before 2.7.5-7.module_el8.6.0+2781+fed64c13 | 2.7.5-7.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-py | before 1.5.3-6.module_el8.6.0+2781+fed64c13 | 1.5.3-6.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-PyMySQL | before 0.8.0-10.module_el8.6.0+2781+fed64c13 | 0.8.0-10.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pysocks | before 1.6.8-6.module_el8.6.0+2781+fed64c13 | 1.6.8-6.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pytest | before 3.4.2-13.module_el8.6.0+2781+fed64c13 | 3.4.2-13.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pytest-mock | before 1.9.0-4.module_el8.6.0+2781+fed64c13 | 1.9.0-4.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pytz | before 2017.2-12.module_el8.6.0+2781+fed64c13 | 2017.2-12.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-pyyaml | before 3.12-16.module_el8.6.0+2781+fed64c13 | 3.12-16.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-rpm-macros | before 3-38.module_el8.6.0+2781+fed64c13 | 3-38.module_el8.6.0+2781+fed64c13 |
| AlmaLinux:8 | python2-setuptools_scm | before 1.15.7-6.module_el8.6.0+2781+fed64c13 | 1.15.7-6.module_el8.6.0+2781+fed64c13 |
+96
Same product
sqlalchemy: all recordsOther highest-scoring records for the same primary product.
- CVE-2019-7548SQLAlchemy 1.2.17 has SQL Injection when the group_by parameter can be controlled.32Monitor
- CVE-2012-0805Multiple SQL injection vulnerabilities in SQLAlchemy before 0.7.0b4, as used in Keystone, allow remote attackers to execute arbitrary SQL co31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| almalinux:python-psycopg2-doc | 2.7.5-7.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-attrs | 17.4.0-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-chardet | 3.0.4-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-coverage | 4.5.1-4.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-Cython | 0.28.1-7.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-docutils | 0.14-12.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-funcsigs | 1.0.2-13.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-idna | 2.5-7.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-ipaddress | 1.0.18-6.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-markupsafe | 0.23-19.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-mock | 2.0.0-13.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python2-PyMySQL | 0.8.0-10.module_el8.6.0+2781+fed64c13 · AlmaLinux:8 | Package registry (OSV) |
| debian:sqlalchemy | 1.2.18+ds1-2 · Debian:12 | Package registry (OSV) |
| opensuse:python-SQLAlchemy | 1.2.7-lp150.2.3.1 · openSUSE:Leap 15.0 | Package registry (OSV) |
| PyPI:sqlalchemy | 1.3.0b3 | Package registry (OSV) |
| red hat:babel | 0:2.5.1-9.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:Cython | 0:0.28.1-7.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:numpy | 1:1.14.2-10.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:pytest | 0:3.4.2-13.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-attrs | 0:17.4.0-10.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-backports | 0:1.0-15.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-backports-ssl_match_hostname | 0:3.5.0.1-11.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-chardet | 0:3.0.4-10.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-coverage | 0:4.5.1-4.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-dns | 0:1.15.0-9.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:python-PyMySQL | 0:0.8.0-10.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| red hat:PyYAML | 0:3.12-16.module+el8.0.0+2961+596d0223 · Red Hat:enterprise_linux:8::appstream | Package registry (OSV) |
| rocky linux:babel | 0:2.5.1-9.module+el8.4.0+403+9ae17a31 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:Cython | 0:0.28.1-7.module+el8.5.0+706+735ec4b3 · Rocky Linux:8 | Package registry (OSV) |
| rocky linux:pytest | 0:3.4.2-13.module+el8.5.0+706+735ec4b3 · Rocky Linux:8 | Package registry (OSV) |
+21
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-89 · Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
The query text is built by concatenating user input. The database cannot tell where the data ends and the command begins.
The bug in code
The whole CWE-89 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
const owner = req.query.owner;const rows = await db.query( "SELECT * FROM files WHERE owner = '" + owner + "'");Fixed
const owner = req.query.owner;const rows = await db.query( "SELECT * FROM files WHERE owner = $1", [owner]);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Object Relational Mapping InjectionCAPEC-109likelihood: Low · High
- SQL Injection through SOAP Parameter TamperingCAPEC-110likelihood: High · Very High
- Expanding Control over the Operating System from the DatabaseCAPEC-470Very High
- SQL InjectionCAPEC-66likelihood: High · High
- Blind SQL InjectionCAPEC-7likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- lists.opensuse.org/opensuse-security-announce/2019-09/msg00010.html
- lists.opensuse.org/opensuse-security-announce/2019-09/msg00016.html
- access.redhat.com/errata/RHSA-2019:0981
- access.redhat.com/errata/RHSA-2019:0984
- lists.debian.org/debian-lts-announce/2019/03/msg00020.html
- lists.debian.org/debian-lts-announce/2021/11/msg00005.html
- www.oracle.com/security-alerts/cpujan2021.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.