CVE-2020-11010: Tortoise orm SQL Injection Vulnerability
MODERATECVE-2020-11010 is a MODERATE (CVSS 6.3) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Tortoise orm libraries in the PyPI ecosystem. The issue involves sql injection in tortoise orm. Remediation is available by upgrading affected packages to version 0.15.23, 0.16.6.
CVE-2020-11010 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L).
How to Fix CVE-2020-11010
To remediate this vulnerability, upgrade all affected Tortoise orm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install tortoise-orm>=0.15.23
pip install tortoise-orm>=0.16.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show tortoise-orm
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2020-11010, inspect your installed packages using pip:
pip show tortoise-orm
Analyze the terminal output to locate any version of Tortoise orm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.15.23), your application is affected.
Note: The pip show tortoise-orm command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Tortoise orm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-11010 Affected Tortoise orm Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tortoise-orm
|
PyPI |
< 0.15.23
|
0.15.23
|
|
tortoise-orm
|
PyPI |
≥ 0.16.0
< 0.16.6
|
0.16.6
|
References
Frequently Asked Questions
What is CVE-2020-11010?
Which Tortoise orm versions are affected?
What version fixes CVE-2020-11010?
Is tortoise-orm affected?
What is the CVSS score of CVE-2020-11010?
What CWE is associated with CVE-2020-11010?
How can I check PyPI dependencies for CVE-2020-11010?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9j2c-x8qm-qmjq",
"modified" : "2024-11-13T22:53:29Z",
"published" : "2020-04-20T21:31:23Z",
"aliases" : [ "CVE-2020-11010" ],
"summary" : "SQL injection in Tortoise ORM",
"details" : "### Impact\nVarious forms of SQL injection has been found, for MySQL and when filtering or doing mass-updates on char/text fields.\nSQLite & PostgreSQL was only affected when filtering with ``contains``, ``starts_with`` or ``ends_with`` filters (and their case-insensitive counterparts)\n\n\n### Patches\nPlease upgrade to 0.15.23+ or 0.16.6+\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Github](https://github.com/tortoise/tortoise-orm/issues)\n* Chat to us on [Gitter](https://gitter.im/tortoise/community)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "tortoise-orm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.15.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "tortoise-orm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.16.0"
}, {
"fixed" : "0.16.6"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tortoise/tortoise-orm/security/advisories/GHSA-9j2c-x8qm-qmjq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-11010"
}, {
"type" : "WEB",
"url" : "https://github.com/tortoise/tortoise-orm/commit/91c364053e0ddf77edc5442914c6f049512678b3"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/tortoise-orm/PYSEC-2020-144.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tortoise/tortoise-orm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-04-20T21:31:05Z",
"nvd_published_at" : null
}
}