{"id":"CVE-2026-94206","aliases":["CVE-2026-94206","EEF-CVE-2026-94206"],"related":[],"kind":"vulnerability","state":"published","title":"Cloak PBKDF2 field ignores the configured iteration count and runs only :size rounds","summary":"Use of Password Hash With Insufficient Computational Effort vulnerability in danielberkompas cloak_ecto and danielberkompas cloak allows an attacker who holds the hashed values and the configured secret to brute-force low-entropy plaintexts much faster than configured.\n\nThe dump/1 callback that Cloak.Ecto.PBKDF2 (Cloak.Fields.PBKDF2 in cloak before the Ecto code moved to cloak_ecto) injects into a field module calls :pbkdf2.pbkdf2/4 with config[:size] in the iteration-count position. The :iterations setting is validated but never used. With the cloak_ecto defaults (iterations: 600_000, size: 32) each hash runs 32 PBKDF2 rounds instead of 600,000, so offline guessing of values such as email addresses costs about 18,750 times less than configured.\n\nThis issue affects cloak: from 0.7.0 before 1.0.0-alpha.0; cloak_ecto: from 1.0.0-alpha.0 onward.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Use of Password Hash With Insufficient Computational Effort vulnerability in danielberkompas cloak_ecto and danielberkompas cloak allows an attacker who holds the hashed values and the configured secret to brute-force low-entropy plaintexts much faster than configured.\n\nThe dump/1 callback that Cloak.Ecto.PBKDF2 (Cloak.Fields.PBKDF2 in cloak before the Ecto code moved to cloak_ecto) injects into a field module calls :pbkdf2.pbkdf2/4 with config[:size] in the iteration-count position. The :iterations setting is validated but never used. With the cloak_ecto defaults (iterations: 600_000, size: 32) each hash runs 32 PBKDF2 rounds instead of 600,000, so offline guessing of values such as email addresses costs about 18,750 times less than configured.\n\nThis issue affects cloak: from 0.7.0 before 1.0.0-alpha.0; cloak_ecto: from 1.0.0-alpha.0 onward.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nUse of Password Hash With Insufficient Computational Effort vulnerability in danielberkompas cloak_ecto and danielberkompas cloak allows an attacker who holds the hashed values and the configured secret to brute-force low-entropy plaintexts much faster than configured.\n\nThe `dump/1` callback that `Cloak.Ecto.PBKDF2` (`Cloak.Fields.PBKDF2` in cloak before the Ecto code moved to cloak_ecto) injects into a field module calls `:pbkdf2.pbkdf2/4` with `config[:size]` in the iteration-count position. The `:iterations` setting is validated but never used. With the cloak_ecto defaults (`iterations: 600_000`, `size: 32`) each hash runs 32 PBKDF2 rounds instead of 600,000, so offline guessing of values such as email addresses costs about 18,750 times less than configured.\n\nThis issue affects cloak: from 0.7.0 before 1.0.0-alpha.0; cloak_ecto: from 1.0.0-alpha.0 onward.\n\n## Proof of concept\n\n1. Define a field module with `use Cloak.Ecto.PBKDF2` and configure only a `:secret`, so that the defaults `iterations: 600_000` and `size: 32` apply.\n2. Call `dump/1` on a value.\n3. Compare the result with `:pbkdf2.pbkdf2({:hmac, :sha256}, value, secret, 32)` and with the same call at 600,000 rounds. It matches the 32-round hash, not the 600,000-round hash, and returns in microseconds instead of about one second.\n\n## Impact\n\nAn attacker who obtains a database dump and the PBKDF2 secret can recover hashed values with low entropy, such as email addresses, by offline guessing at a cost far below what the configuration promises.\n\n## Workarounds\n\nOverride `dump/1` in the field module that uses `Cloak.Ecto.PBKDF2`, so that it calls `:pbkdf2.pbkdf2/5` with the configured `:iterations` and `:size`. Then recompute all stored hashes, because the existing values no longer match.","format":"markdown","source":"eef"}],"published":"2026-10-06T08:38:04.584Z","modified":"2026-11-25T17:23:11.588Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"}],"cwes":["CWE-916"],"affected":[{"ranges":[{"type":"semver","introduced":"0.7.0","fixed":"1.0.0-alpha.0","status":"affected"}],"vendor":"danielberkompas","product":"cloak","package":"cloak","cpe":"cpe:2.3:a:danielberkompas:cloak:*:*:*:*:*:*:*:*","repo":"https://github.com/danielberkompas/cloak","source":"cvelist"},{"ranges":[{"type":"git","introduced":"8699e6417a162c39d9f0ef63511bd23d3f38d1d2","fixed":"681c9702b7cd9afe0e5a840751ab009f550c69a9","status":"affected"}],"vendor":"danielberkompas","product":"cloak","package":"danielberkompas/cloak","cpe":"cpe:2.3:a:danielberkompas:cloak:*:*:*:*:*:*:*:*","repo":"https://github.com/danielberkompas/cloak","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"1.0.0-alpha.0","fixed":"*","status":"affected"}],"vendor":"danielberkompas","product":"cloak_ecto","package":"cloak_ecto","cpe":"cpe:2.3:a:danielberkompas:cloak_ecto:*:*:*:*:*:*:*:*","repo":"https://github.com/danielberkompas/cloak_ecto","source":"cvelist"},{"ranges":[{"type":"git","introduced":"a8fa1642b02f1c445a1ee8794c9095eb0921f8f3","fixed":"*","status":"affected"}],"vendor":"danielberkompas","product":"cloak_ecto","package":"danielberkompas/cloak_ecto","cpe":"cpe:2.3:a:danielberkompas:cloak_ecto:*:*:*:*:*:*:*:*","repo":"https://github.com/danielberkompas/cloak_ecto","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.7.0","status":"affected","fixed":"1.0.0-alpha.0"}],"ecosystem":"Hex","package":"cloak","purl":"pkg:hex/cloak","source":"eef"},{"ranges":[{"type":"semver","introduced":"1.0.0-alpha.0","status":"affected"}],"ecosystem":"Hex","package":"cloak_ecto","purl":"pkg:hex/cloak_ecto","source":"eef"},{"ranges":[{"type":"git","introduced":"8699e6417a162c39d9f0ef63511bd23d3f38d1d2","status":"affected","fixed":"681c9702b7cd9afe0e5a840751ab009f550c69a9"}],"repo":"https://github.com/danielberkompas/cloak","source":"eef"},{"ranges":[{"type":"git","introduced":"a8fa1642b02f1c445a1ee8794c9095eb0921f8f3","status":"affected"}],"repo":"https://github.com/danielberkompas/cloak_ecto","source":"eef"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-94206.html","tags":["related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-94206","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/danielberkompas/cloak/commit/8699e6417a162c39d9f0ef63511bd23d3f38d1d2","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/danielberkompas/cloak/commit/681c9702b7cd9afe0e5a840751ab009f550c69a9","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/danielberkompas/cloak_ecto/commit/a8fa1642b02f1c445a1ee8794c9095eb0921f8f3","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/cloak","tags":["package"],"sources":["eef"]},{"url":"https://hex.pm/packages/cloak_ecto","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-10-06T11:34:00.942Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-94206","url":"https://www.cve.org/CVERecord?id=CVE-2026-94206","licence":"CVE Terms of Use","modified":"2026-11-20T06:01:32.844Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-94206","url":"https://osv.dev/vulnerability/EEF-CVE-2026-94206","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:11.588Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-94206","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-94206","licence":"Public domain","modified":"2026-11-20T06:17:45.210Z"}],"updatedAt":"2026-11-25T22:59:42.272Z","epss":{"score":0.00294,"percentile":0.23685,"date":"2026-12-01T12:00:22.000Z"}}