Am I affected?

type your ash_cloak version to check

Description

Exposure of Sensitive Information to an Unauthorized Actor vulnerability in ash-project ash_cloak allows anyone with access to logs, error trackers, or crash reports, or anyone who can trigger a validation error, to recover the plaintext of a field the library encrypts.

AshCloak.Transformers.SetUpEncryption removes each cloaked attribute from the action's accept list and adds an action argument that carries the plaintext into the encryption change. That argument is built with sensitive?: attr.sensitive?, inheriting the flag from the source attribute, so a cloaked attribute declared without sensitive? true produces a non-sensitive argument. It is the only place the cleartext value lives, and the one place Ash will not redact: it appears verbatim in inspect(changeset), Ash.Error.Invalid and validation error messages, telemetry, :sys dumps, and error-tracker payloads. The generated encrypted attribute and decrypt calculation are already hardcoded sensitive.

This issue affects ash_cloak: from 0.1.0 before 0.4.0.

Weaknesses & attack patterns

Weakness

CWE-200 · Exposure of Sensitive Information to an Unauthorized Actor in catalog → MITRE ↗

Attack patterns

CAPEC-37 · Retrieve Embedded Sensitive Data MITRE ↗

Affected — Hex / ash_cloak Hex.pm ↗ Repository ↗

0.1.0 < 0.4.0 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_cloak:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshCloak.Transformers.SetUpEncryption'
source files lib/ash_cloak/transformers/set_up_encryption.ex
routines 'Elixir.AshCloak.Transformers.SetUpEncryption':rewrite_actions/2

Affected — GitHub / ash-project/ash_cloak Repository ↗

f1595a7 < ef49cfc affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_cloak:*:*:*:*:*:*:*:*
modules · source files · routines
modules 'Elixir.AshCloak.Transformers.SetUpEncryption'
source files lib/ash_cloak/transformers/set_up_encryption.ex
routines 'Elixir.AshCloak.Transformers.SetUpEncryption':rewrite_actions/2

Configurations

A resource must cloak an attribute that is not itself declared sensitive? true, and the plaintext must reach an output that renders it (a create/update validation error returned to the client, or logs, telemetry, or crash reports that capture the changeset or error).

References

Credits

Peter Ullrich Finder Reporter
Zach Daniel / Ash Project Remediation developer
Jonatan Männchen / EEF Coordinator

CVSS breakdown

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
« All CVEs