{"id":"CVE-2026-131902","aliases":["CVE-2026-131902","EEF-CVE-2026-131902","GHSA-mwxg-gfj8-x32v"],"related":[],"kind":"vulnerability","state":"published","title":"XML injection via unescaped VersionId in ExAws.S3.delete_multiple_objects/3","summary":"XML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls an object version id passed to ExAws.S3.delete_multiple_objects/3 to add objects to the batch delete.\n\ndelete_multiple_objects/3 in lib/ex_aws/s3.ex builds the <Delete> request body by placing each object's version between <VersionId> tags without XML escaping. A version such as v1</VersionId></Object><Object><Key>important-file</Key></Object><Object><Key>x</Key><VersionId>v2 closes the caller's object and opens new ones, so S3 deletes objects the application never listed, including other users' objects in the same bucket.\n\nThis issue affects ex_aws_s3: from 2.0.0 before 2.6.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"XML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls an object version id passed to ExAws.S3.delete_multiple_objects/3 to add objects to the batch delete.\n\ndelete_multiple_objects/3 in lib/ex_aws/s3.ex builds the <Delete> request body by placing each object's version between <VersionId> tags without XML escaping. A version such as v1</VersionId></Object><Object><Key>important-file</Key></Object><Object><Key>x</Key><VersionId>v2 closes the caller's object and opens new ones, so S3 deletes objects the application never listed, including other users' objects in the same bucket.\n\nThis issue affects ex_aws_s3: from 2.0.0 before 2.6.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nXML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls an object version id passed to `ExAws.S3.delete_multiple_objects/3` to add objects to the batch delete.\n\n`delete_multiple_objects/3` in `lib/ex_aws/s3.ex` builds the `<Delete>` request body by placing each object's `version` between `<VersionId>` tags without XML escaping. A version such as `v1</VersionId></Object><Object><Key>important-file</Key></Object><Object><Key>x</Key><VersionId>v2` closes the caller's object and opens new ones, so S3 deletes objects the application never listed, including other users' objects in the same bucket.\n\nThis issue affects ex_aws_s3: from 2.0.0 before 2.6.0.\n\n## Details\n\n**1. Selective escaping.** When `delete_multiple_objects/3` in `lib/ex_aws/s3.ex` builds the `<Delete>` body, it escapes each object's key with `escape_xml_string/1` but emits the version from the same tuple raw: `\"<VersionId>\", version, \"</VersionId>\"`.\n\n**2. Element break-out.** XML metacharacters in `version` are read as markup. A value beginning `</VersionId></Object>` closes the current object early, and the rest of the string can open further `<Object>...</Object>` elements while keeping the document well-formed.\n\n**3. Extra deletes.** The body POSTed to S3 lists more delete targets than the caller passed in, so a single crafted version id removes arbitrary additional objects in the bucket.\n\n## Proof of concept\n\n1. An application lets a user delete a version of their own object and calls `ExAws.S3.delete_multiple_objects(\"user-bucket\", [{key, version}])` with the user's `key` and `version`.\n2. The attacker sends the key `my-own-file` and the version `v1</VersionId></Object><Object><Key>important-file</Key></Object><Object><Key>x</Key><VersionId>v2`.\n3. `delete_multiple_objects/3` interpolates the version unescaped into the `<Delete>` body.\n4. The body contains three `<Object>` entries, one of them `important-file`, which S3 deletes although the user never named it.\n\n## Impact\n\nAn attacker who controls a version id passed to `delete_multiple_objects/3` can make the batched delete request remove arbitrary additional objects in the same bucket, including objects belonging to other users or critical to the application. Services that let users delete a specific object version by id are affected.\n\n## Configurations\n\nReachable only when the application passes a version id derived, even partially, from untrusted input to `ExAws.S3.delete_multiple_objects/3`, for example a service that lets users delete a specific object version by id.","format":"markdown","source":"eef"}],"published":"2026-11-24T14:13:43.953Z","modified":"2026-11-25T20:18:33.517Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","score":5.9,"rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N"}],"cwes":["CWE-91"],"affected":[{"ranges":[{"type":"semver","introduced":"2.0.0","fixed":"2.6.0","status":"affected"}],"vendor":"ex-aws","product":"ex_aws_s3","package":"ex_aws_s3","cpe":"cpe:2.3:a:ex-aws:ex_aws_s3:*:*:*:*:*:*:*:*","repo":"https://github.com/ex-aws/ex_aws_s3","source":"cvelist"},{"ranges":[{"type":"git","introduced":"4ce4d72219c0cb8de9356278203d8ea780311b75","fixed":"eda0b9b9c63707f7db8d8f18c331df7fda57c397","status":"affected"}],"vendor":"ex-aws","product":"ex_aws_s3","package":"ex-aws/ex_aws_s3","cpe":"cpe:2.3:a:ex-aws:ex_aws_s3:*:*:*:*:*:*:*:*","repo":"https://github.com/ex-aws/ex_aws_s3","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"2.0.0","status":"affected","fixed":"2.6.0"}],"ecosystem":"Hex","package":"ex_aws_s3","purl":"pkg:hex/ex_aws_s3","source":"eef"},{"ranges":[{"type":"git","introduced":"4ce4d72219c0cb8de9356278203d8ea780311b75","status":"affected","fixed":"eda0b9b9c63707f7db8d8f18c331df7fda57c397"}],"repo":"https://github.com/ex-aws/ex_aws_s3","source":"eef"}],"references":[{"url":"https://github.com/ex-aws/ex_aws_s3/security/advisories/GHSA-mwxg-gfj8-x32v","tags":["advisory","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-131902.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-131902","tags":["exploit","related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ex-aws/ex_aws_s3/commit/4ce4d72219c0cb8de9356278203d8ea780311b75","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ex-aws/ex_aws_s3/commit/eda0b9b9c63707f7db8d8f18c331df7fda57c397","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/ex_aws_s3","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Bernard Duggan"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-11-25T20:07:05.887Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-131902","url":"https://www.cve.org/CVERecord?id=CVE-2026-131902","licence":"CVE Terms of Use","modified":"2026-11-25T20:07:32.875Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-131902","url":"https://osv.dev/vulnerability/EEF-CVE-2026-131902","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:02.941Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-131902","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-131902","licence":"Public domain","modified":"2026-11-25T20:18:33.517Z"}],"updatedAt":"2026-11-25T23:18:32.027Z","epss":{"score":0.00475,"percentile":0.42664,"date":"2026-12-01T12:00:22.000Z"}}