{"api_version":"1","generated_at":"2026-11-24T13:50:11+00:00","cve":"CVE-2026-62270","urls":{"html":"https://cve.report/CVE-2026-62270","api":"https://cve.report/api/cve/CVE-2026-62270.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-62270","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-62270"},"summary":{"title":"Type confusion via structural idempotency guard in ExAws.Dynamo.Encoder.encode/2","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.\n\nThe 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.\n\nAn 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.\n\nThis issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0.","state":"PUBLISHED","assigner":"EEF","published_at":"2026-11-24 13:17:33","updated_at":"2026-11-24 13:17:33"},"problem_types":["CWE-1287","CWE-1287 CWE-1287 Improper Validation of Specified Type of Input"],"metrics":[{"version":"4.0","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","score":"5.9","severity":"MEDIUM","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/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","data":{"version":"4.0","vectorString":"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","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}},{"version":"4.0","source":"CNA","type":"CVSS","score":"5.9","severity":"MEDIUM","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","data":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"}}],"references":[{"url":"https://github.com/ex-aws/ex_aws_dynamo/commit/a760463986f056937e61f5cd1c14e068c259d336","name":"https://github.com/ex-aws/ex_aws_dynamo/commit/a760463986f056937e61f5cd1c14e068c259d336","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/ex-aws/ex_aws_dynamo/commit/8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413","name":"https://github.com/ex-aws/ex_aws_dynamo/commit/8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-62270","name":"https://osv.dev/vulnerability/EEF-CVE-2026-62270","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://cna.erlef.org/cves/CVE-2026-62270.html","name":"https://cna.erlef.org/cves/CVE-2026-62270.html","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/ex-aws/ex_aws_dynamo/security/advisories/GHSA-9776-rh77-6wp6","name":"https://github.com/ex-aws/ex_aws_dynamo/security/advisories/GHSA-9776-rh77-6wp6","refsource":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-62270","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-62270","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"ex-aws","product":"ex_aws_dynamo","version":"affected 2.0.0 4.3.0 semver","platforms":[]},{"source":"CNA","vendor":"ex-aws","product":"ex_aws_dynamo","version":"affected a760463986f056937e61f5cd1c14e068c259d336 8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413 git","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[{"source":"CNA","title":"","value":"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.","time":"","lang":"en"}],"exploits":[],"credits":[{"source":"CNA","value":"Peter Ullrich","lang":"en"},{"source":"CNA","value":"Peter Ullrich","lang":"en"},{"source":"CNA","value":"Jonatan Männchen / EEF","lang":"en"},{"source":"CNA","value":"Peter Ullrich","lang":"en"},{"source":"CNA","value":"Bernard Duggan","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"collectionURL":"https://repo.hex.pm","cpes":["cpe:2.3:a:ex-aws:ex_aws_dynamo:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.ExAws.Dynamo.Encoder'"],"packageName":"ex_aws_dynamo","packageURL":"pkg:hex/ex_aws_dynamo","product":"ex_aws_dynamo","programFiles":["lib/ex_aws/dynamo/encoder.ex"],"programRoutines":[{"name":"'Elixir.ExAws.Dynamo.Encoder':encode/2"},{"name":"'Elixir.ExAws.Dynamo.Encoder':encode/1"}],"repo":"https://github.com/ex-aws/ex_aws_dynamo","vendor":"ex-aws","versions":[{"lessThan":"4.3.0","status":"affected","version":"2.0.0","versionType":"semver"}]},{"collectionURL":"https://github.com","cpes":["cpe:2.3:a:ex-aws:ex_aws_dynamo:*:*:*:*:*:*:*:*"],"defaultStatus":"unaffected","modules":["'Elixir.ExAws.Dynamo.Encoder'"],"packageName":"ex-aws/ex_aws_dynamo","packageURL":"pkg:github/ex-aws/ex_aws_dynamo","product":"ex_aws_dynamo","programFiles":["lib/ex_aws/dynamo/encoder.ex"],"programRoutines":[{"name":"'Elixir.ExAws.Dynamo.Encoder':encode/2"},{"name":"'Elixir.ExAws.Dynamo.Encoder':encode/1"}],"repo":"https://github.com/ex-aws/ex_aws_dynamo","vendor":"ex-aws","versions":[{"lessThan":"8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413","status":"affected","version":"a760463986f056937e61f5cd1c14e068c259d336","versionType":"git"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ex-aws:ex_aws_dynamo:*:*:*:*:*:*:*:*","versionEndExcluding":"4.3.0","versionStartIncluding":"2.0.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}],"credits":[{"lang":"en","type":"finder","value":"Peter Ullrich"},{"lang":"en","type":"reporter","value":"Peter Ullrich"},{"lang":"en","type":"analyst","value":"Jonatan Männchen / EEF"},{"lang":"en","type":"coordinator","value":"Peter Ullrich"},{"lang":"en","type":"remediation developer","value":"Bernard Duggan"}],"datePublic":"2026-11-24T12:58:59.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Improper Validation of Specified Type of Input in <code>ExAws.Dynamo.Encoder.encode/2</code> in ex_aws_dynamo allows an attacker who controls map data passed into a DynamoDB call to choose the raw stored DynamoDB <code>AttributeValue</code>.</p>\n<p>The <code>encode/2</code> function in <code>lib/ex_aws/dynamo/encoder.ex</code> has one clause per DynamoDB type descriptor (<code>\"S\"</code>, <code>\"N\"</code>, <code>\"B\"</code>, <code>\"BOOL\"</code>, <code>\"M\"</code>, <code>\"L\"</code>, <code>\"NS\"</code>, <code>\"SS\"</code>, <code>\"BS\"</code>, <code>\"NULL\"</code>) that treats any map merely containing such a key as already encoded and returns it verbatim, bypassing the <code>ExAws.Dynamo.Encodable</code> 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.</p>\n<p>An application that threads user-influenced map data (a decoded JSON body, a nested attribute, or an <code>expression_attribute_values</code> 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.</p>\n<p>This issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0.</p>"},{"base64":false,"type":"text/markdown","value":"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`.\n\nThe `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.\n\nAn 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.\n\nThis issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0."}],"value":"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.\n\nThe 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.\n\nAn 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.\n\nThis issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0."}],"impacts":[{"capecId":"CAPEC-153","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Type confusion / improper input validation in <code>ExAws.Dynamo.Encoder.encode/2</code>. Affects any application on <code>ex_aws_dynamo</code> that passes user-influenced map data (a decoded JSON body, a nested attribute, a filter value) into a Dynamo item write or <code>expression_attribute_values</code>, which is the ordinary usage pattern behind an HTTP boundary. No authentication or special privilege is needed, only the ability to submit a JSON object whose key is one of the ten type descriptors. Consequences range from silent persistent data corruption and denial of service for other readers of the same table, to authorization bypass and injection of attacker-controlled binaries and privileged attributes into the datastore.</p>"},{"base64":false,"type":"text/markdown","value":"Type confusion / improper input validation in `ExAws.Dynamo.Encoder.encode/2`. Affects any application on `ex_aws_dynamo` that passes user-influenced map data (a decoded JSON body, a nested attribute, a filter value) into a Dynamo item write or `expression_attribute_values`, which is the ordinary usage pattern behind an HTTP boundary. No authentication or special privilege is needed, only the ability to submit a JSON object whose key is one of the ten type descriptors. Consequences range from silent persistent data corruption and denial of service for other readers of the same table, to authorization bypass and injection of attacker-controlled binaries and privileged attributes into the datastore."}],"value":"Type confusion / improper input validation in ExAws.Dynamo.Encoder.encode/2. Affects any application on ex_aws_dynamo that passes user-influenced map data (a decoded JSON body, a nested attribute, a filter value) into a Dynamo item write or expression_attribute_values, which is the ordinary usage pattern behind an HTTP boundary. No authentication or special privilege is needed, only the ability to submit a JSON object whose key is one of the ten type descriptors. Consequences range from silent persistent data corruption and denial of service for other readers of the same table, to authorization bypass and injection of attacker-controlled binaries and privileged attributes into the datastore."}]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.9,"baseSeverity":"MEDIUM","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1287","description":"CWE-1287 Improper Validation of Specified Type of Input","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-11-24T12:59:00.667Z","orgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","shortName":"EEF"},"references":[{"tags":["vendor-advisory","related"],"url":"https://github.com/ex-aws/ex_aws_dynamo/security/advisories/GHSA-9776-rh77-6wp6"},{"name":"EEF CNA record for CVE-2026-62270","tags":["related"],"url":"https://cna.erlef.org/cves/CVE-2026-62270.html"},{"name":"OSV record EEF-CVE-2026-62270","tags":["related"],"url":"https://osv.dev/vulnerability/EEF-CVE-2026-62270"},{"name":"Introducing commit a760463 in ex-aws/ex_aws_dynamo","tags":["related"],"url":"https://github.com/ex-aws/ex_aws_dynamo/commit/a760463986f056937e61f5cd1c14e068c259d336"},{"name":"Fix commit 8d1f1d8 in ex-aws/ex_aws_dynamo","tags":["patch"],"url":"https://github.com/ex-aws/ex_aws_dynamo/commit/8d1f1d8da8ea36ca7119bbcc7e210762fe4a1413"}],"source":{"discovery":"EXTERNAL"},"title":"Type confusion via structural idempotency guard in ExAws.Dynamo.Encoder.encode/2","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>Validate or reject untrusted map data whose top-level key is one of the DynamoDB type descriptors (<code>\"S\"</code>, <code>\"N\"</code>, <code>\"B\"</code>, <code>\"BOOL\"</code>, <code>\"M\"</code>, <code>\"L\"</code>, <code>\"NS\"</code>, <code>\"SS\"</code>, <code>\"BS\"</code>, <code>\"NULL\"</code>) before passing it to <code>ExAws.Dynamo.Encoder.encode/2</code> or into a Dynamo call, so that user-supplied maps cannot be mistaken for already-encoded values.</p>"},{"base64":false,"type":"text/markdown","value":"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."}],"value":"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."}],"x_proofOfConcept":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<ol>\n<li>An endpoint takes a JSON body <code>{\"filter\": &lt;any JSON value&gt;}</code> and passes the value to <code>ExAws.Dynamo.query(\"Products\", key_condition_expression: \"attr = :val\", expression_attribute_values: [val: user_value])</code>, which runs it through <code>Encoder.encode/2</code>.</li>\n<li>A benign value <code>{\"city\": \"Berlin\"}</code> is encoded as type <code>M</code>.</li>\n<li>The attacker sends <code>{\"N\": \"1000000\"}</code>. The <code>\"N\"</code> clause matches, the map is sent unchanged, and it reads back as the integer <code>1000000</code> instead of a map.</li>\n<li><code>{\"B\": \"&lt;base64&gt;\"}</code> stores attacker-chosen raw bytes, <code>{\"NULL\": \"true\"}</code> makes an <code>is_private</code> flag decode to <code>nil</code>, and <code>{\"M\": {\"role\": {\"S\": \"admin\"}, \"is_admin\": {\"BOOL\": true}}}</code> injects attributes the schema never sanctioned.</li>\n<li><code>{\"N\": \"evil\"}</code> is stored as a malformed number, and a later scan by another user raises while decoding the item.</li>\n</ol>"},{"base64":false,"type":"text/markdown","value":"1. An endpoint takes a JSON body `{\"filter\": <any JSON value>}` and passes the value to `ExAws.Dynamo.query(\"Products\", key_condition_expression: \"attr = :val\", expression_attribute_values: [val: user_value])`, which runs it through `Encoder.encode/2`.\n2. A benign value `{\"city\": \"Berlin\"}` is encoded as type `M`.\n3. The attacker sends `{\"N\": \"1000000\"}`. The `\"N\"` clause matches, the map is sent unchanged, and it reads back as the integer `1000000` instead of a map.\n4. `{\"B\": \"<base64>\"}` stores attacker-chosen raw bytes, `{\"NULL\": \"true\"}` makes an `is_private` flag decode to `nil`, and `{\"M\": {\"role\": {\"S\": \"admin\"}, \"is_admin\": {\"BOOL\": true}}}` injects attributes the schema never sanctioned.\n5. `{\"N\": \"evil\"}` is stored as a malformed number, and a later scan by another user raises while decoding the item."}],"value":"* An endpoint takes a JSON body {\"filter\": <any JSON value>} and passes the value to ExAws.Dynamo.query(\"Products\", key_condition_expression: \"attr = :val\", expression_attribute_values: [val: user_value]), which runs it through Encoder.encode/2.\n* A benign value {\"city\": \"Berlin\"} is encoded as type M.\n* The attacker sends {\"N\": \"1000000\"}. The \"N\" clause matches, the map is sent unchanged, and it reads back as the integer 1000000 instead of a map.\n* {\"B\": \"<base64>\"} stores attacker-chosen raw bytes, {\"NULL\": \"true\"} makes an is_private flag decode to nil, and {\"M\": {\"role\": {\"S\": \"admin\"}, \"is_admin\": {\"BOOL\": true}}} injects attributes the schema never sanctioned.\n* {\"N\": \"evil\"} is stored as a malformed number, and a later scan by another user raises while decoding the item."}],"x_technicalAnalysis":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><strong>1. Structural idempotency guard.</strong> <code>ExAws.Dynamo.Encoder.encode/2</code> in <code>lib/ex_aws/dynamo/encoder.ex</code> has one clause per type descriptor (<code>\"S\"</code>, <code>\"N\"</code>, <code>\"B\"</code>, <code>\"BOOL\"</code>, <code>\"BS\"</code>, <code>\"L\"</code>, <code>\"M\"</code>, <code>\"NS\"</code>, <code>\"NULL\"</code>, <code>\"SS\"</code>), each of the form <code>def encode(%{\"S\" =&gt; _} = val, _), do: val</code>. A map that merely contains one of these keys is returned verbatim and skips the <code>ExAws.Dynamo.Encodable</code> protocol.</p>\n<p><strong>2. No validation.</strong> The match is on the presence of the key alone: extra keys and arbitrary nested content survive, and nothing checks that the value is well formed for the claimed type. Nothing distinguishes a value this encoder produced from user data of the same shape, so a decoded JSON body <code>%{\"S\" =&gt; \"evil\"}</code>, meant as a Map with a key named <code>\"S\"</code>, is sent as the string <code>\"evil\"</code>.</p>\n<p><strong>3. Consequences.</strong> The user, not the application, decides the stored attribute's type, bytes and structure, and <code>decode(encode(x))</code> differs from <code>x</code> for any <code>x</code> shaped like the wire format. <code>encode!/2</code> and <code>encode_root/2</code> call <code>Encodable.encode</code> directly and skip the shortcut, so the same value encodes differently depending on the entry point.</p>"},{"base64":false,"type":"text/markdown","value":"**1. Structural idempotency guard.** `ExAws.Dynamo.Encoder.encode/2` in `lib/ex_aws/dynamo/encoder.ex` has one clause per type descriptor (`\"S\"`, `\"N\"`, `\"B\"`, `\"BOOL\"`, `\"BS\"`, `\"L\"`, `\"M\"`, `\"NS\"`, `\"NULL\"`, `\"SS\"`), each of the form `def encode(%{\"S\" => _} = val, _), do: val`. A map that merely contains one of these keys is returned verbatim and skips the `ExAws.Dynamo.Encodable` protocol.\n\n**2. No validation.** The match is on the presence of the key alone: extra keys and arbitrary nested content survive, and nothing checks that the value is well formed for the claimed type. Nothing distinguishes a value this encoder produced from user data of the same shape, so a decoded JSON body `%{\"S\" => \"evil\"}`, meant as a Map with a key named `\"S\"`, is sent as the string `\"evil\"`.\n\n**3. Consequences.** The user, not the application, decides the stored attribute's type, bytes and structure, and `decode(encode(x))` differs from `x` for any `x` shaped like the wire format. `encode!/2` and `encode_root/2` call `Encodable.encode` directly and skip the shortcut, so the same value encodes differently depending on the entry point."}],"value":"1. Structural idempotency guard. ExAws.Dynamo.Encoder.encode/2 in lib/ex_aws/dynamo/encoder.ex has one clause per type descriptor (\"S\", \"N\", \"B\", \"BOOL\", \"BS\", \"L\", \"M\", \"NS\", \"NULL\", \"SS\"), each of the form def encode(%{\"S\" => _} = val, _), do: val. A map that merely contains one of these keys is returned verbatim and skips the ExAws.Dynamo.Encodable protocol.\n\n2. No validation. The match is on the presence of the key alone: extra keys and arbitrary nested content survive, and nothing checks that the value is well formed for the claimed type. Nothing distinguishes a value this encoder produced from user data of the same shape, so a decoded JSON body %{\"S\" => \"evil\"}, meant as a Map with a key named \"S\", is sent as the string \"evil\".\n\n3. Consequences. The user, not the application, decides the stored attribute's type, bytes and structure, and decode(encode(x)) differs from x for any x shaped like the wire format. encode!/2 and encode_root/2 call Encodable.encode directly and skip the shortcut, so the same value encodes differently depending on the entry point."}]}},"cveMetadata":{"assignerOrgId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","assignerShortName":"EEF","cveId":"CVE-2026-62270","datePublished":"2026-11-24T12:59:00.667Z","dateReserved":"2026-07-13T18:06:12.918Z","dateUpdated":"2026-11-24T12:59:00.667Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-24 13:17:33","lastModifiedDate":"2026-11-24 13:17:33","problem_types":["CWE-1287","CWE-1287 CWE-1287 Improper Validation of Specified Type of Input"],"metrics":{"cvssMetricV40":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"62270","Ordinal":"1","Title":"Type confusion via structural idempotency guard in ExAws.Dynamo.","CVE":"CVE-2026-62270","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"62270","Ordinal":"1","NoteData":"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.\n\nThe 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.\n\nAn 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.\n\nThis issue affects ex_aws_dynamo: from 2.0.0 before 4.3.0.","Type":"Description","Title":"Type confusion via structural idempotency guard in ExAws.Dynamo."}]}}}