Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-94206 Overview
CVE-2026-94206 is a cryptographic weakness in the danielberkompas/cloak and danielberkompas/cloak_ecto Elixir libraries. The dump/1 callback injected by Cloak.Ecto.PBKDF2 (and Cloak.Fields.PBKDF2 in earlier cloak releases) passes config[:size] to :pbkdf2.pbkdf2/4 in the position reserved for the iteration count. The :iterations option is validated but never applied. With the default configuration (iterations: 600_000, size: 32), each blind-index hash runs only 32 PBKDF2 rounds instead of 600,000. An attacker who obtains the hashed values and the configured secret can brute-force low-entropy plaintexts, such as email addresses, roughly 18,750 times faster than configured. The flaw is tracked as CWE-916.
Critical Impact
Blind-index hashes used for searchable encryption provide only a fraction of the intended computational cost, enabling practical offline brute-force attacks against predictable plaintexts.
Affected Products
- cloak_ecto from version 1.0.0-alpha.0 onward
- cloak from version 0.7.0 before 1.0.0-alpha.0
- Elixir applications using Cloak.Ecto.PBKDF2 or Cloak.Fields.PBKDF2 for blind indexing
Discovery Timeline
- 2026-10-06 - CVE-2026-94206 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-94206
Vulnerability Analysis
The cloak and cloak_ecto libraries implement searchable encryption through blind indexing. A deterministic PBKDF2 hash is computed over a plaintext value and a configured secret so the application can query encrypted columns by exact match. PBKDF2 relies on a high iteration count to make offline guessing computationally expensive.
In the affected code, the dump/1 callback injected into field modules invokes :pbkdf2.pbkdf2/4 with arguments in the wrong order. The value intended as the output length (config[:size]) is placed where the iteration count belongs. Validation accepts :iterations, but the setting never reaches the PBKDF2 primitive. Blind-index values are therefore computed with a tiny work factor rather than the configured hundreds of thousands of rounds.
Root Cause
The root cause is a parameter positional error when calling the underlying Erlang :pbkdf2 function. The library confuses the iteration-count argument with the output-size argument. With the shipped defaults, this reduces PBKDF2 work from 600,000 iterations to 32 iterations, a factor of 18,750. Low-entropy plaintexts such as email addresses, phone numbers, or short identifiers become feasible targets for an attacker who holds the ciphertext database and the Cloak secret.
Attack Vector
Exploitation requires an attacker to obtain two artifacts: the stored blind-index hashes and the configured Cloak secret. These are typically disclosed through separate incidents such as database theft combined with source-code or configuration leakage. With both in hand, the attacker runs an offline dictionary or exhaustive search against candidate plaintexts. Because each guess costs only 32 PBKDF2 rounds, attack throughput approaches that of an unsalted keyed hash. Fields holding predictable data such as corporate email addresses can be recovered rapidly on commodity hardware.
The following upstream commits introduce PBKDF2 support and later refactor the affected code path:
# mix.exs - introduction of PBKDF2 dependency
[
{:ecto, ">= 1.0.0"},
{:flow, "~> 0.13.0"},
+ {:pbkdf2, "~> 2.0", optional: true},
{:poison, ">= 1.5.0", optional: true},
{:excoveralls, "~> 0.8", only: :test},
{:postgrex, ">= 0.0.0", only: [:dev, :test]},
]
Source: GitHub Commit 8699e641
Detection Methods for CVE-2026-94206
Indicators of Compromise
- Unexpected bulk read access to database columns containing Cloak blind indexes
- Access to application secret stores or configuration files holding the Cloak key alongside database export activity
- Application logs showing use of Cloak.Ecto.PBKDF2 or Cloak.Fields.PBKDF2 field types in schemas
Detection Strategies
- Inventory Elixir projects for cloak versions 0.7.0 through 0.11.x and cloak_ecto1.0.0-alpha.0 or later using mix deps output
- Grep schema modules for Cloak.Ecto.PBKDF2 and Cloak.Fields.PBKDF2 field declarations to locate affected columns
- Compare generated blind-index values against reference PBKDF2 output at the configured iteration count to confirm the mismatch
Monitoring Recommendations
- Alert on anomalous queries or exports targeting tables that store blind-index columns
- Monitor repository and secret-manager access for retrieval of the Cloak configuration key
- Correlate database access events with application-tier identity activity to detect credential misuse
How to Mitigate CVE-2026-94206
Immediate Actions Required
- Upgrade cloak_ecto and cloak to the patched releases referenced in the CNA advisory
- Rotate the Cloak secret and regenerate blind indexes for affected columns after upgrading
- Treat any previously exposed hash and secret pair as compromised and assess downstream risk for low-entropy fields
Patch Information
Security fixes are available in the upstream repositories. Review the patch commits for cloak_ecto (a8fa164) and cloak (681c970, 8699e64). Additional vulnerability metadata is published through OSV EEF-CVE-2026-94206.
Workarounds
- If immediate upgrade is not possible, replace the affected field type with a custom module that calls :pbkdf2.pbkdf2/4 with the correct iteration-count argument
- Restrict and audit access to databases and secret stores to reduce the likelihood of combined disclosure
- Add high-entropy prefixes or peppers to low-entropy plaintexts before blind indexing to raise the effective search cost
# Verify installed versions in an Elixir project
mix deps | grep -E "cloak|cloak_ecto"
# Update dependencies after bumping versions in mix.exs
mix deps.update cloak cloak_ecto
mix deps.get
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

