CVE-2026-62270 in ex_aws_dynamoinfo

Summary

by MITRE • 11/24/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 11/24/2026

The vulnerability identified in ExAws.Dynamo.Encoder.encode/2 within the ex_aws_dynamo library represents a critical failure in input validation and type enforcement, specifically categorized under CWE-20 Improper Input Validation. The core technical flaw lies in the encoder's logic for handling DynamoDB attribute types such as String (S), Number (N), Binary (B), Boolean (BOOL), Map (M), List (L), and their respective set variants. Instead of strictly serializing data according to a predefined schema or protocol, the function employs a permissive matching strategy that checks only for the presence of specific type descriptor keys within an input map. If such a key is detected, the encoder assumes the data has already been properly encoded by the application developer and returns it verbatim without further validation. This design choice effectively bypasses the ExAws.Dynamo.Encodable protocol, which is intended to enforce consistent serialization rules across different data structures. Consequently, any arbitrary nested content or extra keys present in the input map are preserved unchanged, allowing for significant structural manipulation of the final DynamoDB item.

From an operational perspective, this type confusion vulnerability allows an attacker who controls user-influenced map data—such as decoded JSON bodies, nested attributes, or expression attribute values—to dictate the raw stored representation of DynamoDB AttributeValues. By injecting maps that contain specific type keys with arbitrary values, an adversary can subvert application logic that relies on assumed data types for authorization checks or business rule enforcement. For instance, if an application verifies permissions based on a string value but allows an attacker to inject a binary blob under the guise of a different structure, security controls may be bypassed silently. Furthermore, this flaw enables silent persistent data corruption because the integrity of round-trip serialization is broken; data written by one process may not be correctly interpreted or reconstructed when read back, leading to inconsistent states across distributed systems that rely on DynamoDB for state management.

The impact extends beyond logical security breaches into availability and data integrity concerns. The injection of raw binaries or malformed structures can cause decoder crashes during subsequent read operations, effectively denying access to the affected item for other users sharing the same table. This constitutes a form of denial-of-service against specific records rather than the entire service, yet it still impacts system reliability and user experience. Additionally, attackers can inject attributes that were never sanctioned by the application schema, potentially leading to unexpected behavior in downstream analytics or reporting tools that parse DynamoDB items based on expected field types. The vulnerability affects versions of ex_aws_dynamo from 2.0.0 up to but not including version 4.3.0, representing a significant window of exposure for applications utilizing this library for AWS interactions.

Mitigation strategies must focus on enforcing strict schema validation and preventing the bypass of serialization protocols. Developers should update their dependencies to ex_aws_dynamo version 4.3.0 or later, where these validation checks have been strengthened. For systems unable to upgrade immediately, implementing a custom wrapper around DynamoDB write operations is recommended. This wrapper must validate all incoming data against a strict schema before passing it to the encoder, ensuring that no raw maps containing type descriptors are passed directly from user input. Additionally, adopting defense-in-depth principles by validating data types at multiple layers of the application stack can reduce reliance on the library's internal validation logic. Monitoring for anomalous patterns in DynamoDB item structures and implementing strict IAM policies to limit write permissions further reduces the attack surface associated with this vulnerability.

Responsible

EEF

Reservation

07/13/2026

Disclosure

11/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00264

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!