CVE Professor
/
All CVEs
CVE-2026-62273

CVE-2026-62273 — CWE-91

LOW CVSS 2.1 ⚡ EPSS 0.5% NVD

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.

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.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/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
Attack Vector Local AV:L
Attack Complexity Low AC:L
Attack Reqs. Present AT:P
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. None VC:N
Vuln. Integrity Low VI:L
Vuln. Avail. None VA:N
Subseq. Conf. None SC:N
Subseq. Integ. Low SI:L
Subseq. Avail. None SA:N
Scope X S:X
EPSS — Exploit Prediction Scoring System
0.5%
30-day probability
In the 41. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

XML Injection in ExAws.S3 tag handling (CWE‑91)
The Elixir library ex_aws_s3 (versions 2.0.2 – 2.5.x) builds the XML body for the PutObjectTagging and PutBucketTagging API calls by interpolating user‑supplied tag keys and values directly into the <Key> and <Value> elements using to_string/1.
The library’s existing escape_xml_string/1 helper – which is correctly used elsewhere (e.g., in delete_multiple_objects) – is not applied here.
Consequently, an attacker who can supply a tag key or value that contains XML markup can close the current element and inject arbitrary <Tag> entries into the request.

Example payload (in the <Value> element):

blue</Value></Tag><Tag><Key>owner</Key><Value>admin

