CVE-2017-20166: Ecto lacks a protection mechanism
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.31944%
CWE
-
Published
1/10/2023
Updated
1/29/2023
KEV Status
No
Technology
Erlang
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| ecto | erlang | = 2.2.0 | 2.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the reverted commit 8e1b378 which modified query_for_get_by to handle nil values with is_nil. The patch diff shows this function was responsible for processing WHERE clauses in get_by queries. By automatically converting {key, nil} tuples to is_nil(field(x, ^key)) without proper validation, it circumvented Ecto's security measures that normally require explicit is_nil usage. This matches the advisory's description of lacking protection mechanisms between is_nil and raise, and the revert commit message explicitly cites security implications for nil handling.