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.
Analysis and contextual insights are available on OpenCVE Cloud.
Vendor Workaround
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.
Tracking
Sign in to view the affected projects.
No advisories yet.
Tue, 24 Nov 2026 13:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Type confusion via structural idempotency guard in ExAws.Dynamo.Encoder.encode/2 | |
| First Time appeared |
Ex-aws
Ex-aws ex Aws Dynamo |
|
| Weaknesses | CWE-1287 | |
| CPEs | cpe:2.3:a:ex-aws:ex_aws_dynamo:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Ex-aws
Ex-aws ex Aws Dynamo |
|
| References |
|
|
| Metrics |
cvssV4_0
|
Status: PUBLISHED
Assigner: EEF
Published:
Updated: 2026-11-24T12:59:00.667Z
Reserved: 2026-07-13T18:06:12.918Z
Link: CVE-2026-62270
No data.
Status : Received
Published: 2026-11-24T13:17:33.983
Modified: 2026-11-24T13:17:33.983
Link: CVE-2026-62270
No data.
OpenCVE Enrichment
No data.
-
CWE-1287
Improper Validation of Specified Type of Input