When the library serialises this into XML, the resulting body contains two <Tag> elements instead of one.
Because Amazon S3 evaluates tags in IAM policy conditions (aws:RequestTag, s3:ExistingObjectTag) and in cost‑allocation reports, the injected tag can:

  • Forge an authorization‑relevant tag (e.g., owner=admin) that grants the attacker access to resources they normally cannot reach.
  • Corrupt the intended tag set, potentially causing mis‑reporting of costs or policy evaluation errors.
  • Key points

    ItemDetail
    AuthenticationRequires the caller to have permission to invoke PutObjectTagging/PutBucketTagging.
    AuthorizationNo additional checks; the injected tag is accepted by S3.
    Input validationMissing XML escaping for tag keys/values.
    ImpactLow CVSS (2.1) because it is a local, low‑complexity flaw that does not directly compromise confidentiality, integrity, or availability. However, it can be leveraged for privilege escalation via IAM tag conditions or cost‑allocation tampering.

    ⚡ Attack Chain

    Assumptions
    * The attacker can execute code in the same environment as the application that uses ExAws.S3.
    * The attacker can control the tag key/value values that are passed to ExAws.S3.put_object_tagging/4 or ExAws.S3.put_bucket_tagging/2.
    * The attacker has an IAM role/user that is allowed to call PutObjectTagging/PutBucketTagging on the target bucket.

    1. Discovery & Reconnaissance

    StepTechniqueTool / Command
    Identify the vulnerable librarySearch the application’s mix.exs or deps.lock for ex_aws_s3grep -R "ex_aws_s3" -n .
    Determine the versionInspect the lockfile or mix deps.get outputmix deps.get → ex_aws_s3 2.5.3
    Confirm the presence of tag‑handling codeSearch for put_object_tagging or put_bucket_tagging callsgrep -R "put_object_tagging" -n lib/
    Verify that the application forwards user input to tag keys/valuesReview the code path that constructs the tag mapgrep -R "tag" -n lib/
    Result: The attacker learns that the application uses ex_aws_s3 2.5.3 and forwards user‑supplied data into tag keys/values.

    2. Exploitation

    The attacker crafts a malicious tag value that closes the current <Value> element and injects a new <Tag> element.
    Below is a syntactically valid PoC using the AWS REST API (the same XML is what ExAws.S3 would send).

    # Target bucket and object
    BUCKET="example-bucket"
    OBJECT="test.txt"
    
    # Malicious tag value that injects a second tag
    # Note: The value contains XML markup that closes the <Value> element
    # and opens a new <Tag> element.
    MALICIOUS_VALUE='blue</Value></Tag><Tag><Key>owner</Key><Value>admin'
    
    # Build the XML body
    XML_BODY=$(cat <<EOF
    <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <TagSet>
        <Tag>
          <Key>color</Key>
          <Value>$MALICIOUS_VALUE</Value>
        </Tag>
      </TagSet>
    </Tagging>
    EOF
    )
    
    # Send the request using curl (AWS Signature V4 must be applied; here we use the AWS CLI for simplicity)
    aws s3api put-object-tagging \
        --bucket "$BUCKET" \
        --key "$OBJECT" \
        --tagging-xml "$XML_BODY"
    Illustrative note – The exact endpoint is PUT /{ObjectKey}?tagging on the S3 service.
    The AWS CLI internally signs the request; the raw XML body is what ExAws.S3 would transmit.

    What happens

    1. The S3 service receives the XML body.
    2. It parses the XML and finds two <Tag> entries:
    * <Key>color</Key><Value>blue</Value>
    * <Key>owner</Key><Value>admin</Value>
    3. The second tag (owner=admin) is now part of the object’s metadata.

    3. Post‑exploitation

    GoalHow it is achieved
    Privilege escalation via IAM tag conditionsIf the organization uses IAM policies that allow actions only when aws:RequestTag/owner = "admin", the attacker can now perform those actions on the object or bucket.
    Cost‑allocation tamperingThe injected owner=admin tag will appear in cost‑allocation reports, potentially mis‑attributing costs to the attacker’s account.
    Policy evaluation confusionExisting policies that rely on tag sets may behave unexpectedly, leading to unintended access or denial.
    Note – The attacker does not gain direct RCE or arbitrary code execution; the impact is limited to the scope of S3 tagging.

    🌍 Real World Impact

    CVSS DimensionValueInterpretation
    AV (Attack Vector)L (Local)Requires local or application‑level access.
    AC (Attack Complexity)L (Low)Simple to craft the payload.
    AT (Authentication)P (Privileged)The attacker must have IAM permissions to call the tagging APIs.
    PR (Privileges Required)N (None)No additional privileges beyond the existing IAM role.
    UI (User Interaction)N (None)No user interaction needed.
    VC / VI / VAN / N / NNo direct confidentiality, integrity, or availability impact on S3 itself.
    SC / SI / SAN / L / NIntegrity of the tag set is compromised (low). No impact on availability or confidentiality.

    Practical consequences

  • Privilege Escalation – If an organization uses tag‑based IAM conditions, the attacker can gain access to resources they should not see.
  • Cost‑Allocation Misreporting – Injected tags can skew cost‑allocation reports, leading to billing inaccuracies.
  • Policy Confusion – Existing IAM policies that rely on tag sets may behave unpredictably, potentially granting or denying access unintentionally.

  • 🛡️ Remediation & Mitigation

    1. Patch

    Affected VersionsFixUpgrade Recommendation
    ex_aws_s3 2.0.2 – 2.5.xThe library now uses escape_xml_string/1 for all tag keys/values.Upgrade to 2.6.0 or later.
    ActionAdd the following to mix.exs and run mix deps.update ex_aws_s3.{:ex_aws_s3, "~> 2.6"}

    2. Workarounds (if upgrade is not immediately possible)

    MitigationHow to Implement
    Sanitize inputBefore passing tag keys/values to put_object_tagging/4, apply ExAws.S3.escape_xml_string/1 manually.
    Restrict IAM permissionsDeny s3:PutObjectTagging to untrusted users or roles.
    Use a WAFBlock XML payloads containing </Tag> or <Tag> sequences. Example ModSecurity rule: <br>SecRule REQUEST_BODY "@rx</Tag>" "id:1001,phase:2,deny,msg:'XML Tag Injection detected'"
    Disable tag forwardingIf the application forwards user input directly, refactor to use a whitelist of allowed tag keys/values.

    3. Detection

    IndicatorLog PatternHow to Search
    Unexpected tag namesTagSet.*<Tag>.*<Key>.*</Key>.*<Value>.*</Value>.*</Tag>Search S3 access logs for TagSet entries containing </Tag> or <Tag> outside the normal structure.
    Malformed XMLError parsing XML or Invalid XML in S3 error logsLook for MalformedXML errors returned by S3.
    Unusual IAM policy evaluationAccessDenied logs where the request includes a tag that the user should not possessCorrelate IAM logs with S3 tagging actions.

    ⚠️ Urgency

  • CVSS Score: 2.1 (Low) – indicates a low‑risk vulnerability in terms of direct impact.
  • CISA KEV: No – not a known exploit kit.
  • Exploit Complexity: Low – requires only local code execution or control over tag values.
  • Impact: Primarily privilege escalation via tag‑based IAM conditions; not a direct RCE or data breach.
  • Recommendation

  • Immediate: Upgrade to ex_aws_s3 2.6.0 or later if the application is in production.

  • If upgrade is delayed: Apply the sanitisation workaround and tighten IAM permissions for PutObjectTagging/PutBucketTagging.

  • Monitoring: Enable logging of S3 tagging actions and set alerts for anomalous tag patterns.


Given the low CVSS score and the requirement for local access, the patching priority is medium for environments that rely on tag‑based IAM policies or cost‑allocation reporting. For environments that do not use tags for access control, the urgency can be considered low.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-62273
Technical reference / advisory repository for CVE-2026-62273
Technical reference / advisory repository for CVE-2026-62273
CVSS Score
2.1 / 10 · CVSS LOW
Weakness Types (CWE)
CWE-91
Related CVEs
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa
9.6
CVE-2026-118743
Server-side request forgery in Microsoft Copilot allows an authorized attacker to elevate privileges over a ne
9.2
CVE-2026-144579
curl_cffi 0.15.0 through 0.17.0 contains a server-side request forgery protection bypass in allow_redirects='s
8.9
CVE-2026-144591
PhpSpreadsheet through 5.12.0 contains a server-side request forgery vulnerability that allows attackers to re
8.8
CVE-2026-145157
orange-orm before 5.6.1 contains an authorization bypass vulnerability that allows authenticated clients to ov
8.5
CVE-2026-135458
A path traversal vulnerability was identified in GitHub Enterprise Server that allowed a normal authenticated