CVE-2017-20166: Ecto Ecto Missing `is_nil` Requirement Vulnerability
CRITICALCVE-2017-20166 is a CRITICAL (CVSS 9.8) ecto missing `is_nil` requirement vulnerability (General Security Weakness) affecting Ecto libraries in the Hex ecosystem. The issue involves ecto missing `is_nil` requirement. Remediation is available by upgrading affected packages to version 2.2.1.
CVE-2017-20166 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-20166
To remediate this vulnerability, upgrade all affected Ecto dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade ecto to 2.2.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for ecto
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-20166, inspect your project dependencies for Ecto:
inspect dependencies for ecto
Analyze the terminal output to locate any version of Ecto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Ecto, 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-2017-20166 Affected Ecto Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ecto
|
Hex |
≥ 2.2.0
< 2.2.1
All 1 versions
2.2.0
|
2.2.1
|
References
Frequently Asked Questions
What is CVE-2017-20166?
Which Ecto versions are affected?
What version fixes CVE-2017-20166?
Is ecto affected?
What is the CVSS score of CVE-2017-20166?
What CWE is associated with CVE-2017-20166?
How can I check Hex dependencies for CVE-2017-20166?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2xxx-fhc8-9qvq",
"modified" : "2026-01-22T20:38:59Z",
"published" : "2022-04-12T19:42:45Z",
"aliases" : [ "CVE-2017-20166" ],
"summary" : "Ecto missing `is_nil` requirement",
"details" : "Ecto will not raise on queries with non-explicit nil comparisons (ie if they aren't checked with `is_nil`).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Hex",
"name" : "ecto"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0"
}, {
"fixed" : "2.2.1"
} ]
} ],
"versions" : [ "2.2.0" ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-20166"
}, {
"type" : "WEB",
"url" : "https://github.com/elixir-ecto/ecto/pull/2125"
}, {
"type" : "WEB",
"url" : "https://github.com/elixir-ecto/ecto/commit/db55b0cba6525c24ebddc88ef9ae0c1c00620250"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/elixir-ecto/ecto"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!topic/elixir-ecto/0m4NPfg_MMU"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-12T19:42:45Z",
"nvd_published_at" : null
}
}