5.9medium
XML injection via unescaped VersionId in ExAws.S3.delete_multiple_objects/3
- Severity
- 5.9medium CVSS:4.0 by EEF
- Exploit likelihood
- 0.47% (higher than 42% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- EEF-CVE-2026-131902GHSA-mwxg-gfj8-x32v
Description
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. 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. This issue affects ex_aws_s3: from 2.0.0 before 2.6.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ex_aws_s3 | from 2.0.0 before 2.6.0 | CVE List |
| ex-aws/ex_aws_s3 | from 4ce4d72219c0cb8de9356278203d8ea780311b75 before eda0b9b9c63707f7db8d8f18c331df7fda57c397 | CVE List |
| ex_aws_s3 (Hex) | from 2.0.0 before 2.6.0 | Erlang Ecosystem Foundation |
| https://github.com/ex-aws/ex_aws_s3 | from 4ce4d72219c0cb8de9356278203d8ea780311b75 before eda0b9b9c63707f7db8d8f18c331df7fda57c397 | Erlang Ecosystem Foundation |
All scores
| EEF | 5.9medium CVSS:4.0 | 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 |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
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. 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. This issue affects ex_aws_s3: from 2.0.0 before 2.6.0.
Erlang Ecosystem Foundation
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.
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.
This issue affects ex_aws_s3: from 2.0.0 before 2.6.0.
Details
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>".
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.
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.
Proof of concept
- 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'skeyandversion. - The attacker sends the key
my-own-fileand the versionv1</VersionId></Object><Object><Key>important-file</Key></Object><Object><Key>x</Key><VersionId>v2. delete_multiple_objects/3interpolates the version unescaped into the<Delete>body.- The body contains three
<Object>entries, one of themimportant-file, which S3 deletes although the user never named it.
Impact
An 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.
Configurations
Reachable 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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-131902 changed 2026-11-25 | CVE Terms of Use |
| Erlang Ecosystem Foundation | EEF-CVE-2026-131902 changed 2026-11-25 | CC-BY-4.0 |
| NVD | CVE-2026-131902 changed 2026-11-25 | Public domain |