Hex
CVE-2026-62270
Type confusion via structural idempotency guard in ExAws.Dynamo.Encoder.encode/2
- Severity
- Medium 5.9
- Published
- 24 Nov 2026
- Last changed
- 24 Nov 2026
- Added to UpHeron
- 24 Nov 2026
- Fixed in
- 4.3.0
- Weakness
- CWE-1287
- Attack
- Needs local access · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read some data · Change data · Slow it down
- CVSS vector
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- Sources
- CVE Program
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.
Affected software
| Software | Affected versions |
|---|---|
ex_aws_dynamoHex · osv:Hex:ex_aws_dynamo |
|
About ex_aws_dynamo
This is the only vulnerability in ex_aws_dynamo in our list.
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-62270