IT SBIT Services
Schneeberger
DEEN
CVE tracker

Cloak: Missing integrity protection in AES-CTR allows ciphertext forgery

CVE-2026-95105High 8.2

← All vulnerabilities

Summary

The Elixir library cloak encrypts stored values with AES-256 in CTR mode but adds no message authentication code. An attacker with write access to the encrypted data store can flip bits in stored ciphertext so that it decrypts to a chosen value of the same length, without the key and without the application detecting the change. Exploitation requires write access to the database or a replica, for example through SQL injection, and knowledge or a good guess of the stored plaintext.

Affected

  • cloak from 0.1.0-pre onward (per CNA and OSV record)
  • Affected ciphers: Cloak.Ciphers.AES.CTR and Cloak.Ciphers.Deprecated.AES.CTR
  • Configurations using only Cloak.Ciphers.AES.GCM are not affected

Fixed in

Unknown. No fixed version has been published as of the sources reviewed.

Workaround

  • Set Cloak.Ciphers.AES.GCM as the default cipher and re-encrypt existing values, for example with the cloak.migrate.ecto task from cloak_ecto
  • After migration, remove Cloak.Ciphers.AES.CTR and Cloak.Ciphers.Deprecated.AES.CTR from the vault configuration so CTR-format ciphertext is no longer decrypted
  • AES-GCM authenticates the ciphertext and rejects modified values

Exploitation

  • CISA SSVC: exploitation status PoC, automatable: no, technical impact: partial
  • A proof of concept is described in the CNA advisory; no reports of exploitation in the wild were found

Our recommendation

  • Ask any Elixir software vendor or developer whether the vault uses AES-CTR
  • If it does, plan migration to AES-GCM and re-encrypt existing data as a medium-priority task
  • Check that the vault configuration does not contain the CTR ciphers once migration is complete
  • Keep write access to the database and replicas restricted and monitor for unexpected changes to encrypted fields

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 17:01.

Original description (NVD)

Reliance on Obfuscation or Encryption of Security-Relevant Inputs without Integrity Checking vulnerability in danielberkompas cloak allows an attacker with write access to stored ciphertext to make it decrypt to a chosen value via bit flipping. Cloak.Ciphers.AES.CTR encrypts with AES-256 in CTR mode and stores the key tag, the IV and the ciphertext with no MAC. decrypt/2 checks only the key tag and the minimum length before it returns the plaintext, and Cloak.Ciphers.Deprecated.AES.CTR decrypts the legacy format the same way. CTR is a stream cipher, so a value XORed into the stored ciphertext is XORed into the plaintext at the same offset. An attacker who can write to the encrypted store (for example through SQL injection or a compromised replica) and who knows or can guess a stored plaintext can replace it with any value of the same length. The application receives that value with no error. This issue affects cloak: from 0.1.0-pre onward.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.