Type confusion via structural idempotency guard in ExAws.Dynamo.Encoder.encode/2
Summary
| CVE | CVE-2026-62270 |
|---|---|
| State | PUBLISHED |
| Assigner | EEF |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-11-24 13:17:33 UTC |
| Updated | 2026-11-24 13:17:33 UTC |
| Description | Improper Validation of Specified Type of Input in ExAws.Dynamo.Encoder.encode/2 in ex_aws_dynamo allows an attacker who controls map data passed into a DynamoDB call to choose the raw stored DynamoDB AttributeValue. The encode/2 function in lib/ex_aws/dynamo/encoder.ex has one clause per DynamoDB type descriptor ("S", "N", "B", "BOOL", "M", "L", "NS", "SS", "BS", "NULL") that treats any map merely containing such a key as already encoded and returns it verbatim, bypassing the ExAws.Dynamo.Encodable protocol. The match is on the presence of the key alone, so no check is made that the value is well formed for the claimed type, and extra keys and arbitrary nested content survive untouched. An application that threads user-influenced map data (a decoded JSON body, a nested attribute, or an expression_attribute_values entry) into a Dynamo write or query therefore lets the user, rather than the application, decide the stored attribute's declared type, its bytes, and its structure. This type confusion breaks round-trip integrity and enables silent persistent data corruption, injection of attributes and raw binaries the schema never sanctioned, subversion of application authorization checks that trust the decoded type of a value, and a decoder crash on read-back that denies reads of the affected item to other users of the same table. This issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0. |
Risk And Classification
Primary CVSS: v4.0 5.9 MEDIUM from 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Problem Types: CWE-1287 | CWE-1287 CWE-1287 Improper Validation of Specified Type of Input
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 4.0 | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | Secondary | 5.9 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/C... |
| 4.0 | CNA | CVSS | 5.9 | MEDIUM | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N |
CVSS v4.0 Breakdown
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Ex-aws | Ex Aws Dynamo | affected 2.0.0 4.3.0 semver | Not specified |
| CNA | Ex-aws | Ex Aws Dynamo | affected a760463986f056937e61f5cd1c14e068c259d336 8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413 git | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/ex-aws/ex_aws_dynamo/commit/a760463986f056937e61f5cd1c14e068c... | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| github.com/ex-aws/ex_aws_dynamo/commit/8d1f1d8da8ea36ca7119bbcc7e210762f... | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| osv.dev/vulnerability/EEF-CVE-2026-62270 | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | osv.dev | |
| cna.erlef.org/cves/CVE-2026-62270.html | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | cna.erlef.org | |
| github.com/ex-aws/ex_aws_dynamo/security/advisories/GHSA-9776-rh77-6wp6 | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
Vendor Comments And Credit
Discovery Credit
CNA: Peter Ullrich (en)
CNA: Peter Ullrich (en)
CNA: Jonatan Männchen / EEF (en)
CNA: Peter Ullrich (en)
CNA: Bernard Duggan (en)
Additional Advisory Data
Workarounds
CNA: Validate or reject untrusted map data whose top-level key is one of the DynamoDB type descriptors ("S", "N", "B", "BOOL", "M", "L", "NS", "SS", "BS", "NULL") before passing it to ExAws.Dynamo.Encoder.encode/2 or into a Dynamo call, so that user-supplied maps cannot be mistaken for already-encoded values.