CVE-2026-62273
JSON

2.1low

XML injection via unescaped tag keys and values in ex_aws_s3 object and bucket tagging

Severity
2.1low CVSS:4.0 by EEF
Exploit likelihood
0.45% (higher than 41% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-62273GHSA-979q-5hj9-vvvv

Description

XML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls tag keys or values to inject forged tag entries into S3 object and bucket tagging requests. ExAws.S3.put_object_tagging/4 and ExAws.S3.put_bucket_tagging/2 in lib/ex_aws/s3.ex build the <TagSet> request body by interpolating tag keys and values directly into <Key> and <Value> elements via to_string/1, without applying the module's existing escape_xml_string/1 helper (which delete_multiple_objects already uses for object keys). An application that forwards user-supplied data as a tag key or value lets an attacker close the intended element and inject attacker-chosen <Tag> entries. For example, a tag value of blue</Value></Tag><Tag><Key>owner</Key><Value>admin turns one intended tag into two tags on the wire. Because S3 honors tags in access-control conditions (aws:RequestTag, s3:ExistingObjectTag) and cost-allocation reporting, an injected tag can forge an authorization-relevant tag or corrupt the intended tag set. This issue affects ex_aws_s3: from 2.0.2 before 2.6.0.

Affected

Product or packageVersionsReported by
ex_aws_s3from 2.0.2 before 2.6.0CVE List
ex-aws/ex_aws_s3from c6331b84c80f09d24d4a25cf05d8604541ce162e before eda0b9b9c63707f7db8d8f18c331df7fda57c397CVE List
ex_aws_s3 (Hex)from 2.0.2 before 2.6.0Erlang Ecosystem Foundation
https://github.com/ex-aws/ex_aws_s3from c6331b84c80f09d24d4a25cf05d8604541ce162e before eda0b9b9c63707f7db8d8f18c331df7fda57c397Erlang Ecosystem Foundation

All scores

EEF2.1low CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N

Classification

CWE-91

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

XML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls tag keys or values to inject forged tag entries into S3 object and bucket tagging requests. ExAws.S3.put_object_tagging/4 and ExAws.S3.put_bucket_tagging/2 in lib/ex_aws/s3.ex build the <TagSet> request body by interpolating tag keys and values directly into <Key> and <Value> elements via to_string/1, without applying the module's existing escape_xml_string/1 helper (which delete_multiple_objects already uses for object keys). An application that forwards user-supplied data as a tag key or value lets an attacker close the intended element and inject attacker-chosen <Tag> entries. For example, a tag value of blue</Value></Tag><Tag><Key>owner</Key><Value>admin turns one intended tag into two tags on the wire. Because S3 honors tags in access-control conditions (aws:RequestTag, s3:ExistingObjectTag) and cost-allocation reporting, an injected tag can forge an authorization-relevant tag or corrupt the intended tag set. This issue affects ex_aws_s3: from 2.0.2 before 2.6.0.

Erlang Ecosystem Foundation

Summary

XML Injection vulnerability in ex-aws ex_aws_s3 allows an attacker who controls tag keys or values to inject forged tag entries into S3 object and bucket tagging requests.

ExAws.S3.put_object_tagging/4 and ExAws.S3.put_bucket_tagging/2 in lib/ex_aws/s3.ex build the <TagSet> request body by interpolating tag keys and values directly into <Key> and <Value> elements via to_string/1, without applying the module's existing escape_xml_string/1 helper (which delete_multiple_objects already uses for object keys). An application that forwards user-supplied data as a tag key or value lets an attacker close the intended element and inject attacker-chosen <Tag> entries. For example, a tag value of blue</Value></Tag><Tag><Key>owner</Key><Value>admin turns one intended tag into two tags on the wire. Because S3 honors tags in access-control conditions (aws:RequestTag, s3:ExistingObjectTag) and cost-allocation reporting, an injected tag can forge an authorization-relevant tag or corrupt the intended tag set.

This issue affects ex_aws_s3: from 2.0.2 before 2.6.0.

Details

1. Unescaped interpolation. ExAws.S3.put_bucket_tagging/2 and ExAws.S3.put_object_tagging/4 in lib/ex_aws/s3.ex build each <Tag> element by placing to_string(key) and to_string(value) directly inside <Key> and <Value>. The module's escape_xml_string/1 helper, which delete_multiple_objects already applies to object keys, is not used.

2. Element break-out. XML metacharacters in a key or value are emitted verbatim. A value such as blue</Value></Tag><Tag><Key>owner</Key><Value>admin closes the intended <Value> and <Tag> and opens a new <Tag> of the attacker's choosing, so S3 parses two tags where the application intended one.

3. Effect in S3. S3 honors tags in access-control conditions (aws:RequestTag, s3:ExistingObjectTag/<key>) and in cost-allocation reporting, so the injected tag can set an authorization-relevant key the application never meant to assign, or override and corrupt the legitimate tag set.

Proof of concept

  1. An application forwards a user-supplied tag value: ExAws.S3.put_object_tagging("victim-bucket", "user/object.txt", [{"customer", value}]) |> ExAws.request().
  2. The attacker supplies the value blue</Value></Tag><Tag><Key>owner</Key><Value>admin.
  3. put_object_tagging/4 interpolates it into the <TagSet> body without escaping.
  4. The request body S3 receives contains two <Tag> elements: customer=blue and the forged owner=admin.

Impact

This is an XML injection vulnerability. It affects any application that uses ex_aws_s3 and passes user-influenced data as tag keys or values to put_object_tagging/4 or put_bucket_tagging/2. An attacker who controls part of a tag key or value can inject additional <Tag> elements into the request S3 receives, forging tags used for tag-based access control and cost allocation, or corrupting the intended tag set. The only precondition is that user-controlled input reaches the tag key/value of one of these calls.

Workarounds

Before passing user-influenced data to put_object_tagging/4 or put_bucket_tagging/2, validate and reject any tag key or value containing XML metacharacters (<, >, &, ", '), or restrict tag keys and values to an allowlisted character set.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-62273 changed 2026-11-25CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-62273 changed 2026-11-25CC-BY-4.0
NVDCVE-2026-62273 changed 2026-11-25Public domain